Atomikos Forum

Atomik doesn't initialize (Error extracting version from file)

Hello community!

I'm trying to use JPA with Atomikos TransactionsEssentials 3.8 + Hibernate 3.6 + Spring 3.0.5 and deploying to Tomcat 6 using Spring 3 but I can't start the application. The database I'm trying to use is PostgreSQL with XA support, yes, I know is not already supported, but I think I can avoid it, for example, right now we don't need to use CLOBs objects (and I saw one exception about this in the stacktrace). By the way, I'm trying to follow this approach:
http://www.atomikos.com/Documentation/HibernateIntegration#With_JPA

Do I need to modify anything inside Tomcat? I've been reading about the integration configuration but I'm using Spring, and I think I don't need to add anything inside the server (except to copy the jdbc drivers).

And here it is part of the stacktrace:

(...).TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor]; root of factory hierarchy
WARN : com.atomikos.jdbc.AtomikosConnectionProxy - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@6aa218a5: WARNING: transaction manager not running?
(...)
WARN : com.atomikos.jdbc.AtomikosConnectionProxy - atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@6aa218a5: WARNING: transaction manager not running?
ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atomikosTransactionManager' defined in ServletContext resource [/WEB-INF/classes/db.xml]: Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: Error in init(): Error extracting version from file: xxx.xxx.xxx.xxx.tm.epoch
    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.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    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:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: com.atomikos.icatch.SysException: Error in init(): Error extracting version from file: xxx.xxx.xxx.xxx.tm.epoch
    at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:333)
    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(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)
    ... 36 more
Caused by: java.lang.IllegalArgumentException: Error extracting version from file: xxx.xxx.xxx.xxx.tm.epoch
    at com.atomikos.util.VersionedFile.extractVersion(VersionedFile.java:114)
    at com.atomikos.util.VersionedFile.extractLastValidVersionNumberFromFileNames(VersionedFile.java:95)
    at com.atomikos.util.VersionedFile.resetVersion(VersionedFile.java:80)
    at com.atomikos.util.VersionedFile.<init>(VersionedFile.java:75)
    at com.atomikos.util.UniqueIdMgr.<init>(UniqueIdMgr.java:105)
    at com.atomikos.util.UniqueIdMgr.<init>(UniqueIdMgr.java:90)
    at com.atomikos.icatch.standalone.StandAloneTransactionManager.<init>(StandAloneTransactionManager.java:82)
    at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:244)
    at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
    ... 48 more
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:431)
    at java.lang.Long.valueOf(Long.java:525)
    at com.atomikos.util.VersionedFile.extractVersion(VersionedFile.java:112)
    ... 56 more
10-oct-2012 21:02:36 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
Nacho C Send private email
Wednesday, October 10, 2012
 
 
Hi,

Are you trying to upgrade from a previous release at the same time?

Guy
Guy Pardon Send private email
Monday, December 10, 2012
 
 
Hi Guy!

Thank you for your reply. No, in fact we're trying to deploy our application by the first time using Atomikos, so we didn't understand what's happening.

Regards,
Nacho C Send private email
Tuesday, December 11, 2012
 
 
Well,

You do seem to have some .epoch file there - and that one is causing the problem. Do you still need it?

HTH
Guy Pardon Send private email
Tuesday, December 11, 2012
 
 
No, we don't need those files. Then, should we delete them in every deploy or only this first time?
Nacho C Send private email
Wednesday, December 12, 2012
 
 
Only the first time. Or move them to something named other than .epoch files.
Guy Pardon Send private email
Wednesday, December 12, 2012
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics