新建WebProject报如下错

原文链接:http://www.cnblogs.com/guodanzhen/p/9288758.html

Compiler compliance level of project rams should be 5.0.Your current workspace default is 6.0.Do you want to use a custom setting for your project?

意思是,当前的jdk版本是6,但系统默认是5,问是否需要用你的配置来进行当前文件的解析。所以点是或者否都可以.

解决方式: 1,WINDOW--->Preferences-->java-->Compiler--找右面Compiler compliance level修改成1.5就ok了

转载于:https://www.cnblogs.com/guodanzhen/p/9288758.html

展开阅读全文
博主设置当前文章不允许评论。

打包发布后运行报如下的错

06-09

打包发布后运行报如下的错,求高手指点~~~~~~~~~~~~~~~rnrnrnrn“/yf”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn未将对象引用设置到对象的实例。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。rnrn源错误: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[NullReferenceException: 未将对象引用设置到对象的实例。]rn OleDBHelper..cctor() +22rnrn[TypeInitializationException: “OleDBHelper”的类型初始值设定项引发异常。]rn OleDBHelper.ExecuteReader(String cmdText) +0rn admin.checkUser(String a_loginId, String a_loginPwd) +115rn Admin_Login.btnLogin_Click(Object sender, EventArgs e) +215rn System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105rn System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42 论坛

weblogic7.1下webservices报如下错,请高手帮忙!

08-20

我就是要把包含结果值的Vector返回给客户端,为什么总是不成功呢?Vector里面放的是多个JavaBean。rnrnjava.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: type mapping lookup failure on class=class bean.ConsumeDetail TypeMapping=TYPEMAPPING SIZE=7rnENTRY 1:rn class: bean.BaseInforn xsd_type: ['java:bean']:p2:BaseInforn ser: bean.BaseInfoCodec@701466rn deser: bean.BaseInfoCodec@4b6707rnENTRY 2:rn class: java.util.Vectorrn xsd_type: ['java:language_builtins.util']:p7:Vectorrn ser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@591349rn deser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@122edrnENTRY 3:rn class: bean.AllowanceDetailBeanrn xsd_type: ['java:bean']:p1:AllowanceDetailBeanrn ser: bean.AllowanceDetailBeanCodec@1c25d2rn deser: bean.AllowanceDetailBeanCodec@770caarnENTRY 4:rn class: bean.ConsumeDetailBeanrn xsd_type: ['java:bean']:p4:ConsumeDetailBeanrn ser: bean.ConsumeDetailBeanCodec@6095a8rn deser: bean.ConsumeDetailBeanCodec@15140rnENTRY 5:rn class: bean.UseCardDetailBeanrn xsd_type: ['java:bean']:p6:UseCardDetailBeanrn ser: bean.UseCardDetailBeanCodec@7d451crn deser: bean.UseCardDetailBeanCodec@446386rnENTRY 6:rn class: bean.FillinDetailBeanrn xsd_type: ['java:bean']:p5:FillinDetailBeanrn ser: bean.FillinDetailBeanCodec@62108ern deser: bean.FillinDetailBeanCodec@2cf4fcrnENTRY 7:rn class: bean.CardInforn xsd_type: ['java:bean']:p3:CardInforn ser: bean.CardInfoCodec@8035crn deser: bean.CardInfoCodec@14b85frn; nested exception is: rn javax.xml.rpc.soap.SOAPFaultException: type mapping lookup failure on class=class bean.ConsumeDetail TypeMapping=TYPEMAPPING SIZE=7rnENTRY 1:rn class: bean.BaseInforn xsd_type: ['java:bean']:p2:BaseInforn ser: bean.BaseInfoCodec@701466rn deser: bean.BaseInfoCodec@4b6707rnENTRY 2:rn class: java.util.Vectorrn xsd_type: ['java:language_builtins.util']:p7:Vectorrn ser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@591349rn deser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@122edrnENTRY 3:rn class: bean.AllowanceDetailBeanrn xsd_type: ['java:bean']:p1:AllowanceDetailBeanrn ser: bean.AllowanceDetailBeanCodec@1c25d2rn deser: bean.AllowanceDetailBeanCodec@770caarnENTRY 4:rn class: bean.ConsumeDetailBeanrn xsd_type: ['java:bean']:p4:ConsumeDetailBeanrn ser: bean.ConsumeDetailBeanCodec@6095a8rn deser: bean.ConsumeDetailBeanCodec@15140rnENTRY 5:rn class: bean.UseCardDetailBeanrn xsd_type: ['java:bean']:p6:UseCardDetailBeanrn ser: bean.UseCardDetailBeanCodec@7d451crn deser: bean.UseCardDetailBeanCodec@446386rnENTRY 6:rn class: bean.FillinDetailBeanrn xsd_type: ['java:bean']:p5:FillinDetailBeanrn ser: bean.FillinDetailBeanCodec@62108ern deser: bean.FillinDetailBeanCodec@2cf4fcrnENTRY 7:rn class: bean.CardInforn xsd_type: ['java:bean']:p3:CardInforn ser: bean.CardInfoCodec@8035crn deser: bean.CardInfoCodec@14b85frnrnrn at untitled6.generated.QueryHelperPort_Stub.getConsumeDetail(Unknown Source)rnrn at untitled6.Untitled1.main(Untitled1.java:27)rnrnCaused by: javax.xml.rpc.soap.SOAPFaultException: type mapping lookup failure on class=class bean.ConsumeDetail TypeMapping=TYPEMAPPING SIZE=7rnENTRY 1:rn class: bean.BaseInforn xsd_type: ['java:bean']:p2:BaseInforn ser: bean.BaseInfoCodec@701466rn deser: bean.BaseInfoCodec@4b6707rnENTRY 2:rn class: java.util.Vectorrn xsd_type: ['java:language_builtins.util']:p7:Vectorrn ser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@591349rn deser: weblogic.xml.schema.binding.internal.builtin.JavaUtilVectorCodec@122edrnENTRY 3:rn class: bean.AllowanceDetailBeanrn xsd_type: ['java:bean']:p1:AllowanceDetailBeanrn ser: bean.AllowanceDetailBeanCodec@1c25d2rn deser: bean.AllowanceDetailBeanCodec@770caarnENTRY 4:rn class: bean.ConsumeDetailBeanrn xsd_type: ['java:bean']:p4:ConsumeDetailBeanrn ser: bean.ConsumeDetailBeanCodec@6095a8rn deser: bean.ConsumeDetailBeanCodec@15140rnENTRY 5:rn class: bean.UseCardDetailBeanrn xsd_type: ['java:bean']:p6:UseCardDetailBeanrn ser: bean.UseCardDetailBeanCodec@7d451crn deser: bean.UseCardDetailBeanCodec@446386rnENTRY 6:rn class: bean.FillinDetailBeanrn xsd_type: ['java:bean']:p5:FillinDetailBeanrn ser: bean.FillinDetailBeanCodec@62108ern deser: bean.FillinDetailBeanCodec@2cf4fcrnENTRY 7:rn class: bean.CardInforn xsd_type: ['java:bean']:p3:CardInforn ser: bean.CardInfoCodec@8035crn deser: bean.CardInfoCodec@14b85frnrnrn at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:459)rnrn at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:359)rnrn at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)rnrn ... 2 morernrn 论坛

spring+mybatis+mysql中事务管理报如下错: Failed to load ApplicationContext

02-16

java.lang.IllegalStateException: Failed to load ApplicationContextrn at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)rn at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)rn at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)rn at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)rn at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:230)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:249)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)rn at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)rn at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:363)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)rnCaused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [spring-mybatis.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:252)rn at org.springframework.test.context.support.AbstractGenericContextLoader.loadBeanDefinitions(AbstractGenericContextLoader.java:253)rn at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:122)rn at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)rn at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109)rn at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261)rn at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)rn at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)rn ... 25 morernCaused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:760)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)rn at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)rn at java.net.URLClassLoader.access$100(URLClassLoader.java:73)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:368)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:362)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:361)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:424)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:357)rn at org.springframework.transaction.config.TxAdviceBeanDefinitionParser.getBeanClass(TxAdviceBeanDefinitionParser.java:71)rn at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:66)rn at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:61)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1401)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:168)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:138)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)rn ... 38 morernCaused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptorrn at java.net.URLClassLoader.findClass(URLClassLoader.java:381)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:424)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:357)rn ... 61 morern请问是什么原因?rn 论坛

这个过程编译通过,但是执行报如下错,为什么?

12-03

程序:rnrncreate or replace procedure yjr004 isrnrn v_rowid varchar2(30);rn i number;rn v1 number;rn v_acct_month dw_key_target_js.acct_month%type;rn v_js_type dw_key_target_js.js_type%type;rn v_svc_id dw_key_target_js.svc_id%type;rn v_area_name dw_key_target_js.area_name%type;rn v_js_income dw_key_target_js.js_income%type;rn v_js_payout dw_key_target_js.js_payout%type;rn v_js_net_income dw_key_target_js.js_net_income%type;rn v_b_asp dw_key_target_js.b_asp%type;rnrnbeginrnrn for i in 1 .. 1000 looprn rn select no1,rn acct_month,rn js_type,rn svc_id,rn area_name,rn js_income,rn js_payout,rn js_net_income,rn b_asprn into v_rowid,rn v_acct_month,rn v_js_type,rn v_svc_id,rn v_area_name,rn v_js_income,rn v_js_payout,rn v_js_net_income,rn v_b_asprn from (select rownum no,rn rowid no1,rn acct_month,rn js_type,rn svc_id,rn area_name,rn js_income,rn js_payout,rn js_net_income,rn b_asprn from dw_key_target_js)rn where no = i;rn rn select count(*)rn into v1rn from dw_key_target_jsrn where acct_month = v_acct_monthrn and js_type = v_js_typern and svc_id = v_svc_idrn and area_name = v_area_namern and js_income = v_js_incomern and js_payout = v_js_payoutrn and js_net_income = v_js_net_incomern and b_asp = v_b_asp;rn rn if v1 > 1 then rn rn execute immediate 'delete from dw_key_target_js where rowid='||v_rowid;rn rn rn rn end if;rn end loop;rnend yjr004;rnrnrn编译通过,但是执行exec yjr004 报错:rnrnORA-00904: "AAAJRMAAHAAB3MNAAH": 标识符无效rnORA-06512: 在 "NEWEBA2.YJR004", line 64rnORA-06512: 在 line 2rn 论坛

androidstudio为啥连不上mysql呀,老报如下

08-13

源码:rnrn```rn bt1.setOnClickListener(new View.OnClickListener() rn @Overridern public void onClick(View view) rn System.out.println("进入点击事件!!!!!!!!!");rn new Thread(new Runnable()rn public void run()rn try rn System.out.println("进入线程!!!!!!!!");rn System.out.println("开始加载驱动");rn Class.forName("com.mysql.jdbc.Driver");rn System.out.println("驱动加载完成");rn java.sql.Connection cn= DriverManager.getConnection(rn "jdbc:mysql://192.168.0.106:3306/test","root",rn "root");rn System.out.println("链接数据库");rn String sql="select name from androidtest";rnrn Statement st=(Statement)cn.createStatement();rn ResultSet rs=st.executeQuery(sql);rn while(rs.next())//读表mytable中的每一列rn String mybook=rs.getString("name ");//读取的是B_Name这一列,传给mybookrn Log.i("MainActivity",mybook);rn rn cn.close();//一定要关闭rn st.close();rn rs.close();rn catch (ClassNotFoundException e) rn e.printStackTrace();rn catch (SQLException e) rn e.printStackTrace();rn rnrnrn rn ).start();rnrn rn```rn报错信息:rn```rn2019-08-13 16:04:24.442 29017-29017/com.example.androidmysqltext001 I/System.out: 进入点击事件!!!!!!!!!rn2019-08-13 16:04:24.447 29017-29418/com.example.androidmysqltext001 I/System.out: 进入线程!!!!!!!!rn2019-08-13 16:04:24.447 29017-29418/com.example.androidmysqltext001 I/System.out: 开始加载驱动rn2019-08-13 16:04:24.542 29017-29036/com.example.androidmysqltext001 I/zygote64: Do partial code cache collection, code=30KB, data=21KBrn2019-08-13 16:04:24.542 29017-29036/com.example.androidmysqltext001 I/zygote64: After code cache collection, code=26KB, data=20KBrn2019-08-13 16:04:24.542 29017-29036/com.example.androidmysqltext001 I/zygote64: Increasing code cache capacity to 128KBrn2019-08-13 16:04:24.608 29017-29418/com.example.androidmysqltext001 I/System.out: 驱动加载完成rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurern2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.lang.reflect.Constructor.newInstance0(Native Method)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:334)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.MysqlIO.(MysqlIO.java:356)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2502)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.lang.reflect.Constructor.newInstance0(Native Method)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:334)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.sql.DriverManager.getConnection(DriverManager.java:569)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at java.sql.DriverManager.getConnection(DriverManager.java:219)rn2019-08-13 16:06:31.922 29017-29418/com.example.androidmysqltext001 W/System.err: at com.example.androidmysqltext001.MainActivity$1$1.run(MainActivity.java:33)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.lang.Thread.run(Thread.java:784)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: Caused by: java.net.ConnectException: failed to connect to /192.168.0.106 (port 3306) from /:: (port 51602): connect failed: ETIMEDOUT (Connection timed out)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:138)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:129)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:357)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:201)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:183)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.Socket.connect(Socket.java:616)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.Socket.connect(Socket.java:565)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.Socket.(Socket.java:445)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at java.net.Socket.(Socket.java:248)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at com.mysql.jdbc.MysqlIO.(MysqlIO.java:306)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: ... 14 morern2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: Caused by: android.system.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at libcore.io.Linux.connect(Native Method)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:126)rn2019-08-13 16:06:31.923 29017-29418/com.example.androidmysqltext001 W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:152)rn2019-08-13 16:06:31.924 29017-29418/com.example.androidmysqltext001 W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:130)rn2019-08-13 16:06:31.924 29017-29418/com.example.androidmysqltext001 W/System.err: ... 25 morern``` 问答

tomcat报的一个错

11-09

程序正常运行了,采用的是S2SH框架,但是不知道为什么有这样的一个错误,很郁闷,程序又是可以运行的rnrn [code=Java]rnrn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.IllegalStateException: getOutputStream() has already been called for this responsern at org.apache.catalina.connector.Response.getWriter(Response.java:604)rn at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)rn at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)rn at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)rn at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191)rn at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:119)rn at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:78)rn at org.apache.jsp.random_jsp._jspService(random_jsp.java:146)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at net.diglove.www.filter.EncodingFilter.doFilter(EncodingFilter.java:26)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)rn at java.lang.Thread.run(Thread.java:595)rn [/code] 论坛

SPRING+HIBERNATE报空指针错.

06-25

type Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: Exception in JSP: /action.jsp:37rnrn34: message.setIsread(0);rn35: message.setSign(0);rn36: rn37: service.saveMessage(message);rn38: rn39: %>rn40: aarnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn com.test.service.MessageService.saveMessage(MessageService.java:22)rn org.apache.jsp.action_jsp._jspService(action_jsp.java:84)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.rnrn------------------------------------------------rnrnrnrnrn rnrn rn rn rn rn rn rnrn rn rn rn classpath:com\test\entity\rn rn rn rn org.hibernate.dialect.MySQLDialectrn truern truern 0rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn-------------------------------------------------rnpublic class MessageService rn private MessageDAO messageDAO; rn rn rn public MessageDAO getMessageDAO() rn return messageDAO;rn rnrnrn public void setMessageDAO(MessageDAO messageDAO) rn System.out.println("aaaaaa");rn this.messageDAO = messageDAO;rn rnrnrn public Message saveMessage(Message r)rn System.out.println("dddddd");rn messageDAO.saveMessage(r);rn return r;rn rnrn-------------------------------------------------------rnpublic class MessageDAO extends HibernateDaoSupportrn rn public Message saveMessage(Message r)rn tryrn System.out.println(this.getSessionFactory());rn this.getHibernateTemplate().saveOrUpdate(r);rn return r;rn catch (Exception e) rn e.printStackTrace();rn return null;rn rn rn 论坛

没有更多推荐了,返回首页