2011-09-15 87 views
0

我正在使用Atomikos實施JTA並部署在服務器上。它適用於多個數據庫回滾,但是當我重新啓動服務器時,它會給出下面的錯誤;如果我刪除日誌文件,它會成功重新啓動。請幫忙。Atomikos JTA - 恢復錯誤

Exception in thread "SpringOsgiExtenderThread-20" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTransactionService' defined in URL [bundle://476.4:0/META-INF/spring/interimws-datasource.xml]: Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: Error in init(): Error in init: Error in recover 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) 
     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) 
     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 
     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) 
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) 
     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) 
     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) 
     at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69) 
     at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355) 
     at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) 
     at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) 
     at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) 
     at java.lang.Thread.run(Thread.java:619) 
Caused by: com.atomikos.icatch.SysException: Error in init(): Error in init: Error in recover 
     at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:374) 
     at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413) 
     at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:605) 
     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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) 
     ... 14 more 
Caused by: com.atomikos.icatch.SysException: Error in init: Error in recover 
     at com.atomikos.icatch.imp.TransactionServiceImp.init(TransactionServiceImp.java:728) 
     at com.atomikos.icatch.imp.BaseTransactionManager.init(BaseTransactionManager.java:217) 
     at com.atomikos.icatch.standalone.StandAloneTransactionManager.init(StandAloneTransactionManager.java:104) 
     at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:307) 
     ... 23 more 
+0

你設法解決這個問題嗎?我有興趣聽到解決方案。 – ZeroOne

回答

0

嗯,我實際上有那些作爲PermaGen內存不足錯誤的後果。如果您在不重新啓動服務器的情況下熱連續多次部署應用程序,則在使用Sun/Oracle JDKS時會發生這種情況,特別是在Tomcat和Jetty上。查看堆棧跟蹤的結尾,看看是否沒有PermaGen錯誤。如果是幸運的話,這隻會發生在上述場景中。在生產中,你應該沒問題,因爲我假設你沒有連續20次熱部署應用程序:)

+0

第一次我部署並調用一些方法,然後我試圖重新啓動,並失敗..我沒有PermaGen錯誤。如果我刪除tmlog文件,它工作正常 –