`
hehaibo
  • 浏览: 416265 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

jboss debug 调试和NoSuchMethodError org.hibernate.event.PreInsertEvent.getSource

阅读更多
java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
	at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
	at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
	at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
	at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
	at org.jboss.remoting.Client.invoke(Client.java:1634)
	at org.jboss.remoting.Client.invoke(Client.java:548)
	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
	at $Proxy0.addCategory(Unknown Source)
	at com.haibo.mstreet.category.TestCategory.main(TestCategory.java:46)
	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
	at $Proxy0.addCategory(Unknown Source)
	at com.haibo.mstreet.category.TestCategory.main(TestCategory.java:46)
Caused by: java.lang.NoSuchMethodError: org.hibernate.event.PreInsertEvent.getSource()Lorg/hibernate/engine/SessionImplementor;
	at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
	at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:178)
	at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72)
	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
	at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
	at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
	at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
	at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)


jar包版本不对引起的,不要随意覆盖hibernate*.jar包

jboss 远程调试[jboss-4.2.2-GA]


 

 

1.设定Jboss的启动参数,把Debug端口放开
      打开[\jboss-4.2.2.GA\bin\run.conf]文件,把47行的注释放开,如下所示


# Sample JPDA settings for remote socket debuging
JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

 

2     修改JBOSS_HOME/bin目录下run.bat 文件 93行

rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address= 8787 ,server=y,suspend=y %JAVA_OPTS% 

将这行改成

set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address= 8787 ,server=y,suspend=n %JAVA_OPTS% 

 


 
分享到:
评论

相关推荐

    jboss远程调试[参照].pdf

    jboss远程调试[参照].pdf

    jboss-logging-3.4.3.Final-API文档-中文版.zip

    Maven坐标:org.jboss.logging:jboss-logging:3.4.3.Final; 标签:jboss、logging、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...

    jboss-logging-3.4.1.Final-API文档-中文版.zip

    Maven坐标:org.jboss.logging:jboss-logging:3.4.1.Final; 标签:jboss、logging、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...

    hibernate-tools(包含版本3、版本5)解决hbm.xml中文注释乱码和生成实体类注释

    在eclipse上通过hibernate工具,将数据库表生成Java类和xml配置文件 总共有2个版本,根据自己的需求使用版本3或者5: 1. hibernate-tools-3.4.0.CR2.jar是修改完成的jar包,直接替换原来的jar包, 重启eclipse即可...

    jboss-logging.jar,jboss-common.jar

    java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object; 错误解决办法

    jboss-threads-3.1.0.Final-API文档-中文版.zip

    Maven坐标:org.jboss.threads:jboss-threads:3.1.0.Final; 标签:jboss、threads、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...

    jboss-logging-3.1.0.ga.jar.z

    import org.jboss.logging.Logger; public class MyClass { private static final Logger logger = Logger.getLogger(MyClass.class); public void myMethod() { logger.info("This is an informational ...

    后台验证hibernate-validator必须的jar包

    本主题将详细讲解`Hibernate Validator`以及与之相关的`validation-api-2.0.1.Final.jar`、`hibernate-validator-6.0.8.Final.jar`和`jboss-logging-3.3.2.Final.jar`这三个jar包的作用和重要性。 首先,`...

    jboss 下载(httpwww.jboss.org)

    此外,还需要设置启动参数,如 JAXP(Java API for XML Processing),并根据配置文件 `JBoss.properties` 进行系统属性设置,创建 MBeanServer 实例,以及加载补丁文件和远程类加载器。 JBoss 的工作原理涉及多个...

    解决 java.lang.NoSuchMethodError的错误

    2. 开发环境和运行环境不一致:当开发环境和运行环境的配置不一致时,也可能会导致 Java.lang.NoSuchMethodError 错误。 解决 Java.lang.NoSuchMethodError 错误的方法: 1. 查看“External Libraries”,检查报错...

    jboss-logging-3.3.0.Final.jar的源码

    日志级别在`org.jboss.logging.LogLevel`中定义,包括`TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`, 和 `OFF`。`org.jboss.logging.LoggerProviders`负责根据系统属性或类路径中的配置文件动态调整日志级别...

    jboss-web.xml jndi.properties oracle-ds.xml

    在本案例中,"jboss-web.xml"、"jndi.properties"和"oracle-ds.xml"是针对EJB+JPA在JBoss应用服务器中的配置文件,它们各自承担着不同的职责。 首先,"jboss-web.xml"是JBoss特定的Web应用程序部署描述符,它是...

    jboss-logging-3.1.0.CR2

    有人向我要,所以传上来! 错误信息:java.lang.ClassNotFoundException: org.jboss.logging.BasicLogger 解决办法:加入jboss-logging-3.1.0.GA.jar就好了。hibernate4日志机制改了

    jboss-logging-3.4.2.Final-API文档-中文版.zip

    Maven坐标:org.jboss.logging:jboss-logging:3.4.2.Final; 标签:jboss、logging、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...

    jboss-threads-3.1.0.Final-API文档-中英对照版.zip

    Maven坐标:org.jboss.threads:jboss-threads:3.1.0.Final; 标签:jboss、threads、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译...

    jboss-4.0.5.GA.zip

    9. **热部署**:允许开发者在不中断服务的情况下更新部署的应用,提高了开发和调试的效率。 10. **模块化设计**:JBoss 4.0.5.GA采用模块化设计,各组件之间解耦,便于维护和升级。 11. **JMX监控**:通过Java ...

    jboss-logging-3.3.2.Final-API文档-中文版.zip

    Maven坐标:org.jboss.logging:jboss-logging:3.3.2.Final; 标签:jboss、logging、jar包、java、API文档、中文版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化...

    jboss-ejb3-client.jar

    jboss-ejb3-client.jar

    jboss-modules-1.15.GA.jar

    当时遇到这个问题org.jboss.naming.remote.client.InitialContextFactory(WFLYNAM0027 : ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory) 去外网下载了这个,成功通过了

    jboss jar包snowdrop-vfs.jar和jboss-logging.jar

    这两个jar包的使用,使得开发者在将Spring应用部署到JBoss服务器时,可以享受到更加平滑的集成体验,减少了配置和调试的时间。在实际应用中,通常需要将这些jar包添加到项目的类路径中,或者在JBoss的lib目录下,以...

Global site tag (gtag.js) - Google Analytics