Atomikos Forum

Problem starting application with Tomcat 7.0.21

Hello,
I am trying to setup atomikos essentials 3.7 with Apache Tomcat 7.0.21.

I think I configured everything correctly, as in the document http://www.atomikos.com/Documentation/TomcatIntegration#Atomikos_3_5_2_and_later

When I try to start my app, I get the following error:

SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: error creating AtomikosDataSourceBean [Root exception is com.atomikos.beans.PropertyException: no writeable property 'singleton' in class 'com.atomikos.jdbc.AtomikosDataSourceBean']
        at com.atomikos.tomcat.BeanFactory.getObjectInstance(BeanFactory.java:76)
        at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:826)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
        at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:119)
        at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:73)
        at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:36)
        at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:140)
        at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:147)
        at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:112)
        at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:84)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:334)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:720)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
        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:322)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: com.atomikos.beans.PropertyException: no writeable property 'singleton' in class 'com.atomikos.jdbc.AtomikosDataSourceBean'
        at com.atomikos.beans.PropertyUtils.getSetter(PropertyUtils.java:286)
        at com.atomikos.beans.PropertyUtils.setDirectProperty(PropertyUtils.java:200)
        at com.atomikos.beans.PropertyUtils.setProperty(PropertyUtils.java:110)
        at com.atomikos.tomcat.BeanFactory.getObjectInstance(BeanFactory.java:66)
        ... 24 more


I think the problem is in the class com.atomikos.jdbc.AtomikosDataSourceBean, because now the Resource declaration in Tomcat 7 includes an attribute singleton (by default true), and the class, doesn't support it.

Is there a way around this problem?
Was anyone able to have Atomikos with Tomcat 7 running?

Thank you very much in advance.

Cheers,
        Manuel Valladares
Manuel Valladares Send private email
Wednesday, September 21, 2011
 
 
Hi,

Recommended: configure atomikos per web-app, i.e. no jars or property files in the tomcat server lib.

HTH
Guy Pardon Send private email
Tuesday, September 27, 2011
 
 
I have exactly the same problem. Already any solution?
Michael Nahler Send private email
Friday, October 07, 2011
 
 
Looks like there is a property called 'singleton' that should not be there?
Guy Pardon Send private email
Friday, October 07, 2011
 
 
I mean: the config should not reference a property called 'singleton' because it has no setter (since it does not exist)?
Guy Pardon Send private email
Friday, October 07, 2011
 
 
I have not configured a singleton property.
As Manuel Valladares proposed this could be an incompatibility wiht Tomcat 7 series?
Or someone with this setup working?
Michael Nahler Send private email
Friday, October 07, 2011
 
 
The singleton property is forwarded from tomcat to the factory. So the factory should not forward this property. This is also true for auth and scope (already handled).

This source code reflects this:

http://www.atomikos.com/Documentation/Tomcat7Integration35
Rainer Wallscheid Send private email
Friday, October 28, 2011
 
 

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

Other recent topics Other recent topics