我们正在尝试在多个本地环境中运行使用Atomikos作为事务管理器的Web应用程序(每个环境都使用相同版本的spring,atomikos,tomact等,并使用相同的配置文件)。其中一些可以正常工作,但是其中之一在我们尝试启动tomcat时,出现以下异常:
Caused by: java.lang.IllegalStateException: Can't overwrite cause with java.lang.RuntimeException: Log already in use? at java.lang.Throwable.initCause(Throwable.java:456) at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:326) at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405) at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:569) at com.atomikos.icatch.jta.UserTransactionManager.startupTransactionService(UserTransactionManager.java:89) at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:77) at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:142) 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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) ... 41 more Caused by: com.atomikos.icatch.SysException: Error in init(): Log already in use? ... 54 more Caused by: java.lang.RuntimeException: Log already in use? at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:203) at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:258)
我们无法弄清楚有什么问题,Google也没有太多帮助…任何人都知道造成这种奇怪问题的原因是什么?同样,我们的环境具有完全相同的配置且可以正常工作,而另一个环境具有另一个奇怪的警告
谢谢!:)
原来这是一个权限问题。Atomikos试图在eclipse文件夹中创建lck文件,一旦我们将eclipse移到另一个位置,一切就可以正常工作。