创建HtmlUnitDriver对象报错

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

@SuppressWarnings("unused")
public class Test {

public static void main(String[] args) throws Exception {
    WebDriver dr = new HtmlUnitDriver(true);
    dr.get(Data.strLOGIN_URL);
}

}


错误

Exception in thread "main" java.lang.NoSuchMethodError: com.gargoylesoftware.htmlunit.WebClient.setThrowExceptionOnFailingStatusCode(Z)V
at org.openqa.selenium.htmlunit.HtmlUnitDriver.createWebClient(HtmlUnitDriver.java:160)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.(HtmlUnitDriver.java:108)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.(HtmlUnitDriver.java:149)
at com.iulicai.test.Test.main(Test.java:14)

1个回答

估计包冲突了,检查一下工程的classpath下是否有新旧两个版本的htmlunit 的jar包

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ibatis创建SqlMapClient对象报错!
String resource="sql-map-config.xml";rnReader reader;rntry rnreader=Resources.getResourceAsReader(resource);rnSqlMapClient sqlMap=SqlMapClientBuilder.buildSqlMapClient(reader);rncatch(IOException e)rnrne.printStackTrace();rnrn在新建sqlMap对象时报错:rnjava.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactoryrnrn求教!!!
C#创建动态对象报错
用VS2010 C#语言,注册好dll文件后,在WinForm项目里面,可以引用COM组件创建动态对象。但是,在AspNet项目里面,用同样的代码创建会报错,代码如下。rn[code=csharp]dynamic dicVoucher1 = Activator.CreateInstance(Type.GetTypeFromProgID("KFO.Dictionary"));[/code]rn报错信息如下。rnSystem.InvalidCastException: 从 IClassFactory 为 CLSID 为 09AFE6FD-5BDB-11D1-9C2A-127658000000 的 COM 组件创建实例失败,原因是出现以下错误: 80004002。rnrn请各路神仙帮忙分析下到底是什么原因。
OkHttp网络请求,创建OkHttpClient对象时报错
04/09 18:50:56: Launching apprn$ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHERrnClient not ready yet..Waiting for process to come onlinernConnected to process 11864 on device emulator-5554rnCapturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.rnI/e.myapplicatio: Not late-enabling -Xcheck:jni (already on)rnW/e.myapplicatio: Unexpected CPU variant for X86 using defaults: x86_64rnW/e.myapplicatio: JIT profile information will not be recorded: profile file does not exits.rnI/chatty: uid=10101(com.example.myapplication) identical 10 linesrnW/e.myapplicatio: JIT profile information will not be recorded: profile file does not exits.rnI/InstantRun: starting instant run server: is main processrnW/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)rnW/e.myapplicatio: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)rnD/AndroidRuntime: Shutting down VMrnE/AndroidRuntime: FATAL EXCEPTION: mainrn Process: com.example.myapplication, PID: 11864rn java.lang.BootstrapMethodError: Exception from call site #4 bootstrap methodrn at okhttp3.internal.Util.(Util.java:87)rn at okhttp3.internal.Util.immutableList(Util.java:234)rn at okhttp3.OkHttpClient.(OkHttpClient.java:124)rn at com.example.myapplication.MainActivity.onCreate(MainActivity.java:14)rn at android.app.Activity.performCreate(Activity.java:7136)rn at android.app.Activity.performCreate(Activity.java:7127)rn at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)rn at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)rn at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)rn at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)rn at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)rn at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)rn at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)rn at android.os.Handler.dispatchMessage(Handler.java:106)rn at android.os.Looper.loop(Looper.java:193)rn at android.app.ActivityThread.main(ActivityThread.java:6669)rn at java.lang.reflect.Method.invoke(Native Method)rn at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)rn Caused by: java.lang.ClassCastException: Bootstrap method returned nullrn at okhttp3.internal.Util.(Util.java:87) rn at okhttp3.internal.Util.immutableList(Util.java:234) rn at okhttp3.OkHttpClient.(OkHttpClient.java:124) rn at com.example.myapplication.MainActivity.onCreate(MainActivity.java:14) rn at android.app.Activity.performCreate(Activity.java:7136) rn at android.app.Activity.performCreate(Activity.java:7127) rn at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) rn at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) rn at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) rn at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) rn at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) rn at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) rn at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) rn at android.os.Handler.dispatchMessage(Handler.java:106) rn at android.os.Looper.loop(Looper.java:193) rn at android.app.ActivityThread.main(ActivityThread.java:6669) rn at java.lang.reflect.Method.invoke(Native Method) rn at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) rnI/Process: Sending signal. PID: 11864 SIG: 9rnApplication terminated.rn
poi 创建HSSFWorkbook对象时报错
代码中已经引用此类: rnimport org.apache.poi.hssf.usermodel.HSSFWorkbook;rnrn程序编译没有问题,也没报错,当程序运行到:rnHSSFWorkbook workbook = new HSSFWorkbook(); // 创建一个excelrn rn马上报错,[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/35.gif][/img]报错信息为:rn[color=#FF0000]java.lang.reflect.InvocationTargetException[/color]rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)............rn[color=#FF0000]java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook[/color]rn com.manage.employee.action.EmployeeManageAction.export(EmployeeManageAction.java:158)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39).....rn[color=#FF0000]java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook[/color]rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320).........rnrn[color=#0000FF][b]问题是我明明已经引用了对应的jar包[/b][/color],ooxml-schemas-1.1.jar,poi-3.5-beta6-20090622.jar,poi-contrib-3.5-beta6-20090622.jar,poi-ooxml-3.5-beta6-20090622.jar,poi-scratchpad-3.5-beta6-20090622.jar,xmlbeans-2.3.0.jar。rn求帮忙解答,万分感谢。[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/3.gif][/img]
我创建的类的对象怎么报错呢?
[code=c]#includern#includernrnusing namespace std;rnrnclass studentrnrn char name[10];rn int deg;rn char level[7];rn friend class process;rnrnpublic:rn student(char na[], int d)rn rn strcpy(name,na);rn deg = d;rn rn;rnrnclass processrnrnpublic:rn void trans(student s[])rn rn int nOff;rn nOff = s->deg;rn if (nOff > 89)rn rn nOff = 1;rn rn elsern rn if (nOff > 79)rn rn nOff = 2;rn rn elsern rn if (nOff > 69)rn rn nOff = 3;rn rn elsern rn nOff = 4;rn rn rn rn rn switch (nOff)rn rn case 1:rn strcpy(s->level,"优");rn break;rn case 2:rn strcpy(s->level,"良");rn break;rn case 3:rn strcpy(s->level,"中"); rn break;rn case 4:rn strcpy(s->level,"及格");rn break;rn default:rn strcpy(s->level,"不及格");rn break;rn rn rn;rnrnvoid main(void)rnrn student test[5];rn rn[/code]
对象的创建、对象的存储结构
<p>n <strong><span style="font-size:18px;">课程介绍:</span></strong>n</p>n<p>n 这是一门Java语言入门课程,针对的是Java初学者或者从事其他计算机语言开发但希望转到Java开发工作上来的软件工程师,是所有想入java之门的朋友首先要学的第一门课,也是整个Java开发的核心和基础,也就是大家常说的JAVA SE版本中涵盖的知识;n</p>n<p>n <br />n本门课程将采用 windows平台下的intellij IDEA开发环境作为主要的讲解平台,对于熟悉其他Java开发环境的学友们,当然也可以选择自己熟悉的平台;本门课程希望达到的目标是给大家打语言基础,但不希望一上来给大家太重的学习负担,分阶段,逐步的学习,是更好的学习方式,所以在本门课程中,我们将只涉及到基础的语言,以及面向对象程序设计的一些基础概念,更多的知识和概念我们将放在进阶课程中讲解,这一点望大家知晓;<br /><br />n在Java诞生的不到30年时间里,Java开发人员的市场需求已经增长到了一个非常惊人的程度,至少目前来看,没有任何一门开发技术能够和java比,从待遇方面,高级Java开发人员的薪资也是相当的高,大概只有c++能够和Java掰一掰手腕,其他的开发技术的薪资待遇,很难与Java比较。<br /><br />n很多想学习java的同学,会有一种困惑,感觉Java知识特别零散,除基本的Java语言外,各种概念、各种框架层出不穷,那我们怎么入学习之门,学到什么程度,能找到什么样的工作,这些问题就会困扰着我们;针对这种情况,我将不断推出一系列的Java课程,通过这一系列的课程,为大家搭建一条比较完整的Java学习链条,我并不准备回答大家“学到什么程度,能找到什么样的工作这种问题“,因为当你学到一定的程度之后,你自然就会找到答案,但有一点可以确定:仅仅学习完本门课程还不够,还需要继续深入学习下去!<br /><br />n讲解中所安装的是jdk版本是jdk 12版本,但这并不意味着我们要把这个版本中的所有知识讲解的面面俱到,把最有用、最实用,最能帮助大家加薪的知识挑选出来讲解是老师的重要责任;n</p>n<p>n <br /></p>n<p>n <br /></p>n<p>n <strong><span style="font-size:18px;">讲师介绍:</span></strong><span style="font-size:18px;"></span>n</p>n<p>n 王健伟老师,网名:狂想(KuangXiang),1995年毕业于哈尔滨工程大学计算机及应用专业,20多年软件开发经验,经历过数十个软件项目开发包括网络通信、网络安全、网络游戏等领域,多年的摸爬滚打使自身具备了极其深厚的开发实力和实战经验。<br /><br />n深圳知名网络安全公司安络科技(www.cnns.net)有限公司创始人之一、中国首套网络安全在线扫描评估系统项目负责人,电子工业出版社2003年《Crystal Reports水晶报表设计与开发实务》书籍作者,全球同服独立游戏《冒险之路》制作人。<br /><br />n在教学上,老师自带讲课天赋,善于用最清晰、最通俗的语言把复杂问题简单化,让你听了就能懂,当节学完基本就能掌握,老师能够为你节省大量的学习时间并能达到极好的教学效果!<br /><br /></p>n<p>n <br /></p>
对象池中对象的创建
对象池中设定maxCount和minCount属性管理池化对象,对象池中可以加入不同的实例对象。代码中怎样判定rn客户端需要的对象是池中的,可以直接取,还是池中没有的,需要创建对象???
JavaScript 对象及对象的创建
前言 即使不了解Javascript的设计原理和继承机制这些东西的时候,我们依然能很好的使用Javascript去设计前端页面及功能。这得力在传统jquery时的前端开发我们把大部分的业务逻辑封装在后台,前端代码的逻辑性大大降低,我们只需要使用一点点j和ava语法类似的知识就能写出所需的javascript代码。这时候我们不需要考虑继承,不需要考虑复杂的封装,甚至连this关键字我们都用的极少...
面相对象和对象的创建
//类:一些具有相同属性和功能的集合 //对象:一些具有相同属性和功能的集合的具体实例          charset="UTF-8">           type="text/javascript">  
对象的创建
我知道JAVA里面创建一个对象 rnClass Objectname=new class(); rn但是书上有个语句: rnClass Objectname=getGaramter(person);//跟String abc=c一样的结构,书上说是创建一个变量,可以这样吗?创建出来的东东跟上面有什么不同?真的是创建一个变量吗?但是java里面好象没有这种类型的变量哦……rn两种方法有什么区别吗?rnrnrn
抓取微博数据:使用HtmlUnitDriver实现模拟登陆
前言 作为小白的我而言,对于各种网络数据抓取也不少了,但是在抓取过程之中坑点也不少的,这里就分享一下对于需要登陆的网页的处理,我们整体思路是这样的,我们通过对该网站的登录之后拿到该网站的Cookie,然后拿着获取到的Cookie再去我们想要爬取的地址进行数据爬取. Selenium简介 Selenium是一个用于Web应...
创建按对象与使用对象
<p>rn &nbsp;rn <p>rn 请务必到<a href="https://edu.csdn.net/bundled/detail/49?utm_source=banner">https://edu.csdn.net/bundled/detail/49?utm_source=banner</a>&nbsp;下单购买课,方可添加图书寄送地址。rn </p>rn <p>rn 本页面,仅为观看视频页面,如需邮寄图书,请务必到<a href="https://edu.csdn.net/bundled/detail/49?utm_source=banner">https://edu.csdn.net/bundled/detail/49?utm_source=banner</a>&nbsp;下单购买课rn </p>rn <div>rn <br />rn </div>rn</p>rn<p>rn 《21天通关Python》我能收获哪些?rn</p>rn<p>rn <br />rn</p>rn<ul class=" list-paddingleft-2" style="font-family:-apple-system-font, BlinkMacSystemFont, &quot;font-size:17px;text-align:justify;">rn <li style="color:#333333;">rn <p>rn <span style="font-size:14px;">1<span style="color:#333333;font-family:-apple-system-font, BlinkMacSystemFont, &quot;font-size:14px;">本</span>实体图书教材,京东畅销书《疯狂<span>Python</span>讲义》含邮寄</span> rn </p>rn </li>rn <li>rn <p>rn <span style="font-size:14px;"><span>10</span><span style="color:#333333;font-family:-apple-system-font, BlinkMacSystemFont, &quot;font-size:14px;">场</span><span>Python视频精讲,作者李刚亲自带队</span><span style="color:#333333;">带你通关Python</span></span> rn </p>rn </li>rn <li style="color:#333333;">rn <p>rn <span style="font-size:14px;">4<span style="color:#333333;font-family:-apple-system-font, BlinkMacSystemFont, &quot;font-size:14px;">大</span>模块,涉及数据分析、网络爬虫、等Python热点领域</span> rn </p>rn </li>rn <li style="color:#333333;">rn <p>rn <span style="font-size:14px;">专属微信社群,随时答疑,爱上Python!</span> rn </p>rn </li>rn</ul>rn<p>rn <span><span style="font-size:14px;"><br />rn</span></span> rn</p>rn<br />rn<p>rn <br />rn</p>rn<p>rn <span></span> rn</p>
设置HtmlUnitDriver代理及处理用户验证问题
Proxy proxy = new Proxy(); //设置代理服务器地址 proxy.setHttpProxy("代理服务器地址:端口号"); DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit(); capabilities.setCapability(Capa
对象的内存布局,对象的创建步骤
对象的内存布局:1、对象头(Header):存储对象自身运行时数据,如:哈希码、GC分代年龄、锁状态标志等。2、实例数据(Instance Data):真正存储的有效信息,如代码中定义各种类型的字段内容。3、对齐填充(padding):不是必须的,起着占位符的作用(对象起始地址必须是8字节的整数倍)。普通对象的创建步骤:...
添加商品对象时报错
java.lang.IllegalArgumentException: Cannot invoke com.yourcompany.struts.entity.Goods.setBeginTime - argument type mismatchrnrn请高手帮忙解决下,感谢 rnrn
页面报错缺少对象
下面是upload.asp内容rnrn<%rnif 上传成功 thenrn Response.Write " "rnelsern Response.Write ("上传失败")rnend ifrn%>rn rn rnrnrnrn------------------------------------------------------------------------rn用没有问题,提交到本身以后在这里调用Response.Write " "页面脚本报错,提示确少对象,这是为什么呀?
HANA激活对象报错
GRANT SELECT ON SCHEMA  TO _SYS_REPO WITH GRANT OPTION
数组拼接对象报错
我从后台请求中设置了一个List集合,在前台定义 var index = 0;rn在使用$list["+index+"]时报错,麻烦各位帮帮。。。
JS报错 缺少对象
网页错误详细信息rnrn用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; CIBA)rn时间戳: Tue, 29 Jun 2010 13:21:44 UTCrnrnrn消息: 缺少对象rn行: 1rn字符: 1rn代码: 0rnURI: http://localhost:8080/shyw/datamanage/modifyapply/modifyapply_new.jsprnrnIE8下显示缺少对象为 modifyapply_new.jsprnrn求大虾帮忙解决
在Eclipse实例化对象报错
本人新人一枚,我按照视频教程练习java的重写 在实例化对象中出了问题 但是视频的没有报错,我的却会报错,这是什么原因呢?麻烦各位前辈指导
EF报错,对象不存在。
[img=https://img-bbs.csdn.net/upload/201504/29/1430278652_146192.png][/img]rnrn为啥会报这个错误呢。我的这个对象对应的表的F_FACTORY_STOCK
js报错缺少对象
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddCategory.aspx.cs" Inherits="Manager_AddCategory" %>rnrnrnrnrnrn 添加论坛类型rn rnrnrnrnrn rn rn rn 添加论坛类别界面 rn rn rn rn 论坛名称:rn rn rn rn rn rn rn 论坛描述信息:rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn报错为:rnMicrosoft JScript 运行时错误: 缺少对象rn我把script放到下面也报错rn请问为什么
linq生成对象的报错
public List GetDataRows(string key, DateTime dtleft, DateTime dtright)rn rn var linq = from c in dbContext.MaterialEntryrn join d in dbContext.MaterialEntryItem on c.SheetId equals d.SheetId into result1rn from ed in result1.DefaultIfEmpty()rn join e in dbContext.WareRoom on c.WareRoomId equals e.WareRoomId into result2rn from ee in result2.DefaultIfEmpty()rn join f in dbContext.Supplier on c.SupplierId equals f.SupplierId into result3rn from ff in result3.DefaultIfEmpty()rn join g in dbContext.Employee on c.WareRoomMan equals g.EmployeeId into result4rn from gg in result4.DefaultIfEmpty()rn where c.SheetId.Contains(key) && c.CreateTime >= dtleft && c.CreateTime <= dtrightrn orderby c.SheetId descendingrn select new MaterialModelrn //这里报错说rn c.SheetId,rn ee.WareRoomName,rn ff.SupplierName,rn gg.EmployeeName,rn c.CreateTime,rn ed.MaterialsName,rn ed.UnitPack,rn ed.QtyPack,rn ed.Qty,rn ed.Price,rn ed.Total,rn ed.TotalMoney,rn ;rn dbContext.Database.Log = new Action(q => LogHelper.WriteLog("sql", q));rn return linq.ToList();rn rnrn 1 Cannot initialize type 'Surpass.Model.MaterialModel' with a collection initializer because it does not implement 'System.Collections.IEnumerable' G:\Project\VS2010\Surpass12\Surpass.DataAccess\MaterialDataAccess\MaterialEntryDAL.cs 174 24 Surpass.DataAccess
对象赋值给对象报错
有一道考试题,我为了验证一下答案,就在eclipse里面模拟了一下代码,rn但是发现下图的位置报错,rn如果我把 state = soldOutState; 去掉的话,就不报错rnrnrn请问这里是因为什么原因报错呢?rnrnrnrnrn[img=https://img-bbs.csdn.net/upload/201604/07/1459959553_869678.png][/img]rnrnrnrnrn[img=https://img-bbs.csdn.net/upload/201604/07/1459960075_16835.png][/img]
oracle 创建视图报错
CREATE OR REPLACE FORCE VIEW PCS.PCS_V_MARK_FACTORYrn(rn FACTORYCODE,rn FACTORYNAMErn)rnASrn SELECT 'FACTORYCODE', 'FACTORYNAME FROM' pcs_itf.MARK_FACTORY;rnrnrn报个语法错误 ? rnrnrn求解实在没看出来 。
创建分区表,老报错
create table ZDEVICE_BATrn(rn INFOID INTEGER not null,rn DEVICENO VARCHAR2(32),rn RECEIVETIME TIMESTAMP(0),rn LONGITUDE NUMBER(20,6),rn LATITUDE NUMBER(20,6)rn)rnpartition by list (DEVICENO)rn(rn partition Z283354 values ('283354') , rn partition Z281693 values ('281693') , rn partition Z285004 values ('285004') rn);rnrn老报这样的错误 ORA-14004: missing PARTITION keywordrn请大侠指点为什么?
TabHost创建老是报错
只是拖了一个Tabhost控件,LinearLayout那里就一直飘红,带着大红叉,[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/43.gif][/img]求~~~rnrn rnrn rnrn rn rnrn rnrn [color=#FF0000] rn rnrn [color=#FF0000]rn rnrn [color=#FF0000]rn rn rn rn rnrn
创建物化视图报错
--创建语句rncreate MATERIALIZED VIEW v_ceshirn REFRESH FASTrn START WITH SYSDATE rn NEXT TRUNC(SYSDATE,'HH24')+1/24 rnASrn SELECT * FROM TMP_LJX_20100402_ceshi@ZJDX_SMS;rnrn但是创建不成功的,报错:rnORA-04052: 在查找远程对象 FM.XN_FM_OBJ_GROUPNAME@FM_MASTER 时出错rnORA-00604: 递归 SQL 层 1 出现错误rnORA-03106: 致命的双工通信协议错误rnORA-02063: 紧接着line(源于FM_MASTER)rnrn直接查询SELECT * FROM TMP_LJX_20100402_ceshi@ZJDX_SMS; 是可以查出数据的而且不报错!rn
创建过程报错
代码如下:CREATE OR REPLACE PROCEDURE "OPS$STOREP"."sale_zb"(i number(8)) isrnUP1 varchar(32);rnUP2 number(12,2);rnUP3 number(12,2);rnUP4 number(12,2);rncursor UP_SALE ISrnselect decode(buyer,'NF10','NF10/11','NF11','NF10/11',rn 'NF8','NF8/9','NF9','NF8/9',rn 'NF4','NF4/7','NF7','NF4/7',rn 'NF5','NF5/6','NF6','NF5/6',rn 'NF2','NF2/3','NF3','NF2/3', BUYER),SUM(AMOUNT),SUM(QTY),SUM(VISIT)rnfrom buyer_VISIT where invoice_date =to_date(init1,'yyyymmdd') and proc_ind=1rnGROUP BY decode(buyer,'NF10','NF10/11','NF11','NF10/11',rn 'NF8','NF8/9','NF9','NF8/9',rn 'NF4','NF4/7','NF7','NF4/7',rn 'NF5','NF5/6','NF6','NF5/6',rn 'NF2','NF2/3','NF3','NF2/3', BUYER);rnbeginrn beginrn OPEN UP_SALE;rn LOOPrn FETCH UP_SALE INTO UP1,UP2,UP3,UP4;rn EXIT WHEN UP_SALE%NOTFOUND;rn UPDATE ST_SALE_ZB SET SALE_AMOUNT=UP2,QTY=UP3,VISIT=UP4 WHERE BUYER_UID=UP1 AND TO_CHAR(RUN_DATE,'YYYYMMDD')=i;rn COMMIT;rn END LOOP;rn CLOSE UP_SALE;rn END;rnend sale_zb;rn请高人指点,我是第一次写这个,找不到原因啊~!~!~!
创建约束时报错
我在创建的一个XSB表中执行以下语句:rn ALTER TABLE XSBrn ADD 身份证号 char(18) rn CONSTRAINT SF_UK UNIQUE NONCLUSTERED(身份证号)rn但老是报错啊:rn 消息 1505,级别 16,状态 1,第 1 行rn因为发现对象名称 'dbo.XSB' 和索引名称 'SF_UK' 有重复的键,所以 CREATE UNIQUE INDEX 语句终止。重复的键值为 ()。rnrn请问这是什么问题啊,谁能帮忙解决一下啊 ,谢谢了
ora 创建存储过程报错
[code=SQL]rncreate or replacernPROCEDURE "P_PXPAPER_HIS_INSERT"rn( rn PARAM_HIS_ID IN OUT VARCHAR2,rn PARAM_SCORE IN NUMBER := NULL,rn PARAM_NUMBER IN NUMBER := NULL,rn PARAM_PAPER_ID IN VARCHAR2 := NULL,rn PARAM_USERID IN VARCHAR2 := NULL,rn PARAM_MEMO IN VARCHAR2 := NULL,rn PARAM_CREATE_TIME IN DATE := SYSDATE rn)rnASrnBEGIN rn IF ISNULLOREMPTY(PARAM_HIS_ID)=1 THENrn SELECT GET_CURRENT_SERVER_ID || '-' || "SEQ_PXPAPER_HIS".NEXTVAL INTO PARAM_HIS_ID FROM DUAL;rn ELSErn --保持原来值rn PARAM_HIS_ID:=PARAM_HIS_ID;rn END IF;rn INSERT INTO "PXPAPER_HIS"(rn "HIS_ID","SCORE","NUMBER","PAPER_ID","USERID","MEMO","CREATE_TIME"rn ) VALUES (rn PARAM_HIS_ID,PARAM_SCORE,PARAM_NUMBER,PARAM_PAPER_ID,PARAM_USERID,PARAM_MEMO,PARAM_CREATE_TIMErn );rnrnEND;rnrn/rnrnrncreate or replacernPROCEDURE "P_PXPAPER_HIS_DELETE"rn(rn PARAM_HIS_ID VARCHAR2rn) rnASrnBEGINrn DELETE FROM "PXPAPER_HIS"rn WHERErn "HIS_ID" = PARAM_HIS_ID;rnEND;rnrn/rnrnrn[/code]rnrn错误信息:ORA-24344: success with compilation errorrnrnProcedure execution failedrnORA-06550: line 1, column 38:rnPLS-00905: object VIVE_WM.P_PXPAPER_HIS_INSERT is invalidrnORA-06550: line 1, column 28:rnPL/SQL: Statement ignoredrnrn查询时间: 0.047msrnrn帮帮忙呗,很郁闷,不知道怎么回事
Java 创建文件路径报错
[code=java]FileWriter fw = null;rn File f = new File("E:/TEST/aaa/2012-08-09/d.txt");[/code]rn[img=https://img-bbs.csdn.net/upload/201408/12/1407774480_44576.png][/img]rn当我把路径写成:E:/TEST/aaa/d.txt 时java程序不报错.rn[color=#FF0000]我想问:为何我在路径中加入了2012-08-09中就有问题?想要保留2012-08-09怎么解决?[/color]
创建实体视图报错!
谢谢刚才各位朋友的指教~出现了这样一个问题,现在另开一贴: rnCREATE MATERIALIZED VIEW LOG ON t_wp_xh WITH ROWID, PRIMARY KEY, SEQUENCE INCLUDING NEW VALUES; rnCREATE MATERIALIZED VIEW LOG ON t_wp_cx WITH ROWID, PRIMARY KEY, SEQUENCE INCLUDING NEW VALUES; rn都成功了,然后 rnCREATE MATERIALIZED VIEW MVB_WP_CXXH REFRESH FAST ON DEMAND rnAS rnselect xtm,htm from T_WP_CX rnunion all rnselect xtm,htm from T_WP_XH rn报错,说ORACLE不能从一个复杂查询的中创建一个快速刷新的实体化视图,难到就只是用了个UNION ALL就算复杂查询了吗?
maven创建webapp报错
最近使用maven创建webapp时报出一下错误: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories. Could not resolve artifact org.apache.maven.arche
创建 if-then...报错
create or replace procedure pro_testif(pro_empNo emp.empno%type) isrn 2 v_empName emp.ename%type;rn 3 beginrn 4 selelct ename into v_empName from emp where empno=pro_empNo;rn 5 if v_empName='MILLER'rn 6 thenrn 7 update emp set sal=sal+200 empno=pro_empNo;rn 8 elsif v_empName='FORD'rn 9 thenrn 10 update emp set sal=sal+100 empno=pro_empNo;rn 11 elsern 12 update emp set sal=sal+10 where empno=pro_empNo;rn 13 end if;rn 14 end;rn 15 /rn rnWarning: Procedure created with compilation errors
创建函数报错?急
包没有问题 rnCREATE OR REPLACE PACKAGE "WYUSER"."F_MODEL" as rntype m_cursor is ref cursor; rnfunction MModelbrow( rn id1 in number rn ) return m_cursor; rnend; rn包体提示ora-00942 表或视图不存在 rnCREATE OR REPLACE PACKAGE BODY "WYUSER"."F_MODEL" as rnfunction MModelbrow(id1 in number) rn return m_cursor IS rn ACursor m_cursor; rn l1 number; rn strCreateTable varchar2(600); rn BEGIN rn l1:=0; rn strCreateTable:='CREATE GLOBAL TEMPORARY TABLE rn re (ID2 number,level2 number) ON COMMIT PRESERVE ROWS'; rn Execute immediate strCreateTable; rn INSERT INTO RE values(id1,l1); rn COMMIT; rn open ACursor for select * from re; rn return ACursor; rn end MModelbrow; rnend;rn这两句报ora-00942 表或视图不存在rn INSERT INTO RE values(id1,l1); rnopen ACursor for select * from re; rn看了别人的函数调用数据集。人家是可以的呀。难道是权限问题。怎么解决呢?大虾们rn
内嵌创建窗体报错
为什么创建窗体的时候报错 rnrn单独运行这个程序没有问题,把这个程序 嵌 到另外一个程序里,运行到这里的时候 就会 偶尔 出现报这个错误rnrn比如 rnvarrn LoanApplyForm: TLoanApplyForm;rnbeginrn LoanApplyForm := TLoanApplyForm.Create(NIL);rn LoanApplyForm.ShowModal;rn LoanApplyForm.Free;rnend;rnrnprocedure GDIError; //错误信息 提示窗体没有滚动条rnvarrn ErrorCode: Integer;rn Buf: array [Byte] of Char;rnbeginrn ErrorCode := GetLastError;rn if (ErrorCode <> 0) and (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nil,rn ErrorCode, LOCALE_USER_DEFAULT, Buf, sizeof(Buf), nil) <> 0) thenrn raise EOutOfResources.Create(Buf)rn elsern OutOfResources;rnend;
Realm 创建报错
demo 开启时报如下错误 java.lang.IllegalStateException: Call `Realm.init(Context)` before creating a RealmConfiguration   是配置的 Application 未在 AndroidMainfest.xml 文件中注册...
创建maven工程报错!
[size=24px]错误提醒[/size]rnDescription Resource Path Location Typern Failure to transfer org.codehaus.plexus:plexus-utils:jar:3.0 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-utils:jar:3.0 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled. pom.xml /maventest line 1 Maven Configuration Problemrn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法