我编写了一个多线程应用程序,到目前为止运行正常 今天早上我收到错误
*
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.hibernate.engine.jdbc.JdbcSupportLoader.useContextualLobCreation(JdbcSupportLoader.java:97)
at org.hibernate.engine.jdbc.JdbcSupportLoader.loadJdbcSupport(JdbcSupportLoader.java:52)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:118)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
- locked <0x00002aad4fe39460> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
- locked <0x00002aad4fa2c448> (a java.lang.Object)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.myco.myproduct.util.CommonUtil.getProductQARulesContext(CommonUtil.java:383)
at com.myco.myproduct.SomeLauncher.initializeSpringBeans(SomeLauncher.java:336)
at com.myco.myproduct.SomeLauncher.main(SomeLauncher.java:97)
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 com.myco.launcher.Main$1.run(Main.java:278)
at java.lang.Thread.run(Thread.java:619)
"RMI TCP Accept-0" daemon prio=10 tid=0x000000005aa7c000 nid=0x48fd runnable [0x000000004163f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x00002aad4e716618> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:34)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
at java.lang.Thread.run(Thread.java:619)
"Low Memory Detector" daemon prio=10 tid=0x000000005a94a800 nid=0x48f9 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread1" daemon prio=10 tid=0x000000005a947800 nid=0x48f8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x000000005a943000 nid=0x48f7 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x000000005a941000 nid=0x48f6 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x000000005a908800 nid=0x48f5 in Object.wait() [0x0000000041dcd000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aad4e5c11e0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00002aad4e5c11e0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x000000005a906800 nid=0x48f4 in Object.wait() [0x0000000041ccc000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aad4e5c1048> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x00002aad4e5c1048> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=10 tid=0x000000005a900000 nid=0x48f3 runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x000000005a8a6000 nid=0x48eb runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x000000005a8a8000 nid=0x48ec runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x000000005a8aa000 nid=0x48ed runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x000000005a8ab800 nid=0x48ee runnable
"GC task thread#4 (ParallelGC)" prio=10 tid=0x000000005a8ad800 nid=0x48ef runnable
"GC task thread#5 (ParallelGC)" prio=10 tid=0x000000005a8af800 nid=0x48f0 runnable
"GC task thread#6 (ParallelGC)" prio=10 tid=0x000000005a8b1000 nid=0x48f1 runnable
"GC task thread#7 (ParallelGC)" prio=10 tid=0x000000005a8b3000 nid=0x48f2 runnable
"VM Periodic Task Thread" prio=10 tid=0x00002aaea400c800 nid=0x48fe waiting on condition
JNI global references: 843
[xyz] /srv/net/gigs_int1/x_xyz_pqd (x_xyz_pqd) $ /ms/dist/myco/sun/jdk/1.6.0_16-x86_64/bin/jstack 18665
2014-03-19 06:30:55
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode):
"Attach Listener" daemon prio=10 tid=0x000000005b524800 nid=0x6cb8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"DestroyJavaVM" prio=10 tid=0x00002aaea400d800 nid=0x48ea waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Thread-1" prio=10 tid=0x00002aaea4022800 nid=0x48ff runnable [0x0000000040db8000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at oracle.net.ns.Packet.receive(Packet.java:282)
at oracle.net.ns.DataPacket.receive(DataPacket.java:103)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:230)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8TTIClob.createTemporaryLob(T4C8TTIClob.java:530)
at oracle.jdbc.driver.T4CConnection.createTemporaryClob(T4CConnection.java:3209)
- locked <0x00002aad5b4022e8> (a oracle.jdbc.driver.T4CConnection)
at oracle.jdbc.driver.PhysicalConnection.createClob(PhysicalConnection.java:9371)
at org.apache.commons.dbcp.DelegatingConnection.createClob(DelegatingConnection.java:582)
at org.apache.commons.dbcp.DelegatingConnection.createClob(DelegatingConnection.java:582)
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.hibernate.engine.jdbc.JdbcSupportLoader.useContextualLobCreation(JdbcSupportLoader.java:97)
at org.hibernate.engine.jdbc.JdbcSupportLoader.loadJdbcSupport(JdbcSupportLoader.java:52)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:118)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
- locked <0x00002aad4fe39460> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
- locked <0x00002aad4fa2c448> (a java.lang.Object)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.myco.myproduct.util.CommonUtil.getProductQARulesContext(CommonUtil.java:383)
at com.myco.myproduct.SomeLauncher.initializeSpringBeans(SomeLauncher.java:336)
at com.myco.myproduct.SomeLauncher.main(SomeLauncher.java:97)
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 com.myco.launcher.Main$1.run(Main.java:278)
at java.lang.Thread.run(Thread.java:619)
"RMI TCP Accept-0" daemon prio=10 tid=0x000000005aa7c000 nid=0x48fd runnable [0x000000004163f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x00002aad4e716618> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:34)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
at java.lang.Thread.run(Thread.java:619)
"Low Memory Detector" daemon prio=10 tid=0x000000005a94a800 nid=0x48f9 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread1" daemon prio=10 tid=0x000000005a947800 nid=0x48f8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x000000005a943000 nid=0x48f7 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x000000005a941000 nid=0x48f6 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x000000005a908800 nid=0x48f5 in Object.wait() [0x0000000041dcd000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aad4e5c11e0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00002aad4e5c11e0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x000000005a906800 nid=0x48f4 in Object.wait() [0x0000000041ccc000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00002aad4e5c1048> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x00002aad4e5c1048> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=10 tid=0x000000005a900000 nid=0x48f3 runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x000000005a8a6000 nid=0x48eb runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x000000005a8a8000 nid=0x48ec runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x000000005a8aa000 nid=0x48ed runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x000000005a8ab800 nid=0x48ee runnable
"GC task thread#4 (ParallelGC)" prio=10 tid=0x000000005a8ad800 nid=0x48ef runnable
"GC task thread#5 (ParallelGC)" prio=10 tid=0x000000005a8af800 nid=0x48f0 runnable
"GC task thread#6 (ParallelGC)" prio=10 tid=0x000000005a8b1000 nid=0x48f1 runnable
"GC task thread#7 (ParallelGC)" prio=10 tid=0x000000005a8b3000 nid=0x48f2 runnable
"VM Periodic Task Thread" prio=10 tid=0x00002aaea400c800 nid=0x48fe waiting on condition
JNI global references: 843
* 据我所知,两个不同的JVM守护程序线程正在等待不同的对象[0x0000000041ccc000]和[0x0000000041dcd000]所以我不确定为什么应用程序停止运行
我尝试了以下
1)查杀过程并重启,类似问题2)我在池中的默认线程数是24 ...但是当我在池大小为10的相同数据上运行相同的代码+时,它会在某个时间&#34;它运行正常,其他时候它给出相同的错误
对于调试此
的任何启示表示赞赏面对一些与管理相关的权限问题,将jvisualVM从我的本地Windows机器连接到linux服务器,如果我可以使用标准的jdk / bin / utilities来解决/调试它,我将不胜感激。
答案 0 :(得分:0)
我看不到可见堆栈跟踪中的任何JVM问题。
你的一个线程正在等待来自数据库的响应
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
这很可能是悬而未决的。如果是这样就是数据库问题。这里几乎没有可能。最可能的原因包括:严重的性能问题,通过延迟连接锁定数据库资源(有时当你强行杀死你的应用程序时会发生这种情况。)和网络问题。