myeclipse 中建立mysql数据库连接,驱动程序jar是8.0版本的为什么为什么还是Driver class not found?

图片说明

mysql-connector-java-8.0.11.jar
在Dirver classname中下拉是空的
我的驱动是官网下载的没问题,问题在哪里??

1个回答

据说Driver name要和数据库名字一样,不能是mysql,你试试,可是我的还是报错。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
myeclipse 2016连接数据库的jar版本问题
myeclipse 2016连接数据库的jar版本问题,连接数据库,也导入jar了,可是运行时,跳转 java.lang.ClassNotFoundException: com.mysql.jdbc.Driverjava.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3307/test?useUnicode=true&character=utf-8
MyEclipse8.5 连接MYSQL5.5数据库的问题
<p>您好!我用MyEclipse8.5 + MySQL5.5 + win7环境下编写程序测试连接数据库的程序。但是出现以下问题:<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:148)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testInsert(jdbcTest1.java:62)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:149)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:150)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testUpdate(jdbcTest1.java:98)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:151)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:152)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testDelete(jdbcTest1.java:123)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:153)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:154)<br>用mysql-connector-java-5.1.20-bin的jar驱动</p> <p>程序代码如下:package MySQL;</p> <p><br>import java.sql.*;<br>public class jdbcTest1 {</p> <p> boolean bInited=false;<br> //加载驱动<br> public void initJdbc() throws ClassNotFoundException{<br> Class.forName("com.MySQL.jdbc.Driver");<br> bInited=true;<br> }<br> //获得数据库连接<br> public Connection getConnection() throws ClassNotFoundException,<br> SQLException{<br> if(!bInited)<br> initJdbc();<br> return DriverManager<br> .getConnection("jdbc:MySQL://localhost:3306/mytest?user=root&amp;password" +<br> "=mjf10086&amp;useUnicode=true&amp;charaterEncoding=gb2312");<br> //注意,这里的字符集与数据库的设置一致<br> }<br><br> public void testQuery(){<br> Connection conn=null;<br> Statement smt = null;<br> ResultSet rs=null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> String sql = "select*from table1";<br> rs = smt.executeQuery(sql);<br> while(rs.next()){<br> System.out.println("id:"+rs.getInt("_id")+"username:"<br> +rs.getString("_username")+"password:"<br> +rs.getString("_password")+"desc:"<br> +rs.getString("_desc"));<br> }<br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(rs!=null)<br> rs.close();<br> if(smt!=null)<br> smt.close();<br> if(conn!=null)<br> conn.close();<br><br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testInsert(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('马拉多纳','10','阿根廷足球运动员')");<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('坎通纳','7','法国足球运动员')");<br> smt<br> .execute("insert into table1(_username,__password,_desc)values" +<br> "('罗马里奥','11','巴西足球运动员')");<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('古利特','8','荷兰足球运动员')");<br><br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt !=null)<br> smt.close();<br> if(conn !=null)<br> conn.close();<br><br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testUpdate(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt<br> .execute("update table1 set _desc '阿根廷足球球员,一代球王'" +<br> "where _username='马拉多纳'");<br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt!=null)<br> smt.close();<br> if(conn!=null)<br> conn.close();<br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testDelete(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt.execute("delete from table1 where _username = '马拉多纳'");<br> smt.execute("delete from table1 where _username = '坎通纳'");<br> smt.execute("delete from table1 where _username = '罗马里奥'");<br> smt.execute("delete from table1 where _username = '古利特'");</p> <p> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt !=null)<br> smt.close();<br> if(conn !=null)<br> conn.close();<br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public static void main(String[] args){<br> jdbcTest1 jt1 = new jdbcTest1();<br> jt1.testQuery();<br> jt1.testInsert();<br> jt1.testQuery();<br> jt1.testUpdate();<br> jt1.testQuery();<br> jt1.testDelete();<br> jt1.testQuery();<br> }<br>}</p>
求解答:MyEclipse启动tomcat时出现错误,求解答?
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77) at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43) at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162) at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135) at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.StandardContext startInternal 严重: One or more listeners failed to start. Full details will be found in the appropriate container log file 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/wljx] startup failed due to previous errors 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 三月 23, 2020 8:49:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc 警告: The web application [wljx] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 三月 23, 2020 8:49:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 警告: The web application [wljx] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:502) java.util.TimerThread.mainLoop(Timer.java:526) java.util.TimerThread.run(Timer.java:505) 三月 23, 2020 8:49:16 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\myeclipse\MyEclipse2017\.metadata\.me_tcat85\webapps\wljx has finished in 20,379 ms 三月 23, 2020 8:49:16 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler [http-nio-8080] 三月 23, 2020 8:49:16 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler [ajp-nio-8009] 三月 23, 2020 8:49:16 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 40391 ms ``` ```
重量级问题!!java出了一个异常!环境是MyEclipse7.0 tomcate自带那个!
spring3.0+ibatis2.3.4+struts2.3.18+jmesa 异常如下: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d38953c, pid=4052, tid=3392 # # JRE version: 6.0_17-b04 # Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode windows-x86 ) # Problematic frame: # C [jdwp.dll+0x953c] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x0b29b000): JavaThread "http-8080-2" daemon [_thread_in_native, id=3392, stack(0x0c140000,0x0c190000)] siginfo: ExceptionCode=0xc0000005, reading address 0x00000045 Registers: EAX=0x00000000, EBX=0x0b39f280, ECX=0x00000006, EDX=0x00000004 ESP=0x0c18d40c, EBP=0x0c18d42c, ESI=0x00000045, EDI=0x0b6ed560 EIP=0x6d38953c, EFLAGS=0x00010202 Top of Stack: (sp=0x0c18d40c) 0x0c18d40c: 0c18d49c 6d3a114c 0b29b110 0b39f3d4 0x0c18d41c: 0b6d4530 0b5848c0 000017b4 0000050a 0x0c18d42c: 0c18d464 6d38de64 0b29b110 0ab1a850 0x0c18d43c: 0ab1d418 00000000 6d398cbf 008454e8 0x0c18d44c: 0ab1d418 00000000 6d38d700 0ab1d418 0x0c18d45c: 0c18d464 00000027 0c18d4d4 6d38e61b 0x0c18d46c: 0b29b110 008454e8 0ab1d418 008454e8 0x0c18d47c: 0ab1f544 0c18d49c 00000000 00000038 Instructions: (pc=0x6d38953c) 0x6d38952c: 0c 18 89 4d ec 8b 0d 80 42 3a 6d 8d 3c 08 eb 17 0x6d38953c: ff 36 ff 75 f0 ff 75 08 e8 d0 02 01 00 83 c4 0c Stack: [0x0c140000,0x0c190000], sp=0x0c18d40c, free space=309k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [jdwp.dll+0x953c] C [jdwp.dll+0xde64] C [jdwp.dll+0xe61b] V [jvm.dll+0x13c92f] V [jvm.dll+0xe9c33] j java.lang.ClassLoader.findBootstrapClass0(Ljava/lang/String;)Ljava/lang/Class;+19 j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+32 J java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; v ~StubRoutines::call_stub V [jvm.dll+0xecf9c] V [jvm.dll+0x1741d1] V [jvm.dll+0xed34a] V [jvm.dll+0xed43a] V [jvm.dll+0x1b647b] V [jvm.dll+0x1b69be] V [jvm.dll+0x1b6d75] V [jvm.dll+0x1b6dbb] V [jvm.dll+0x9ef96] V [jvm.dll+0x59a42] V [jvm.dll+0x5aea0] V [jvm.dll+0x5b1ee] v ~RuntimeStub::load_klass_patching Runtime1 stub J org.jmesa.worksheet.WorksheetImpl.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.facade.WorksheetWrapper.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.worksheet.editor.AbstractWorksheetEditor.getWorksheetColumn(Ljava/lang/Object;Ljava/lang/String;)Lorg/jmesa/worksheet/WorksheetColumn; J org.jmesa.worksheet.editor.HtmlWorksheetEditor.getValue(Ljava/lang/Object;Ljava/lang/String;I)Ljava/lang/Object; J org.jmesa.view.html.renderer.HtmlCellRendererImpl.render(Ljava/lang/Object;I)Ljava/lang/Object; J org.jmesa.view.html.HtmlSnippetsImpl.body()Ljava/lang/String; j org.jmesa.view.html.HtmlView.render()Ljava/lang/Object;+103 j org.jmesa.facade.tag.TableFacadeTag.doTag()V+414 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspx_meth_jmesa_005fstruts2TableFacade_005f0(Ljavax/servlet/jsp/PageContext;)Z+94 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+1013 j org.apache.jasper.runtime.HttpJspBase.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.jasper.servlet.JspServletWrapper.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V+395 j org.apache.jasper.servlet.JspServlet.serviceJspFile(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/lang/Throwable;Z)V+134 j org.apache.jasper.servlet.JspServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+436 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.ApplicationDispatcher.invoke(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+393 j org.apache.catalina.core.ApplicationDispatcher.processRequest(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+64 j org.apache.catalina.core.ApplicationDispatcher.doForward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+385 j org.apache.catalina.core.ApplicationDispatcher.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+55 j org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Ljava/lang/String;Lcom/opensymphony/xwork2/ActionInvocation;)V+263 j org.apache.struts2.dispatcher.StrutsResultSupport.execute(Lcom/opensymphony/xwork2/ActionInvocation;)V+19 j com.opensymphony.xwork2.DefaultActionInvocation.executeResult()V+47 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+221 j com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+201 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+6 j org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+202 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+200 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.MultiselectInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+121 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.CheckboxInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+197 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.FileUploadInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+90 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+73 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+179 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+322 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+178 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+106 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+466 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+228 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+1 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.PermissionInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+89 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.LoginInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+75 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.impl.StrutsActionProxy.execute()Ljava/lang/String;+20 ...<more frames>... Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j java.lang.ClassLoader.findBootstrapClass0(Ljava/lang/String;)Ljava/lang/Class;+19 j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+32 J java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; v ~StubRoutines::call_stub v ~RuntimeStub::load_klass_patching Runtime1 stub J org.jmesa.worksheet.WorksheetImpl.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.facade.WorksheetWrapper.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.worksheet.editor.AbstractWorksheetEditor.getWorksheetColumn(Ljava/lang/Object;Ljava/lang/String;)Lorg/jmesa/worksheet/WorksheetColumn; J org.jmesa.worksheet.editor.HtmlWorksheetEditor.getValue(Ljava/lang/Object;Ljava/lang/String;I)Ljava/lang/Object; J org.jmesa.view.html.renderer.HtmlCellRendererImpl.render(Ljava/lang/Object;I)Ljava/lang/Object; J org.jmesa.view.html.HtmlSnippetsImpl.body()Ljava/lang/String; j org.jmesa.view.html.HtmlView.render()Ljava/lang/Object;+103 j org.jmesa.facade.tag.TableFacadeTag.doTag()V+414 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspx_meth_jmesa_005fstruts2TableFacade_005f0(Ljavax/servlet/jsp/PageContext;)Z+94 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+1013 j org.apache.jasper.runtime.HttpJspBase.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.jasper.servlet.JspServletWrapper.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V+395 j org.apache.jasper.servlet.JspServlet.serviceJspFile(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/lang/Throwable;Z)V+134 j org.apache.jasper.servlet.JspServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+436 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.ApplicationDispatcher.invoke(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+393 j org.apache.catalina.core.ApplicationDispatcher.processRequest(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+64 j org.apache.catalina.core.ApplicationDispatcher.doForward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+385 j org.apache.catalina.core.ApplicationDispatcher.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+55 j org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Ljava/lang/String;Lcom/opensymphony/xwork2/ActionInvocation;)V+263 j org.apache.struts2.dispatcher.StrutsResultSupport.execute(Lcom/opensymphony/xwork2/ActionInvocation;)V+19 j com.opensymphony.xwork2.DefaultActionInvocation.executeResult()V+47 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+221 j com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+201 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+6 j org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+202 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+200 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.MultiselectInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+121 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.CheckboxInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+197 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.FileUploadInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+90 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+73 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+179 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+322 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+178 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+106 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+466 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+228 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+1 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.PermissionInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+89 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.LoginInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+75 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.impl.StrutsActionProxy.execute()Ljava/lang/String;+20 j org.apache.struts2.dispatcher.Dispatcher.serviceAction(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;Lorg/apache/struts2/dispatcher/mapper/ActionMapping;)V+212 j org.apache.struts2.dispatcher.FilterDispatcher.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+285 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+117 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+794 j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+285 j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64 j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6 j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42 j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157 j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432 j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82 j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41 j java.lang.Thread.run()V+11 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0b46f800 JavaThread "pool-1-thread-1" [_thread_blocked, id=1668, stack(0x0c2d0000,0x0c320000)] 0x0b45a400 JavaThread "http-8080-6" daemon [_thread_blocked, id=3436, stack(0x0c280000,0x0c2d0000)] 0x0b466800 JavaThread "http-8080-5" daemon [_thread_in_native, id=3184, stack(0x0c230000,0x0c280000)] 0x0b69a800 JavaThread "http-8080-4" daemon [_thread_blocked, id=4068, stack(0x0c1e0000,0x0c230000)] 0x0b898000 JavaThread "http-8080-3" daemon [_thread_blocked, id=2748, stack(0x0c190000,0x0c1e0000)] =>0x0b29b000 JavaThread "http-8080-2" daemon [_thread_in_native, id=3392, stack(0x0c140000,0x0c190000)] 0x0b31d400 JavaThread "MySQL Statement Cancellation Timer" daemon [_thread_blocked, id=4092, stack(0x0c0f0000,0x0c140000)] 0x0b6e8400 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" daemon [_thread_blocked, id=2936, stack(0x0c0a0000,0x0c0f0000)] 0x0b375800 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" daemon [_thread_blocked, id=3556, stack(0x0c050000,0x0c0a0000)] 0x0b375400 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon [_thread_blocked, id=2120, stack(0x0c000000,0x0c050000)] 0x0b1f4400 JavaThread "Timer-0" daemon [_thread_blocked, id=472, stack(0x0bfb0000,0x0c000000)] 0x0b157800 JavaThread "http-8080-1" daemon [_thread_in_native, id=3480, stack(0x0bf60000,0x0bfb0000)] 0x0b161c00 JavaThread "TP-Monitor" daemon [_thread_blocked, id=1756, stack(0x0bf10000,0x0bf60000)] 0x0b6c3800 JavaThread "TP-Processor4" daemon [_thread_in_native, id=2100, stack(0x0bec0000,0x0bf10000)] 0x0b16c400 JavaThread "TP-Processor3" daemon [_thread_blocked, id=1552, stack(0x0be70000,0x0bec0000)] 0x0b17a000 JavaThread "TP-Processor2" daemon [_thread_blocked, id=2064, stack(0x0be20000,0x0be70000)] 0x0b165400 JavaThread "TP-Processor1" daemon [_thread_blocked, id=1316, stack(0x0bdd0000,0x0be20000)] 0x0b191400 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=2584, stack(0x0bd80000,0x0bdd0000)] 0x0b1aec00 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=3560, stack(0x0bd30000,0x0bd80000)] 0x0ab2f000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3496, stack(0x0ae70000,0x0aec0000)] 0x0ab20800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3432, stack(0x0ae20000,0x0ae70000)] 0x0ab1d800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=1884, stack(0x0add0000,0x0ae20000)] 0x0ab1bc00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=2956, stack(0x0ad80000,0x0add0000)] 0x0ab19800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=2572, stack(0x0ad30000,0x0ad80000)] 0x0ab0a400 JavaThread "Attach Listener" daemon [_thread_blocked, id=2528, stack(0x0acc0000,0x0ad10000)] 0x0ab22800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1740, stack(0x0ac70000,0x0acc0000)] 0x0aaf8400 JavaThread "Finalizer" daemon [_thread_blocked, id=2692, stack(0x0ac20000,0x0ac70000)] 0x0aaf3800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2268, stack(0x0abd0000,0x0ac20000)] 0x00847000 JavaThread "main" [_thread_in_native, id=264, stack(0x008e0000,0x00930000)] Other Threads: 0x0aaf0800 VMThread [stack: 0x0ab80000,0x0abd0000] [id=3036] 0x0ab42c00 WatcherThread [stack: 0x0aec0000,0x0af10000] [id=2456] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 2560K, used 1364K [0x029e0000, 0x02ca0000, 0x02ec0000) eden space 2304K, 48% used [0x029e0000, 0x02af5110, 0x02c20000) from space 256K, 100% used [0x02c60000, 0x02ca0000, 0x02ca0000) to space 256K, 0% used [0x02c20000, 0x02c20000, 0x02c60000) tenured generation total 33628K, used 25061K [0x02ec0000, 0x04f97000, 0x069e0000) the space 33628K, 74% used [0x02ec0000, 0x047397f8, 0x04739800, 0x04f97000) compacting perm gen total 28416K, used 28380K [0x069e0000, 0x085a0000, 0x0a9e0000) the space 28416K, 99% used [0x069e0000, 0x08597098, 0x08597200, 0x085a0000) No shared spaces configured. Dynamic libraries: 0x00400000 - 0x00424000 D:\JAVA\jre6\bin\javaw.exe 0x7c920000 - 0x7c9b3000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll 0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll 0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll 0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll 0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll 0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL 0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL 0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll 0x7c340000 - 0x7c396000 D:\JAVA\jre6\bin\msvcr71.dll 0x6d800000 - 0x6da8b000 D:\JAVA\jre6\bin\client\jvm.dll 0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll 0x6d7b0000 - 0x6d7bc000 D:\JAVA\jre6\bin\verify.dll 0x6d330000 - 0x6d34f000 D:\JAVA\jre6\bin\java.dll 0x6d290000 - 0x6d298000 D:\JAVA\jre6\bin\hpi.dll 0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL 0x6d380000 - 0x6d3a9000 D:\JAVA\jre6\bin\jdwp.dll 0x6d6a0000 - 0x6d6a6000 D:\JAVA\jre6\bin\npt.dll 0x6d7f0000 - 0x6d7ff000 D:\JAVA\jre6\bin\zip.dll 0x6d200000 - 0x6d207000 D:\JAVA\jre6\bin\dt_socket.dll 0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll 0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll 0x719c0000 - 0x719fe000 C:\WINDOWS\System32\mswsock.dll 0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll 0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll 0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll 0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll 0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll 0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll 0x6d610000 - 0x6d623000 D:\JAVA\jre6\bin\net.dll 0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll 0x759d0000 - 0x75a7f000 C:\WINDOWS\system32\USERENV.dll 0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\netapi32.dll 0x6d560000 - 0x6d569000 D:\JAVA\jre6\bin\management.dll VM Arguments: jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:3259 -Dcatalina.home=E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat -Dcatalina.base=E:\hrpa\.metadata\.me_tcat -Djava.endorsed.dirs=E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat/common/endorsed -Djava.io.tmpdir=E:\hrpa\.metadata\.me_tcat\temp -Djava.library.path=D:\JAVA\jre6\bin;E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat\bin -Dsun.io.useCanonCaches=false java_command: org.apache.catalina.startup.Bootstrap start Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=D:\JAVA CLASSPATH=.;D:\JAVA\lib\tools.jar;D:\JAVA\lib\dt.jar; PATH=e:/Program Files/Genuitec/Common/binary/com.sun.java.jre.win32.x86_1.5.0.011/bin/client;e:/Program Files/Genuitec/Common/binary/com.sun.java.jre.win32.x86_1.5.0.011/bin;;D:\JAVA\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Gemplus\GemSafe Libraries\BIN\;D:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\PROGRA~1\StormII\Codec;C:\PROGRA~1\StormII USERNAME=Edwin OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel --------------- S Y S T E M --------------- OS: Windows XP Build 2600 Service Pack 3 CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 6 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3 Memory: 4k page, physical 2088432k(638876k free), swap 4194303k(4194303k free) vm_info: Java HotSpot(TM) Client VM (14.3-b01) for windows-x86 JRE (1.6.0_17-b04), built on Oct 11 2009 00:52:06 by "java_re" with MS VC++ 7.1 time: Mon Apr 19 17:06:13 2010 elapsed time: 346 seconds
Web项目部署在tomcat上,当执行到访问数据库操作时会报JDBCUtil初始化失败!
本人在是刚入门的小白。。在学习中,一直在陆续的写这个练手的项目-ebook,前几天的时候运行的都很正常,突然今天一运行就报错。。这是在MyEclipse中将项目部署在tomcat上的不过不是自带的tomcat,自己加的插件。 异常如下: ``` HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.itany.jdbc.util.JDBCUtil org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:294) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.NoClassDefFoundError: Could not initialize class com.itany.jdbc.util.JDBCUtil com.itany.jdbc.util.JDBCTemplate.query(JDBCTemplate.java:103) com.itany.ebook.dao.impl.ManagerDaoImpl.queryManagerById(ManagerDaoImpl.java:62) com.itany.ebook.service.impl.ManagerServiceImpl.queryManagerById(ManagerServiceImpl.java:44) com.itany.ebook.action.LoginAction.login(LoginAction.java:31) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ``` 我的datasource.properties配置文件如下: driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://127.0.0.1:3306/ebook?useUnicode=true&characterEncoding=utf8 username=root password= maxActive=10 initialSize=10 maxWait=5000 这是我的jar包以及刚刚异常的截图: ![图片说明](https://img-ask.csdn.net/upload/201610/01/1475332054_242487.png) ![图片说明](https://img-ask.csdn.net/upload/201610/01/1475332143_619533.png) 求大神。。膜拜膜拜!~~~~~~~~
天哪撸,哪位大神解救这个问题?!
这都是些什么,朋友传给我的jsp工程文件跑不起来,好像缺什么东西,谁能解答下? ``` 六月 09, 2016 4:25:49 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\sun\AppData\Local\MyEclipse 2016 CI\binary\com.sun.java.jdk8.win32.x86_64_1.8.0.u66\bin;C:\Users\sun\AppData\Local\MyEclipse 2016 CI\plugins\com.genuitec.eclipse.server.embedded.tomcat.core_13.0.0.me201602031002\tomcat70\bin 六月 09, 2016 4:25:50 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-80"] 六月 09, 2016 4:25:50 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 六月 09, 2016 4:25:50 下午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1751 ms 六月 09, 2016 4:25:50 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 六月 09, 2016 4:25:50 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.56 六月 09, 2016 4:25:50 下午 org.apache.catalina.startup.HostConfig deployWAR 信息: Deploying web application archive C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\ydgl.war 六月 09, 2016 4:25:51 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\ydgl\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class 六月 09, 2016 4:25:55 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.fckeditor.net is already defined 六月 09, 2016 4:25:55 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags/form is already defined 六月 09, 2016 4:25:55 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags is already defined 六月 09, 2016 4:25:55 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. 六月 09, 2016 4:26:00 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: entity class not found: com.model.TGoods Caused by: org.hibernate.MappingException: entity class not found: com.model.TGoods at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:99) at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: com.model.TGoods at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96) ... 36 more 六月 09, 2016 4:26:00 下午 org.apache.catalina.core.StandardContext startInternal 严重: Error listenerStart 六月 09, 2016 4:26:00 下午 org.apache.catalina.util.SessionIdGenerator createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [333] milliseconds. 六月 09, 2016 4:26:00 下午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/ydgl] startup failed due to previous errors 六月 09, 2016 4:26:00 下午 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 六月 09, 2016 4:26:00 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/ydgl] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 六月 09, 2016 4:26:00 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/ydgl] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. 六月 09, 2016 4:26:00 下午 org.apache.catalina.startup.HostConfig deployWAR 信息: Deployment of web application archive C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\ydgl.war has finished in 10,295 ms 六月 09, 2016 4:26:00 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\docs 六月 09, 2016 4:26:01 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\docs has finished in 149 ms 六月 09, 2016 4:26:01 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\examples 六月 09, 2016 4:26:01 下午 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 六月 09, 2016 4:26:01 下午 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 六月 09, 2016 4:26:01 下午 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1874e570') 六月 09, 2016 4:26:01 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\examples has finished in 588 ms 六月 09, 2016 4:26:01 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory C:\Users\sun\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\host-manager 六月 09, 2016 4:26:01 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory C:\Users\sun\Workspaces\MyEc ```
SSH-hibernate4.3.8-HibernateSessionFactory.java
-------------------------------------------------------------- 初学者问题: 1)web开发,哪里有靠谱的HibernateSessionFactory.java 及其对应的hibernate.cfg.xml?感觉自己手上的这两个文件的问题多多,各种debug,很耗时间 2) hibernate的jar包要放WEB-INF/lib目录下?又或者跟hibernate.cfg.xml里面的某个property的设置有关? sever一开始起不来,网上搜了下,把hibernate的jar包要放WEB-INF/lib目录下,server就可以起来了。奇怪,struts的jar放WEB-INF/lib目录下可以理解,怎么hibernate的也要放在这个目录下? -------------------------------------------------------------- 开发环境 eclipse: Luna Service Release 1a (4.4.1) mysql: 5.6 struts: 2.3.20 hibernate: 4.3.8 -------------------------------------------------------------- 现象: 第一次从web访问,正常。说明struts, mysql工作都是正常的。 第二次起从web访问,报下面的错误。 将下面的代码注释掉后,再从web访问,每次正常了。问题是:一直不close SessionFactory 不会有问题吗? 是否要优化HibernateSessionFactory.java? HibernateTestAction.java ``` //sf.close(); 即SessionFactory一直不close ``` ``` Debug - execute - after getSessionFactory Debug - execute - throw exception at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:201) at org.hibernate.internal.AbstractSessionImpl.getJdbcConnectionAccess(AbstractSessionImpl.java:341) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.<init>(JdbcCoordinatorImpl.java:114) at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.<init>(TransactionCoordinatorImpl.java:89) at org.hibernate.internal.SessionImpl.<init>(SessionImpl.java:258) ``` -------------------------------------------------------------- 代码: HibernateSessionFactory.java ``` package hibernate; import org.hibernate.HibernateException; import org.hibernate.Interceptor; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; /** * Configures and provides access to Hibernate sessions, tied to the current * thread of execution. Follows the Thread Local Session pattern, see * {@link http://hibernate.org/42.html }. */ public class HibernateSessionFactory { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { System.out.println("sessionFactory - on buildSessionFactory"); try { Configuration cfg = new Configuration().configure(); StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() .applySettings(cfg.getProperties()).build(); SessionFactory sessionFactory = cfg.buildSessionFactory(serviceRegistry); return sessionFactory; } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed System.out.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { System.out.println("sessionFactory - on getSessionFactory"); if (sessionFactory == null) System.out.println("build sessionFactory - fail"); else System.out.println("build sessionFactory - succe"); return sessionFactory; } } ``` hibernate.cfg.xml ``` <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration> <session-factory> <!-- <property name="hibernate.transaction.factory_class"> org.hibernate.transaction.JTATransactionFactory </property> <property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property> --> <property name="cache.use_query_cache">true</property> <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <property name="cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property> <property name="connection.username">root</property> <property name="connection.password">admin</property> <property name="connection.url"> jdbc:mysql://localhost:3306/db_database10 </property> <property name="dialect"> org.hibernate.dialect.MySQLDialect </property> <property name="cache.use_query_cache">true</property> <property name="cache.provider_class"> org.hibernate.cache.HashtableCacheProvider </property> <property name="show_sql">true</property> <property name="connection.driver_class"> com.mysql.jdbc.Driver </property> <mapping resource="mapping.xml" /> </session-factory> </hibernate-configuration> ``` HibernateTestAction.java ``` public class HibernateTestAction extends ActionSupport implements ModelDriven<Book> { ... public String execute() { SessionFactory sf = HibernateSessionFactory.getSessionFactory(); try { System.out.println("Debug - execute - after getSessionFactory "); Session s = sf.openSession(); s.beginTransaction(); System.out.println("Debug - execute - after beginTransaction "); String hql = "from Book"; Query query; query = s.createQuery(hql); List<Book> books = query.list(); dataMap.put("data", books); System.out.println("Debug - execute - query.list "); for(Book bookTemp: books) { System.out.println(bookTemp.toString()); } s.getTransaction().commit(); System.out.println("Debug - execute - after commit"); s.close(); } catch (Exception e) { // TODO Auto-generated catch block System.out.println("Debug - execute - throw exception "); e.printStackTrace(); } sf.close(); dataMap.put("status", "SUCCESS"); return SUCCESS; } ... } ``` --------------------------------------------------------------
Hibernate链接数据库出现未见过的错误
一直使用SSH框架都很正常,前几天朋友让我当他面做个Hibernate的例子,当场就报了这个奇怪的错误。 然后再MyEclipse中调用之前写的Hibernate例子,也无法运行。 在MyEclipse的package explorer中,有好多以前写的例子,都是能顺利运行的,现在情况是SSH框架,JDBC的都可以单独运行,唯独纯Hibernate写的无法运行。 程序如下: package com.test; import java.util.Date; public class User { private int id; private String name; private Date birthday; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } } <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.test"> <class name="User"> <id name="id"> <generator class="native"/> </id> <property name="name" length="100"/> <property name="birthday"/> </class> </hibernate-mapping> hibernate.cfg.xml <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3060/hibernatetrain</property> <property name="connection.username">root</property> <property name="connection.password">123456</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hbm2ddl.auto">create</property> <mapping resource="com/test/User.hbm.xml" /> </session-factory> </hibernate-configuration> 测试程序: package com.test; import java.util.Date; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; public class TestUser { public static void main(String [] args){ Configuration cfg = new Configuration(); cfg.configure(); SessionFactory sf = cfg.buildSessionFactory(); Session s = sf.openSession(); Transaction tx = s.beginTransaction(); User user = new User(); user.setName("Hoffman"); user.setBirthday(new Date()); s.save(user); tx.commit(); s.close(); } } 以上数据库链接,用户名和密码都是多次检查的,没有问题。 在Transaction tx = s.beginTransaction();这步,出现了以下错误: log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290) at com.test.TestUser.main(TestUser.java:19) Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666) at com.mysql.jdbc.Connection.<init>(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290) at com.test.TestUser.main(TestUser.java:19) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago. at com.mysql.jdbc.Connection.createNewIO(Connection.java:2741) at com.mysql.jdbc.Connection.<init>(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) ... 5 more 以上的例子,新建工程,连同样的数据库,手动建表,用JDBC就能插入数据。后来我又建立新的工程,用Spring来管理Hibernate的SessionFactory链接相同的数据库,依旧正常。唯独这个纯Hibernate工程,始终抱着个错误! 我用的是MyEclipse 8,自导入Hibernate 3.2的jar包。 后来我取消了Hibernate的自动建表配置,手动建了表,还是出现同样的错误。以前出现Connection refused: connect错误,我检查数据库链接就OK,但是这次能查的地方都查了,数据库服务也是启动的,就是找不出任何原因导致这样的错误。 我怀疑是MySQL数据库,但是把这个例子链接同事机器的库依然报出相同的错误。 各位朋友,很抱歉我没有积分了,无法给大家加分,但还是希望有人能帮助我解决这个问题,抱歉。
ssh使用tomcat中配置好的c3p0数据源报错
tomcat中对应项目的xml文件配置为: ``` <?xml version="1.0" encoding="UTF-8"?> <Context path="/Village" docBase="D:\Workspaces\MyEclipse 10\webproject\Village\WebRoot" reloadable= "true" privileged="true"> <Resource name="jdbc/village" auth="Container" type="com.mchange.v2.c3p0.ComboPooledDataSource" factory="org.apache.naming.factory.BeanFactory" driverClass="com.mysql.jdbc.Driver" jdbcUrl="jdbc:mysql://localhost:3306/village" user="root" password="0510" minPoolSize="10" maxPoolSize="200" maxIdleTime="1000" idleConnectionTestPeriod="10" initialPoolSize="5" /> </Context> ``` spring中引入数据源配置如下: ``` <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"><value>java:comp/env/jdbc/village</value></property> </bean> ``` 项目刚刚运行时没有问题,但是过一段时间后就会不停的报如下错误: ``` Illegal access: this web application instance has been stopped already. Could not load com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:980) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1406) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1378) at com.mchange.v2.resourcepool.BasicResourcePool.cullExpired(BasicResourcePool.java:1462) at com.mchange.v2.resourcepool.BasicResourcePool.access$1900(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1937) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Exception in thread "Timer-1" java.lang.NoClassDefFoundError: com/mchange/v2/resourcepool/BasicResourcePool$1DestroyResourceTask at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:980) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1406) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1378) at com.mchange.v2.resourcepool.BasicResourcePool.cullExpired(BasicResourcePool.java:1462) at com.mchange.v2.resourcepool.BasicResourcePool.access$1900(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1937) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ... 8 more ``` tomcat的lib中已经添加了c3p0-0.9.2.1.jar 包
myeclipse导入eclipse项目报错,依赖报错,
这个项目在别人eclipse那里部署成功,所以不是代码问题 报错信息: Error creating bean with name 'attachmentController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.jeefw.service.sys.AttachmentService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, lookup=, authenticationType=CONTAINER)} 配置文件内容: ``` <context:annotation-config /> <context:component-scan base-package="com.jeefw.controller.sys,com.jeefw.dao.sys,com.jeefw.model.sys,com.jeefw.service.sys" /> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="com.mysql.jdbc.Driver" /> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/jeefw?useUnicode=true&amp;characterEncoding=utf-8" /> <property name="user" value="root" /> <property name="password" value="123456" /> <!-- SQL Server数据库配置 --> <!-- <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /> <property name="jdbcUrl" value="jdbc:sqlserver://localhost:1433;DatabaseName=jeefw" /> <property name="user" value="sa" /> <property name="password" value="123456" /> --> <!-- Oracle数据库配置 --> <!-- <property name="driverClass" value="oracle.jdbc.driver.OracleDriver" /> <property name="jdbcUrl" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl" /> <property name="user" value="SYSTEM" /> <property name="password" value="SkyNet888999" /> --> <property name="acquireIncrement" value="3" /> <property name="idleConnectionTestPeriod" value="120" /> <property name="initialPoolSize" value="3" /> <property name="minPoolSize" value="3" /> <property name="maxPoolSize" value="15" /> <property name="numHelperThreads" value="3" /> <property name="preferredTestQuery" value="select 1" /> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop> <!-- SQL Server的Dialect方言配置 --> <!-- <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop> --> <!-- Oracle的Dialect方言配置 --> <!-- <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop> --> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.use_outer_join">true</prop> <prop key="hibernate.jdbc.fetch_size">30</prop> <prop key="hibernate.jdbc.batch_size">30</prop> <prop key="hibernate.jdbc.batch_versioned_data">true</prop> <prop key="hibernate.cache.use_second_level_cache">true</prop> <prop key="hibernate.cache.use_query_cache">true</prop> <prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop> <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory</prop> <prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate4.SpringSessionContext</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="javax.persistence.validation.mode">none</prop> <!-- 此注释里代码只跟全文检索有关,如需全文检索功能,放开注释,然后找到本文件的第87行和web.xml的第15行放开注释,重启应用服务器即可。可配置,不影响框架使用。苹果Mac电脑需要修改hibernate.search.default.indexBase参数。 --> <!-- <prop key="hibernate.search.default.directory_provider">filesystem</prop> <prop key="hibernate.search.default.indexBase">D:/JeefwLuceneIndexes</prop> <prop key="hibernate.search.default.refresh">1800</prop> <prop key="hibernate.search.default.indexwriter.max_merge_docs">100</prop> <prop key="hibernate.search.default.indexwriter.ram_buffer_size">64</prop> <prop key="hibernate.search.default.optimizer.operation_limit.max">1000</prop> <prop key="hibernate.search.default.optimizer.transaction_limit.max">100</prop> --> </props> </property> <property name="dataSource" ref="dataSource" /> <property name="packagesToScan"> <list> <value>com.jeefw.model</value> </list> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <tx:annotation-driven transaction-manager="transactionManager" /> <!-- 此注释里代码的作用是应用服务器每次启动都生成索引。在SystemInitListener里执行。可配置,不影响框架使用。 --> <!-- <bean id="informationService" class="com.jeefw.service.sys.impl.InformationServiceImpl" /> --> <bean id="indexingInformationJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="informationServiceImpl" /> <property name="targetMethod" value="indexingInformation" /> </bean> <!-- 每天凌晨2点执行定时任务,生成索引。 --> <bean id="indexingInformationJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <property name="jobDetail" ref="indexingInformationJob" /> <property name="cronExpression" value="0 0 2 * * ?" /> </bean> <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false"> <property name="triggers"> <list> <ref bean="indexingInformationJobTrigger" /> </list> </property> </bean> <bean id="updateUserPwdLogicBean" class="com.app.logic.UpdateUserPwdLogicServer" /> <!-- 配置业务逻辑池 --> <bean id="logicExecuteWorkerEnginBean" class="com.app.logic.LogicExecuteWorkerEngine"> <property name="requestBeanTrans"> <map> <entry key="1302"> <value>com.app.bean.UpdateUserPwdRequestBean</value> </entry> </map> </property> <property name="logicPool"> <map> <entry key="1302"> <ref bean="updateUserPwdLogicBean" /> </entry> </map> </property> </bean> <!-- 配置接口传输操作协议对象 --> <bean id="transmissionBean" class="com.app.logic.Transmission"> </bean> ``` 数据源配置的密码我填的是错的密码,它不报数据库的错,却报这个错 换过tomcat的版本,也没用 我部署这个项目是通过在myeclipse里面新建一个web项目,然后把要用的文件夹一个一个copy过来的,配置文件和jar包也是,整个项目的配置我只改动了数据源的密码
spring jdbc 连接错误,急求大神解答
错误信息:java.lang.NoClassDefFoundError: Could not initialize class org.springframework.jdbc.core.StatementCreatorUtils 代码: package com.xiaoming.spring.jdbc.dao; import javax.annotation.Resource; import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import com.xiaoming.spring.jdbc.model.User; @Repository("userDao") public class UserDao implements IUserDao{ private JdbcTemplate jdbcTemplate; @Resource(name="dataSource") public void setJdbcTemplate(DataSource dataSource) { this.jdbcTemplate = new JdbcTemplate(dataSource); } public JdbcTemplate getJdbcTemplate() { return jdbcTemplate; } @Override public void insert(User user) { jdbcTemplate.update("insert into tab_user(username,password) values (?,?)", user.getUsername(),user.getPassword()); System.out.println("插入"+user); } @Override public void query(int id) { // TODO Auto-generated method stub } @Override public void del(int id) { // TODO Auto-generated method stub } @Override public void update(User user) { // TODO Auto-generated method stub } } beans: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> <context:annotation-config> </context:annotation-config> <context:component-scan base-package="com.xiaoming.spring.jdbc"></context:component-scan> <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}"></property> <property name="url" value="${jdbc.url}"></property> <property name="username" value="${jdbc.username}"></property> <property name="password" value="${jdbc.password}"></property> </bean> <context:property-placeholder location="jdbc.properties"/> </beans> 配置文件: jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url = jdbc:mysql://localhost:3306/spring_teach jdbc.username = root jdbc.password = 2013 补充说明:我用的的MyEclipse for spring 2014,不过有很多jar文件都要自己导入的,mysql 的驱动包我已经导入
集成spring,出错了,错误十分奇怪!!!!郁闷。
用的是mysql驱动,mysql连接正常,没有集成前有用hibernate建过表。为什么会提示有Oracle驱动的错误。 [INFO ] main 2009-04-23 08:42:42,546 org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider [WARN ] main 2009-04-23 08:43:04,077 org.hibernate.util.JDBCExceptionReporter - SQL Error: 17002, SQLState: null [ERROR] main 2009-04-23 08:43:04,077 org.hibernate.util.JDBCExceptionReporter - Io 异常: The Network Adapter could not establish the connection [WARN ] main 2009-04-23 08:43:04,093 org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39) at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159) at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:217) at org.logicalcobwebs.proxool.ProxoolDataSource.getConnection(ProxoolDataSource.java:97) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:777) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:703) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1012) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1012) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) [b]问题补充:[/b] 配置: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3307/login"/> <property name="username" value="root"/> <property name="password" value="root"/> </bean> <!-- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver"> </property> <property name="url" value="jdbc:derby://localhost:1527/myeclipse;create=true"> </property> <property name="username" value="classiccars"></property> <property name="password" value="myeclipse"></property> </bean> --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> </props> </property> <property name="mappingResources"> <list> <value>com/fsti/userLogin/model/User.hbm.xml</value></list> </property> </bean> </beans> [b]问题补充:[/b] clean 完还是一样的异常 [b]问题补充:[/b] 驱动的jar,我有啊,我今天还去官网下个一样的版本。 [b]问题补充:[/b] 好的,我试试另一个驱动,谢谢你们两个了。huangnetian,lovewhzlq [b]问题补充:[/b] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752) 这个事怎么回事,我怎么想都想不通啊。 User.hbm.xml没有问题,在集成前,我有用这个建过表。
Spring hibernate 整合问题
2009-3-17 14:24:38 org.apache.catalina.core.AprLifecycleListener init 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jre1.6.0_04\bin;D:\Program Files\MyEclipse 6.0\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin 2009-3-17 14:24:38 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2009-3-17 14:24:38 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 994 ms 2009-3-17 14:24:38 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2009-3-17 14:24:38 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.13 log4j:WARN No such property [conversionPattern] in org.apache.log4j.TTCCLayout. 2009-3-17 14:24:40 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2009-03-17 14:24:40 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization started 2009-03-17 14:24:41 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1d0e2c9: display name [Root WebApplicationContext]; startup date [Tue Mar 17 14:24:41 CST 2009]; root of context hierarchy 2009-03-17 14:24:41 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml] 2009-03-17 14:24:42 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1d0e2c9]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663 2009-03-17 14:24:42 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663: defining beans [sessionFactorys,registerOperatorDAO,registerOperatorService,registerOperatorAction]; root of factory hierarchy 2009-03-17 14:24:42 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663: defining beans [sessionFactorys,registerOperatorDAO,registerOperatorService,registerOperatorAction]; root of factory hierarchy 2009-03-17 14:24:42 [org.springframework.web.context.ContextLoader]-[ERROR] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactorys' defined in URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 40 more Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 42 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 51 more 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactorys' defined in URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 40 more Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 42 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 51 more 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext start 严重: Context [/supermarket] startup failed due to previous errors 2009-3-17 14:24:42 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2009-3-17 14:24:43 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2009-3-17 14:24:43 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2009-3-17 14:24:43 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2009-3-17 14:24:43 org.apache.catalina.startup.Catalina start 信息: Server startup in 4940 ms 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" default-autowire="byName"> <bean name="sessionFactorys" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation" value="classpath:hibernate.cfg.xml"> </property> </bean> <bean name="registerOperatorDAO" class="org.xsd.supermarket.system.operator.operator.impl.OperatorDAOImpl"> <property name="sessionFactorys" ref="sessionFactorys"></property> </bean> <bean name="registerOperatorService" class="org.xsd.supermarket.system.operator.operator.impl.OperatorServicesImpl"> <property name="registerOperatorDAO" ref="registerOperatorDAO"></property> </bean> <bean name="registerOperatorAction" class="org.xsd.supermarket.system.operator.operator.OperatorAction"> <property name="registerOperatorService" ref="registerOperatorService"></property> </bean> </beans> 用到的JAR包如下: <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate/hibernate3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring/spring.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/commons-logging-1.0.4.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/freemarker-2.3.13.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/ognl-2.6.11.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/struts2-core-2.1.6.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/struts2-spring-plugin-2.1.6.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/xwork-2.1.2.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/log4j-1.2.14.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/mysql-connector-java-5.0.5-bin.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/commons-beanutils.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/dom4j-1.6.1.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/jaxen-1.1-beta-7.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/cglib-nodep-2.1_3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-commons-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-util-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/jta.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/aspectjweaver.jar"/>
严重: Error deploying web application directory Orde
2009-2-24 19:24:57 org.apache.commons.modeler.Registry registerComponent 严重: Null component Catalina:type=JspMonitor,WebModule=//localhost/OrderTickets,J2EEApplication=none,J2EEServer=none 2009-2-24 19:24:57 org.apache.catalina.startup.HostConfig deployDirectories 严重: Error deploying web application directory OrderTickets java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V at org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94) at org.apache.catalina.session.ManagerBase.init(ManagerBase.java:627) at org.apache.catalina.session.StandardManager.start(StandardManager.java:639) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:315) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) 2009-2-24 19:24:57 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 请各位大虾帮我解答一下,小弟不胜感激!!!!! [b]问题补充:[/b] classpath路径: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-dbcp-1.1.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-digester.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-fileupload.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-pool-1.1.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-validator.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jakarta-oro.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-5.0.7-bin.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts-legacy.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts.jar"/> <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> </classpath>
hibernate 日志异常
最近学习hibernate,看书感觉可以,实际操作怎么就那么难呢! 我用的是:hibernate3.2 eclipse3.3 (没有Myeclipse插件) Mysql6.0 一:main()函数 package org.first; import org.hibernate.*; import org.hibernate.cfg.*; public abstract class FirstM { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Configuration conf=new Configuration().configure(); SessionFactory sf=conf.buildSessionFactory(); Session sess=sf.openSession(); Transaction tx=sess.beginTransaction(); FirstBean fb=new FirstBean(); fb.setUserId(12); fb.setUserName("thmei123"); sess.save(fb); tx.commit(); sess.close(); } } 二:持久化类:很简单,一个主键userId,和一个属性userName; public class FirstBean { private int userId; private String userName; public void setUserId(int userId) { this.userId=userId; } public int getUserid() { return this.userId; } public void setUserName(String userName) { this.userName=userName; } public String getUserName() { return this.userName; } } 三:影射文件和配置文件: 1:<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="FirstBean" table="student"> <id name="userId" unsaved-value="null"> <generator class="identity"/> </id> <property name="userName"/> </class> </hibernate-mapping> 2: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property> <property name="hibernate.connection.password">thmei123</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/user</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.c3p0.max_size">20</property> <property name="hibernate.c3p0.min_size">1</property> <property name="hibernate.c3p0.timeout">5000</property> <property name="hibernate.c3p0.max_statements">100</property> <property name="hibernate.c3p0.idle_test_period">3000</property> <property name="hibernate.c3p0.acquire_increment">2</property> <property name="hibernate.c3p0.validate">true</property> <mapping resource="hib.hbm.xml"> </session-factory> </hibernate-configuration> 说明;在主函数main()中运行后提示: Exception in thread "main" java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.first.FirstM.main(FirstM.java:12) Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) 提示的是要文件: log4j-1.2.11.jar 和commons-logging-1.0.4.jar 这两个jar文件我都拷贝到了SRC下面了,也不可以阿 在网上查询说的是好像main()函数中不可以用日志文件, 希望大家帮我了, 另外 请大家给我一个详细的例子吧,最好是web工程的和java工程 各一个例子, 同时天涯沦落人啊!! [b]问题补充:[/b] 谢谢 楼上兄弟的给你资料和建议,我现在除了拷贝了log4j-1.2.11.jar 和commons-logging-1.0.4.jar 这两个文件外,还在hibernate下拷贝了一个log4j.property的属性文件,都放置到了src下面,但是现在又出下面错误: 22:11:54,599 INFO Environment:514 - Hibernate 3.2.6 22:11:54,619 INFO Environment:547 - hibernate.properties not found 22:11:54,629 INFO Environment:681 - Bytecode provider name : cglib 22:11:54,639 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling 22:11:54,850 INFO Configuration:1432 - configuring from resource: /hibernate.cfg.xml 22:11:54,850 INFO Configuration:1409 - Configuration resource: /hibernate.cfg.xml 22:11:55,501 INFO Configuration:559 - Reading mappings from resource : hib.hbm.xml 22:11:56,212 INFO HbmBinder:300 - Mapping class: FirstBean -> student org.hibernate.InvalidMappingException: Could not parse mapping document from resource hib.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:575) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593) 其中: 一:22:11:54,619 INFO Environment:547 - hibernate.properties not found 提示没有找到hibernate.properties 是怎么会事?我已经放置hibernate.properties,这个文件不是自己写,因为我不会写,就在hibernate下拷贝的一个,请大家给出建议,谢谢 二:org.hibernate.InvalidMappingException: Could not parse mapping document from resource hib.hbm.xml 这个实际上是提示没有找到hib.hbm.xml映射文件,我很是奇怪,无论我怎么修改<mapping resource="hib.hbm.xml">的映射路径,都是不可以的!请大家帮助!! 学习中,望大家指点 谢谢
昨天正常,今天不正常的问题 Error creating bean with name 'sessionFactory'
[size=large]这样的配置用了好久了,一直没出状况,今天突然出状况了,而且重新集成ssh框架后也是同样的错误,郁闷中...,MyEclipse启动tomcat就报错,不知所谓何? 贴出来请教下有遇到此问题的大侠:[/size] 平台采用ssh框架,集成环境的jar包是用MyEclipse8.0M2自动创建, [img]http://dl.iteye.com/upload/attachment/188763/761d5160-fb8c-3b87-bbbb-c9e23a7c008f.png[/img] ApplicationContext.xml配置: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- 定义数据源Bean --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"> </property> <property name="url" value="jdbc:mysql://127.0.0.1:3306/task_system?useUnicode=true&amp;characterEncoding=UTF-8"> </property> <property name="username" value="root"></property> <property name="password" value="1234"></property> </bean> <!--定义了Hibernate的SessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.jdbc.batch_size">20</prop> </props> </property> <property name="mappingResources"> <list> <value>/pojo/UserDept.hbm.xml</value> <value>/pojo/UserEmployee.hbm.xml</value> <value>/pojo/UserJob.hbm.xml</value> </list> </property> </bean> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 报错: 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) [b]问题补充:[/b] 问题解决了,是我不知道什么时候把jsp页面的struts标签里加个html标签了,肯定是放错位置了,后来纠正后,又不小心还原了一下吧,所以没发现,今天看了楼下的朋友的答案,提醒了我,在jsp页面里把代码分段删除测试,终于发现问题之所在了。谢谢您的热心,多亏您提醒我。
Hibernate查询数据时出现的问题
相关参数:MyEclipse7,MySQL5,Hibernate 3.2,Spring 2.0,Struts 1.2. 问题概述:使用SSH搭建,提供了方法eqField(String field,String value),该方法使用QBC查询,field填写查询字段,value填写值,然后返回该实体的List,库中[字段=‘值’]的实体全部取出。但是在操作中出现了如下异常信息,我试图使用手工写HQL的方式,仍然不好用。 异常信息: org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred calling getter of com.kupid.domain.Jbdata.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.kupid.domain.Jbdata.id 相关代码段: 项目实体使用Hibernate的反向工程从DB自动生成。 Jbcomment实体,其中有属性Jbdata,是自定义的一个BEAN。 [code="java"] public class Jbcomment implements java.io.Serializable { // Fields private String id; private Jbfield jbfield; private Jbdata jbdata; private String name; private Integer flag; private Date creatdate; private Date lastupdate; private String pre1; private String pre2; private String pre3; [/code] 实体Jbdata [code="java"] public class Jbdata implements java.io.Serializable { // Fields private String id; private Jbtype jbtype; private String name; private Date createrdate; private Date lastdate; private Integer flag; [/code] 在实体Jbcomment的操作实现类JbcommentDaoImpl中,提供了eqField方法,该类代码片段如下: [code="java"] public class JbcommentDaoImpl extends BaseDaoImpl<Jbcomment,String> implements JbcommentDao { public List<Jbcomment> findAll() { return (List<Jbcomment>) ht.execute(new HibernateCallback() { public Object doInHibernate(Session s) throws HibernateException, SQLException { Criteria c = s.createCriteria(Jbcomment.class); c.add(Restrictions.like("id","%")); return c.list(); } }); } public List<Jbcomment> eqField(final String field,final String value) { return (List<Jbcomment>) ht.execute(new HibernateCallback() { public Object doInHibernate(Session s) throws HibernateException, SQLException { Criteria c = s.createCriteria(Jbcomment.class); c.add(Restrictions.eq(field,value)); return c.list(); } }); } [/code] 在对应的Service中注入了上述JbcommentDaoImpl,其中getField_eq方法无任何差异的调用了eqField。 [code="java"] public class JbcommentServiceImpl implements JbcommentService { private JbcommentDao jbcommentDao; public List<Jbcomment> getField_eq(String field,String value) { return jbcommentDao.eqField(field, value); } [/code] 然后,某个操作调用了一个showDataDetail.do,其片段如下: [code="java"] public class ShowDataDetail extends Action { private JbcommentServiceImpl cmtsi; private JbfieldServiceImpl fieldsi; private JbdataServiceImpl datasi; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ System.out.println("Create a detail"); try { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); String dataId=request.getParameter("id"); String keywords=request.getParameter("keywords"); List<Jbcomment> list=cmtsi.getField_eq("jbdata", dataId); [/code] 在最后一行,取list的时候,异常出现了。 希望得到一个详细的,明确的分析。若是如:“详见XX书”,“答案可访问XX网”,“自己去看API”等回答,就不劳烦您了。 谢谢指教。 关于源码: 源码以问题附件的形式上传了,因为jar包超过了附件的10M限制而被剔除。 源码内包名domain,persist,service,actions,顾名思义不做多解释了。 jar包移出后传至Rayfile了,其下载地址为 http://www.rayfile.com/files/e8680f6e-c838-11de-ab98-0014221b798a/ 数据库以SQL校本形式导出,本人常用MySQL-Administrator,所以先用该工具导出,但由于该工具导出的脚步的DB倒回在其他工具中可能存在编码问题,于是又用Navicat导出了一份通用性好的 sql脚本.
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
立即提问

相似问题

1
为什么我在myeclipse中不可以调用ImageIO.write();方法?
5
java连接数据库连接问题
1
Myeclipse 连接 mysql 时出现 cannot load connectton class because of underlying exception.....
4
myeclipse连接mysql时出现了图示的问题
2
java连接sql server2005,驱动加载成功,数据库连接失败,应该怎么办?
2
myeclipse10创建maven,pom.xml报错org.apache.maven.archiver.MavenArchiver.getManifest
2
myeclipse连接mysql数据库突然出错 提示Unknown database
1
DM7加载不上驱动,本来我用mysql数据库能跑起来,现在改成DM7就一直报错
1
Myeclipse运行web项目,连接数据库的时候,报错
2
Myeclipse 报错:Table 'znzp.admin' doesn't exist
0
求助:myeclipse中出现了the type android.content.intent cannot be resolved 应该怎么解决?求大佬指导
2
求助:myeclipse中出现了the type android.content.intent cannot be resolved 应该怎么解决?
2
myeclipse什么版本支持jdk-12.0.1
1
mysql5.6.44在myeclipse中创建数据库表格时候报错OPTION SQL_SELECT_LIMIT=DEFAULT
2
小白求助 myeclipse里的.sql文件为什么不随mysql里的变化 在线等谢谢
3
哪位大神帮我解决一下eclipse运行突然报404,好像是spring配置文件有问题
1
Tomcat9用eclipse启动完全没问题,但是myeclipse启动不起来,自带Tomcat也启动不起来,求大佬解救
1
myeclipse Tomcat8.5添加web项目的时候显示不全
1
myeclipse debug出现Source not found.edit source lookup path 一闪而过