READ_COMMITTED configuration exception

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

READ_COMMITTED configuration exception

Diego Cattelan-2
on apache-tomee-1.1.0-20120824.041036-118-webprofile

when using READ_COMMITTED on Resource.xml

<Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
...
         defaultTransactionIsolation  READ_COMMITTED
...
</Resource>

i'm getting an exception

SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
org.apache.xbean.recipe.ConstructionException: Error invoking factory
method: public static javax.sql.DataSource
org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)
throws
java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
     at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
     at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
     at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
     at
org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
     at
org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
     at
org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
     at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
     at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
     at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
     at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
     at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
     at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
     at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
     at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
     at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
     at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
     at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
     at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
     at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
     at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
     at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
     at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
     at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
     at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
     at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
convert property value from java.lang.String to int for injection public
void
org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
     at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
     at
org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
     at
org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
     at
org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
     at
org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
     ... 56 more
Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
java.lang.NumberFormatException: For input string: "READ_COMMITTED"
     at
org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
     at
org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
     at
org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
     at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
     ... 70 more
Caused by: java.lang.NumberFormatException: For input string:
"READ_COMMITTED"
     at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
     at java.lang.Integer.parseInt(Integer.java:492)
     at java.lang.Integer.valueOf(Integer.java:582)
     at
org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
     ... 74 more
Reply | Threaded
Open this post in threaded view
|

READ_COMMITTED configuration exception

Diego Cattelan
Hi all,
on apache-tomee-1.1.0-20120824.041036-118-webprofile

when specifing READ_COMMITTED on Resource.xml

<Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
...
         defaultTransactionIsolation  READ_COMMITTED
...
</Resource>

i'm getting the following exception

SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
org.apache.xbean.recipe.ConstructionException: Error invoking factory
method: public static javax.sql.DataSource
org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)

throws
java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
     at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
     at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
     at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
     at
org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
     at
org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
     at
org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
     at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
     at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
     at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
     at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
     at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
     at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
     at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
     at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
     at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
     at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
     at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
     at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
     at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
     at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
     at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
     at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
     at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
     at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
     at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
convert property value from java.lang.String to int for injection public
void
org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
     at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
     at
org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
     at
org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
     at
org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
     at
org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
     ... 56 more
Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
java.lang.NumberFormatException: For input string: "READ_COMMITTED"
     at
org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
     at
org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
     at
org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
     at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
     ... 70 more
Caused by: java.lang.NumberFormatException: For input string:
"READ_COMMITTED"
     at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
     at java.lang.Integer.parseInt(Integer.java:492)
     at java.lang.Integer.valueOf(Integer.java:582)
     at
org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
     ... 74 more


Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

AndyG
Hi Diego,

The value needs to be the int value:

http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_NONE

java.sql.Connection
public static final int TRANSACTION_NONE 0
public static final int TRANSACTION_READ_COMMITTED 2
public static final int TRANSACTION_READ_UNCOMMITTED 1
public static final int TRANSACTION_REPEATABLE_READ 4
public static final int TRANSACTION_SERIALIZABLE 8

Regards,

Andy.
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Diego Cattelan
> Hi Diego,
>
> The value needs to be the int value:
>
> http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_NONE
>
> java.sql.Connection
> public static final int TRANSACTION_NONE 0
> public static final int TRANSACTION_READ_COMMITTED 2
> public static final int TRANSACTION_READ_UNCOMMITTED 1
> public static final int TRANSACTION_REPEATABLE_READ 4
> public static final int TRANSACTION_SERIALIZABLE 8
>
> Regards,
>
> Andy.

it was working with commons-jdbc,
in tomcat-jdbc documentation for |defaultTransactionIsolation|
(http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html) :

(String) The default TransactionIsolation state of connections created
by this pool. One of the following: (see javadoc )

  * |NONE|
  * |READ_COMMITTED|
  * |READ_UNCOMMITTED|
  * |REPEATABLE_READ|
  * |SERIALIZABLE|

If not set, the method will not be called and it defaults to the JDBC
driver.

Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Romain Manni-Bucau
should be the same for both using resources.xml (int)

*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/8/24 Diego Cattelan <[hidden email]>

>  Hi Diego,
>>
>> The value needs to be the int value:
>>
>> http://docs.oracle.com/javase/**6/docs/api/constant-values.**
>> html#java.sql.Connection.**TRANSACTION_NONE<http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_NONE>
>>
>> java.sql.Connection
>> public static final int         TRANSACTION_NONE        0
>> public static final int         TRANSACTION_READ_COMMITTED      2
>> public static final int         TRANSACTION_READ_UNCOMMITTED    1
>> public static final int         TRANSACTION_REPEATABLE_READ     4
>> public static final int         TRANSACTION_SERIALIZABLE        8
>>
>> Regards,
>>
>> Andy.
>>
>
> it was working with commons-jdbc,
> in tomcat-jdbc documentation for |defaultTransactionIsolation| (
> http://tomcat.apache.org/**tomcat-7.0-doc/jdbc-pool.html<http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html>)
> :
>
> (String) The default TransactionIsolation state of connections created by
> this pool. One of the following: (see javadoc )
>
>  * |NONE|
>  * |READ_COMMITTED|
>  * |READ_UNCOMMITTED|
>  * |REPEATABLE_READ|
>  * |SERIALIZABLE|
>
> If not set, the method will not be called and it defaults to the JDBC
> driver.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Bjorn Danielsson
In reply to this post by Diego Cattelan-2
Since the properties are embedded in XML, you can put in a
comment after the integer constant:

    DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->

--
Bjorn Danielsson
Cuspy Code AB


Diego Cattelan <[hidden email]> wrote:

> on apache-tomee-1.1.0-20120824.041036-118-webprofile
>
> when using READ_COMMITTED on Resource.xml
>
> <Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
> ...
>         defaultTransactionIsolation  READ_COMMITTED
> ...
> </Resource>
>
> i'm getting an exception
>
> SEVERE: Unable to deploy collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
> org.apache.xbean.recipe.ConstructionException: Error invoking factory
> method: public static javax.sql.DataSource
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)
> throws
> java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
>     at
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
>     at
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
>     at
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
>     at
> org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
>     at
> org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
>     at
> org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
>     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
>     at
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
>     at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
>     at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
>     at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
>     at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>     at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>     at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>     at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>     at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>     at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
>     at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
>     at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
>     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:601)
>     at
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
>     at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
>     at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
>     at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
>     at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
>     at
> org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>     at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>     at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
>     at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
>     at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     at java.lang.Thread.run(Thread.java:722)
> Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
> convert property value from java.lang.String to int for injection
> public void
> org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
>     at
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
>     at
> org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
>     at
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>     at
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
>     at
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
>     at
> org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
>     at
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
>     at
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:601)
>     at
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
>     ... 56 more
> Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
> java.lang.NumberFormatException: For input string: "READ_COMMITTED"
>     at
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
>     at
> org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
>     at
> org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
>     at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
>     at
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
>     ... 70 more
> Caused by: java.lang.NumberFormatException: For input string:
> "READ_COMMITTED"
>     at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>     at java.lang.Integer.parseInt(Integer.java:492)
>     at java.lang.Integer.valueOf(Integer.java:582)
>     at
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
>     ... 74 more
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Romain Manni-Bucau
guess you need the properties format no?

DefaultTransactionIsolation = 2  # READ_COMMITTED

*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/8/24 Bjorn Danielsson <[hidden email]>

> Since the properties are embedded in XML, you can put in a
> comment after the integer constant:
>
>     DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->
>
> --
> Bjorn Danielsson
> Cuspy Code AB
>
>
> Diego Cattelan <[hidden email]> wrote:
> > on apache-tomee-1.1.0-20120824.041036-118-webprofile
> >
> > when using READ_COMMITTED on Resource.xml
> >
> > <Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
> > ...
> >         defaultTransactionIsolation  READ_COMMITTED
> > ...
> > </Resource>
> >
> > i'm getting an exception
> >
> > SEVERE: Unable to deploy collapsed ear in war
> >
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
> > org.apache.xbean.recipe.ConstructionException: Error invoking factory
> > method: public static javax.sql.DataSource
> >
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)
> > throws
> >
> java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
> >     at
> >
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
> >     at
> >
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> >     at
> >
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
> >     at
> >
> org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
> >     at
> >
> org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
> >     at
> >
> org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
> >     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
> >     at
> >
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
> >     at
> >
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
> >     at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
> >     at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
> >     at
> >
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
> >     at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> >     at
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >     at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
> >     at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >     at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> >     at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> >     at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
> >     at
> >
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
> >     at
> > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
> >     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:601)
> >     at
> >
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> >     at
> >
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> >     at
> > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
> >     at
> >
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
> >     at
> >
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
> >     at
> > org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> >
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
> >     at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> >     at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
> >     at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
> >     at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >     at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >     at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> >     at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >     at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >     at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
> >     at
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
> >     at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> >     at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> >     at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> >     at java.lang.Thread.run(Thread.java:722)
> > Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
> > convert property value from java.lang.String to int for injection
> > public void
> >
> org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
> >     at
> > org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
> >     at
> > org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
> >     at
> >
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> >     at
> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> >     at
> >
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
> >     at
> >
> org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
> >     at
> >
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
> >     at
> >
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:601)
> >     at
> >
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
> >     ... 56 more
> > Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
> > java.lang.NumberFormatException: For input string: "READ_COMMITTED"
> >     at
> >
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
> >     at
> >
> org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
> >     at
> >
> org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
> >     at
> org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
> >     at
> > org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
> >     ... 70 more
> > Caused by: java.lang.NumberFormatException: For input string:
> > "READ_COMMITTED"
> >     at
> >
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> >     at java.lang.Integer.parseInt(Integer.java:492)
> >     at java.lang.Integer.valueOf(Integer.java:582)
> >     at
> >
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
> >     ... 74 more
>
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Bjorn Danielsson
Doesn't work, properties comments must be at the beginning
of the line. I use <!-- --> in tomee.xml, it's stripped by
the XML parser so it works for the properties sections too.

--
Bjorn Danielsson
Cuspy Code AB


Romain Manni-Bucau <[hidden email]> wrote:

> guess you need the properties format no?
>
> DefaultTransactionIsolation = 2  # READ_COMMITTED
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau*
> *Blog: http://rmannibucau.wordpress.com*
>
>
>
>
> 2012/8/24 Bjorn Danielsson <[hidden email]>
>
>> Since the properties are embedded in XML, you can put in a
>> comment after the integer constant:
>>
>>     DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->
>>
>> --
>> Bjorn Danielsson
>> Cuspy Code AB
>>
>>
>> Diego Cattelan <[hidden email]> wrote:
>> > on apache-tomee-1.1.0-20120824.041036-118-webprofile
>> >
>> > when using READ_COMMITTED on Resource.xml
>> >
>> > <Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
>> > ...
>> >         defaultTransactionIsolation  READ_COMMITTED
>> > ...
>> > </Resource>
>> >
>> > i'm getting an exception
>> >
>> > SEVERE: Unable to deploy collapsed ear in war
>> >
>> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
>> > org.apache.xbean.recipe.ConstructionException: Error invoking factory
>> > method: public static javax.sql.DataSource
>> >
>> org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)
>> > throws
>> >
>> java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
>> >     at
>> >
>> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
>> >     at
>> >
>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
>> >     at
>> >
>> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
>> >     at
>> >
>> org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
>> >     at
>> >
>> org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
>> >     at
>> >
>> org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
>> >     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
>> >     at
>> >
>> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
>> >     at
>> >
>> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
>> >     at
>> >
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
>> >     at
>> >
>> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
>> >     at
>> >
>> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>> >     at
>> >
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>> >     at
>> >
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>> >     at
>> >
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>> >     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> >     at
>> >
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>> >     at
>> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>> >     at
>> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
>> >     at
>> >
>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
>> >     at
>> > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
>> >     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
>> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >     at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >     at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >     at java.lang.reflect.Method.invoke(Method.java:601)
>> >     at
>> >
>> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
>> >     at
>> >
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
>> >     at
>> > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
>> >     at
>> >
>> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
>> >     at
>> >
>> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
>> >     at
>> > org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
>> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>> >     at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>> >     at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> >     at
>> >
>> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>> >     at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>> >     at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> >     at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
>> >     at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>> >     at
>> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>> >     at
>> >
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
>> >     at
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>> >     at
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>> >     at
>> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
>> >     at
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>> >     at
>> >
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>> >     at
>> >
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
>> >     at
>> >
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
>> >     at
>> >
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>> >     at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>> >     at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>> >     at java.lang.Thread.run(Thread.java:722)
>> > Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
>> > convert property value from java.lang.String to int for injection
>> > public void
>> >
>> org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
>> >     at
>> > org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
>> >     at
>> > org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
>> >     at
>> >
>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>> >     at
>> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
>> >     at
>> >
>> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
>> >     at
>> >
>> org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
>> >     at
>> >
>> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
>> >     at
>> >
>> org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
>> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >     at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >     at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >     at java.lang.reflect.Method.invoke(Method.java:601)
>> >     at
>> >
>> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
>> >     ... 56 more
>> > Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
>> > java.lang.NumberFormatException: For input string: "READ_COMMITTED"
>> >     at
>> >
>> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
>> >     at
>> >
>> org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
>> >     at
>> >
>> org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
>> >     at
>> org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
>> >     at
>> > org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
>> >     ... 70 more
>> > Caused by: java.lang.NumberFormatException: For input string:
>> > "READ_COMMITTED"
>> >     at
>> >
>> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>> >     at java.lang.Integer.parseInt(Integer.java:492)
>> >     at java.lang.Integer.valueOf(Integer.java:582)
>> >     at
>> >
>> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
>> >     ... 74 more
>>
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Romain Manni-Bucau
i never tried, great to know :)

*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/8/24 Bjorn Danielsson <[hidden email]>

> Doesn't work, properties comments must be at the beginning
> of the line. I use <!-- --> in tomee.xml, it's stripped by
> the XML parser so it works for the properties sections too.
>
> --
> Bjorn Danielsson
> Cuspy Code AB
>
>
> Romain Manni-Bucau <[hidden email]> wrote:
> > guess you need the properties format no?
> >
> > DefaultTransactionIsolation = 2  # READ_COMMITTED
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau*
> > *Blog: http://rmannibucau.wordpress.com*
> >
> >
> >
> >
> > 2012/8/24 Bjorn Danielsson <[hidden email]>
> >
> >> Since the properties are embedded in XML, you can put in a
> >> comment after the integer constant:
> >>
> >>     DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->
> >>
> >> --
> >> Bjorn Danielsson
> >> Cuspy Code AB
> >>
> >>
> >> Diego Cattelan <[hidden email]> wrote:
> >> > on apache-tomee-1.1.0-20120824.041036-118-webprofile
> >> >
> >> > when using READ_COMMITTED on Resource.xml
> >> >
> >> > <Resource id="jdbc/AuthenticationDB" type="javax.sql.DataSource">
> >> > ...
> >> >         defaultTransactionIsolation  READ_COMMITTED
> >> > ...
> >> > </Resource>
> >> >
> >> > i'm getting an exception
> >> >
> >> > SEVERE: Unable to deploy collapsed ear in war
> >> >
> >>
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ninphea_1]
> >> > org.apache.xbean.recipe.ConstructionException: Error invoking factory
> >> > method: public static javax.sql.DataSource
> >> >
> >>
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String)
> >> > throws
> >> >
> >>
> java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
> >> >     at
> >> >
> >>
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
> >> >     at
> >> >
> >>
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> >> >     at
> >> >
> >>
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1642)
> >> >     at
> >> >
> >>
> org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:387)
> >> >     at
> >> >
> >>
> org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1843)
> >> >     at
> >> >
> >>
> org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:921)
> >> >     at
> org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:168)
> >> >     at
> >> >
> >>
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:352)
> >> >     at
> >> >
> >>
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:839)
> >> >     at
> >> >
> >>
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:781)
> >> >     at
> >> >
> >>
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:736)
> >> >     at
> >> >
> >>
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
> >> >     at
> >> >
> >>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> >> >     at
> >> >
> >>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
> >> >     at
> >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> >> >     at
> >> >
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> >> >     at
> >> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
> >> >     at
> >> >
> >>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
> >> >     at
> >> > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
> >> >     at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
> >> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >     at
> >> >
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> >     at
> >> >
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >     at java.lang.reflect.Method.invoke(Method.java:601)
> >> >     at
> >> >
> >>
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> >> >     at
> >> >
> >>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> >> >     at
> >> > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
> >> >     at
> >> >
> >>
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
> >> >     at
> >> >
> >>
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
> >> >     at
> >> >
> org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
> >> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> >     at
> >> >
> >>
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> >> >     at
> >> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
> >> >     at
> >> >
> >>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >> >     at
> >> >
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >> >     at
> >> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> >> >     at
> >> >
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >> >     at
> >> >
> >>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >> >     at
> >> >
> >>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
> >> >     at
> >> >
> >>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
> >> >     at
> >> >
> >>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> >> >     at
> >> >
> >>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> >> >     at
> >> >
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> >> >     at java.lang.Thread.run(Thread.java:722)
> >> > Caused by: org.apache.xbean.recipe.ConstructionException: Unable to
> >> > convert property value from java.lang.String to int for injection
> >> > public void
> >> >
> >>
> org.apache.tomcat.jdbc.pool.PoolProperties.setDefaultTransactionIsolation(int)
> >> >     at
> >> >
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:503)
> >> >     at
> >> >
> org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
> >> >     at
> >> >
> >>
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> >> >     at
> >> > org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> >> >     at
> >> >
> >>
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.build(PoolDataSourceCreator.java:82)
> >> >     at
> >> >
> >>
> org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:70)
> >> >     at
> >> >
> >>
> org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
> >> >     at
> >> >
> >>
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:108)
> >> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >     at
> >> >
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> >     at
> >> >
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >     at java.lang.reflect.Method.invoke(Method.java:601)
> >> >     at
> >> >
> >>
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
> >> >     ... 56 more
> >> > Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
> >> > java.lang.NumberFormatException: For input string: "READ_COMMITTED"
> >> >     at
> >> >
> >>
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:31)
> >> >     at
> >> >
> >>
> org.apache.xbean.propertyeditor.AbstractConverter.toObject(AbstractConverter.java:86)
> >> >     at
> >> >
> >>
> org.apache.xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java:284)
> >> >     at
> >> org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:172)
> >> >     at
> >> >
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:497)
> >> >     ... 70 more
> >> > Caused by: java.lang.NumberFormatException: For input string:
> >> > "READ_COMMITTED"
> >> >     at
> >> >
> >>
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> >> >     at java.lang.Integer.parseInt(Integer.java:492)
> >> >     at java.lang.Integer.valueOf(Integer.java:582)
> >> >     at
> >> >
> >>
> org.apache.xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java:29)
> >> >     ... 74 more
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Diego Cattelan
In reply to this post by Bjorn Danielsson
> Since the properties are embedded in XML, you can put in a
> comment after the integer constant:
>
>      DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->
>

On TomEE 1.0

DefaultTransactionIsolation  READ_COMMITTED

if I use

DefaultTransactionIsolation 2

TomEE give me a

SEVERE: Unable to deploy collapsed ear in war /ninphea_1: Exception:
Error setting property: public synchronized void
org.apache.openejb.resource.jdbc.BasicManagedDataSource.setDefaultTransactionIsolation(java.lang.String)
org.apache.xbean.recipe.ConstructionException: Error setting property:
public synchronized void
org.apache.openejb.resource.jdbc.BasicManagedDataSource.setDefaultTransactionIsolation(java.lang.String)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:521)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
     at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
     at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
     at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1499)
     at
org.apache.openejb.config.ConfigurationFactory.install(ConfigurationFactory.java:356)
     at
org.apache.openejb.config.AutoConfig.installResource(AutoConfig.java:1761)
     at
org.apache.openejb.config.AutoConfig.processDataSourceDefinitions(AutoConfig.java:908)
     at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:164)
     at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:321)
     at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:792)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:631)
     at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:588)
     at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
     at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
     at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
     at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
     at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
     at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
     at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
     at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:530)
     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
     at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
     at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
     at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
     at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
     at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
     at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
     at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
     at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
     at java.lang.Thread.run(Thread.java:722)

Caused by: java.lang.IllegalArgumentException: No such transaction
isolation level '2'.  Possible values are READ_UNCOMMITTED,
SERIALIZABLE, READ_COMMITTED, REPEATABLE_READ, NONE
     at
org.apache.openejb.resource.jdbc.IsolationLevels.getIsolationLevel(IsolationLevels.java:39)
     at
org.apache.openejb.resource.jdbc.BasicManagedDataSource.setDefaultTransactionIsolation(BasicManagedDataSource.java:86)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.apache.xbean.recipe.ObjectRecipe$MethodMember.setValue(ObjectRecipe.java:641)
     at
org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:512)
     ... 57 more
Reply | Threaded
Open this post in threaded view
|

Re: READ_COMMITTED configuration exception

Romain Manni-Bucau
yes, tomee with commons-dbcp manages alias:

        isolation.put("NONE", 0);
        isolation.put("READ_COMMITTED", 2);
        isolation.put("READ_UNCOMMITTED", 1);
        isolation.put("REPEATABLE_READ", 4);
        isolation.put("SERIALIZABLE", 8);



*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/8/24 Diego Cattelan <[hidden email]>

>  Since the properties are embedded in XML, you can put in a
>> comment after the integer constant:
>>
>>      DefaultTransactionIsolation 2 <!-- READ_COMMITTED -->
>>
>>
> On TomEE 1.0
>
> DefaultTransactionIsolation  READ_COMMITTED
>
> if I use
>
> DefaultTransactionIsolation 2
>
> TomEE give me a
>
> SEVERE: Unable to deploy collapsed ear in war /ninphea_1: Exception: Error
> setting property: public synchronized void org.apache.openejb.resource.**
> jdbc.BasicManagedDataSource.**setDefaultTransactionIsolation**
> (java.lang.String)
> org.apache.xbean.recipe.**ConstructionException: Error setting property:
> public synchronized void org.apache.openejb.resource.**
> jdbc.BasicManagedDataSource.**setDefaultTransactionIsolation**
> (java.lang.String)
>     at org.apache.xbean.recipe.**ObjectRecipe.setProperty(**
> ObjectRecipe.java:521)
>
>     at org.apache.xbean.recipe.**ObjectRecipe.setProperties(**
> ObjectRecipe.java:371)
>     at org.apache.xbean.recipe.**ObjectRecipe.internalCreate(**
> ObjectRecipe.java:286)
>     at org.apache.xbean.recipe.**AbstractRecipe.create(**
> AbstractRecipe.java:96)
>     at org.apache.xbean.recipe.**AbstractRecipe.create(**
> AbstractRecipe.java:61)
>     at org.apache.xbean.recipe.**AbstractRecipe.create(**
> AbstractRecipe.java:49)
>     at org.apache.openejb.assembler.**classic.Assembler.**
> createResource(Assembler.java:**1499)
>     at org.apache.openejb.config.**ConfigurationFactory.install(**
> ConfigurationFactory.java:356)
>     at org.apache.openejb.config.**AutoConfig.installResource(**
> AutoConfig.java:1761)
>     at org.apache.openejb.config.**AutoConfig.**
> processDataSourceDefinitions(**AutoConfig.java:908)
>     at org.apache.openejb.config.**AutoConfig.deploy(AutoConfig.**
> java:164)
>     at org.apache.openejb.config.**ConfigurationFactory$Chain.**
> deploy(ConfigurationFactory.**java:321)
>     at org.apache.openejb.config.**ConfigurationFactory.**
> configureApplication(**ConfigurationFactory.java:792)
>     at org.apache.tomee.catalina.**TomcatWebAppBuilder.**startInternal(**
> TomcatWebAppBuilder.java:631)
>     at org.apache.tomee.catalina.**TomcatWebAppBuilder.**configureStart(**
> TomcatWebAppBuilder.java:588)
>     at org.apache.tomee.catalina.**GlobalListenerSupport.**lifecycleEvent(
> **GlobalListenerSupport.java:**117)
>
>     at org.apache.catalina.util.**LifecycleSupport.**fireLifecycleEvent(**
> LifecycleSupport.java:119)
>     at org.apache.catalina.util.**LifecycleBase.**fireLifecycleEvent(**
> LifecycleBase.java:90)
>     at org.apache.catalina.core.**StandardContext.startInternal(**
> StandardContext.java:5161)
>     at org.apache.catalina.util.**LifecycleBase.start(**
> LifecycleBase.java:150)
>     at org.apache.catalina.core.**ContainerBase.**addChildInternal(**
> ContainerBase.java:895)
>     at org.apache.catalina.core.**ContainerBase.addChild(**
> ContainerBase.java:871)
>     at org.apache.catalina.core.**StandardHost.addChild(**
> StandardHost.java:615)
>     at org.apache.catalina.startup.**HostConfig.deployDescriptor(**
> HostConfig.java:649)
>     at org.apache.catalina.startup.**HostConfig.deployApps(**
> HostConfig.java:530)
>     at org.apache.catalina.startup.**HostConfig.check(HostConfig.**
> java:1471)
>
>     at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>     at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
> NativeMethodAccessorImpl.java:**57)
>     at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
> DelegatingMethodAccessorImpl.**java:43)
>     at java.lang.reflect.Method.**invoke(Method.java:601)
>     at org.apache.tomcat.util.**modeler.BaseModelMBean.invoke(**
> BaseModelMBean.java:301)
>     at com.sun.jmx.interceptor.**DefaultMBeanServerInterceptor.**invoke(**
> DefaultMBeanServerInterceptor.**java:819)
>     at com.sun.jmx.mbeanserver.**JmxMBeanServer.invoke(**
> JmxMBeanServer.java:791)
>     at org.apache.catalina.manager.**ManagerServlet.check(**
> ManagerServlet.java:1436)
>     at org.apache.catalina.manager.**ManagerServlet.deploy(**
> ManagerServlet.java:856)
>     at org.apache.catalina.manager.**ManagerServlet.doGet(**
> ManagerServlet.java:353)
>     at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:621)
>     at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:722)
>     at org.apache.catalina.core.**ApplicationFilterChain.**
> internalDoFilter(**ApplicationFilterChain.java:**305)
>     at org.apache.catalina.core.**ApplicationFilterChain.**doFilter(**
> ApplicationFilterChain.java:**210)
>     at org.apache.catalina.filters.**SetCharacterEncodingFilter.**
> doFilter(**SetCharacterEncodingFilter.**java:108)
>     at org.apache.catalina.core.**ApplicationFilterChain.**
> internalDoFilter(**ApplicationFilterChain.java:**243)
>     at org.apache.catalina.core.**ApplicationFilterChain.**doFilter(**
> ApplicationFilterChain.java:**210)
>     at org.apache.catalina.core.**StandardWrapperValve.invoke(**
> StandardWrapperValve.java:225)
>     at org.apache.catalina.core.**StandardContextValve.invoke(**
> StandardContextValve.java:169)
>     at org.apache.tomee.catalina.**OpenEJBValve.invoke(**
> OpenEJBValve.java:44)
>
>     at org.apache.catalina.**authenticator.**AuthenticatorBase.invoke(**
> AuthenticatorBase.java:581)
>     at org.apache.catalina.core.**StandardHostValve.invoke(**
> StandardHostValve.java:168)
>     at org.apache.catalina.valves.**ErrorReportValve.invoke(**
> ErrorReportValve.java:98)
>     at org.apache.catalina.valves.**AccessLogValve.invoke(**
> AccessLogValve.java:927)
>     at org.apache.catalina.core.**StandardEngineValve.invoke(**
> StandardEngineValve.java:118)
>     at org.apache.catalina.connector.**CoyoteAdapter.service(**
> CoyoteAdapter.java:407)
>     at org.apache.coyote.http11.**AbstractHttp11Processor.**process(**
> AbstractHttp11Processor.java:**999)
>     at org.apache.coyote.**AbstractProtocol$**AbstractConnectionHandler.**
> process(AbstractProtocol.java:**565)
>     at org.apache.tomcat.util.net.**JIoEndpoint$SocketProcessor.**
> run(JIoEndpoint.java:309)
>
>     at java.util.concurrent.**ThreadPoolExecutor.runWorker(**
> ThreadPoolExecutor.java:1110)
>     at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
> ThreadPoolExecutor.java:603)
>     at java.lang.Thread.run(Thread.**java:722)
>
> Caused by: java.lang.**IllegalArgumentException: No such transaction
> isolation level '2'.  Possible values are READ_UNCOMMITTED, SERIALIZABLE,
> READ_COMMITTED, REPEATABLE_READ, NONE
>     at org.apache.openejb.resource.**jdbc.IsolationLevels.**
> getIsolationLevel(**IsolationLevels.java:39)
>     at org.apache.openejb.resource.**jdbc.BasicManagedDataSource.**
> setDefaultTransactionIsolation**(BasicManagedDataSource.java:**86)
>
>     at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>     at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
> NativeMethodAccessorImpl.java:**57)
>     at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
> DelegatingMethodAccessorImpl.**java:43)
>     at java.lang.reflect.Method.**invoke(Method.java:601)
>     at org.apache.xbean.recipe.**ObjectRecipe$MethodMember.**
> setValue(ObjectRecipe.java:**641)
>     at org.apache.xbean.recipe.**ObjectRecipe.setProperty(**
> ObjectRecipe.java:512)
>     ... 57 more
>