Reputation: 8631
For whatever reason my project has decided it cannot find my transaction.properties file. It is located in the :
src/main/resource
However it looks in looks in target/classes/
The file also resides yet throws the errors(see below)
These all seem to stem from the whole in the init of code I have no acces to which is always fun.
Anyone have any idea how to get past the whole:
Using init file: /target/classes/transactions.properties
com.atomikos.icatch.SysException: Error in init: Error during checkpointing
at com.atomikos.icatch.imp.TransactionServiceImp.init(TransactionServiceImp.java:728)
EDIT:
The errors are mainly pointing at the atomikos path. I'll be honest I'm at a total loss as to what is actually happening under the hood so. It's rather melting. The two files are the same so it shouldn't really matter which file it uses, however I can view the first error line reference.
public synchronized void init ( Properties properties ) throws SysException
{
Stack errors = new Stack ();
this.properties_ = properties;
try {
recoverymanager_.init ();
} catch ( LogException le ) {
errors.push ( le );
throw new SysException ( "Error in init: " + le.getMessage (),
errors );
}
recoverCoordinators ();
//initialized is now set in recover()
//initialized_ = true;
shuttingDown_ = false;
control_ = new LogControlImp ( this );
// call recovery already, to make sure that the
// RMI participants can start inquiring and replay
recover ();
notifyListeners ( true, false );
}
Full error printout:
Using init file: /target/classes/transactions.properties
com.atomikos.icatch.SysException: Error in init: Error during checkpointing
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)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413)
at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:90)
at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:140)
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)
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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at com.citi.eq.mo.dcc.server.Main.main(Main.java:32)
Nested exception is:
com.atomikos.persistence.LogException: Error during checkpointing
at com.atomikos.persistence.imp.FileLogStream.writeCheckpoint(FileLogStream.java:229)
at com.atomikos.persistence.imp.StreamObjectLog.init(StreamObjectLog.java:185)
at com.atomikos.persistence.imp.StateRecoveryManagerImp.init(StateRecoveryManagerImp.java:71)
at com.atomikos.icatch.imp.TransactionServiceImp.init(TransactionServiceImp.java:725)
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)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413)
at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:90)
at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:140)
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)
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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at com.citi.eq.mo.dcc.server.Main.main(Main.java:32)
08/05/2011 14:55:59.998 [main] [] [INFO ] [o.s.b.f.s.DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@164dbd5: defining beans [gfiPropertyConfigurerCommon,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,ZtsListenerContainer,ztsMessageListener,dccMessageHandler,dccToRioPublisher,rioJmsTemplate,dccMessageTransformer,ztsFixtoRioTransformer,dateManager,ztsDropCopyConverterContextFactory,ZtsBlockListenerContainer,ztsblockdropCopyConverterContextFactory,ZasListenerContainer,zasMessageListener,zastoRIOMessageTransformer,zasDropCopyConverterContextFactory,ztsToDccJndiTemplate,ztsQcf,ztsBlockToDccJndiTemplate,ztsBlockQcf,zasToDccJndiTemplate,zasQcf,rioJndiTemplate,rioTcf,rioDestinationResolver,URO.ZTSTRADES.1_Producer,mbeanServer,jmxExporter,rules-execution-server-engine,rio-object,trade-validator-context,trade-validator,validation-rules-helper,javaxTransactionManager,javaxUserTransaction,springPlatformTransactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.scheduling.annotation.internalAsyncAnnotationProcessor,org.springframework.scheduling.annotation.internalScheduledAnnotationProcessor]; root of factory hierarchy
08/05/2011 14:56:00.013 [main] [] [INFO ] [o.s.jmx.export.MBeanExporter] Unregistering JMX-exposed beans on shutdown
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'javaxTransactionManager' defined in class path resource [eq-mo-dcc-server-context.xml]: Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: Error in init(): Error in init: Error during checkpointing
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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at com.citi.eq.mo.dcc.server.Main.main(Main.java:32)
Caused by: com.atomikos.icatch.SysException: Error in init(): Error in init: Error during checkpointing
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:374)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413)
at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:90)
at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:140)
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)
... 12 more
Caused by: com.atomikos.icatch.SysException: Error in init: Error during checkpointing
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)
... 22 more
Upvotes: 0
Views: 4780
Reputation: 168
The actual error you have is "com.atomikos.icatch.SysException: Error in init: Error during checkpointing"
This error occurs when your application (in turn Atomikos) is trying to write into a file (log file) but it is already in use or this is other file related issue. Example: If this is java application, an instance may already be running and you are running it again. As Atomnikos doesn't close object output stream after each logging, it will remain open. Hence if other instance tries to write on same log file, it will give this error!
FYI - I was getting same error and this was the issue. If this is not in your case, please let me know which Atomikos version you are using and whether you have below log lines just before this exception. Here path is actual path to log file.
FileLogStream - Starting read of logfile tmlog12.log
FileLogStream - Done read of logfile
FileLogStream - Logfile closed: \tmlog12.log
Upvotes: 0
Reputation: 76
I had the same "com.atomikos.icatch.SysException: Error in init: Error during checkpointing" -- I realized it was trying to write to a file, but wasn't able to. I then ran the IDE as administrator, and the problem magically went away.
Upvotes: 1
Reputation: 298968
src/main/resources is not on the classpath, so looking in target/classes is the correct thing to do. An application should not beware of how your sources are organized. The correct Spring way to reference your file would be classpath:/transactions.properties
, which will look in the file system during tests and inside the application Jar when deployed.
Frankly: I don't think that's the problem you have. None of the error messages you posted says anything about not finding the file. I think the error is something else.
Upvotes: 1
Reputation: 18445
You're using Maven right? When Maven packages a project it copies files in src/main/resource to target/classes. This is so the resources are available on the classpath. The fact that your transaction.properties is not there indicates you have a problem either building or running your app.
What kind of project is this, a web app? How are you building it?
If it's a web app, are you getting the problem running it through eclipse, or are you getting the problem after you have deployed the .war to your server?
Upvotes: 1