tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Failed to set default transaction isolation
Date Thu, 15 May 2008 04:49:53 GMT
Hi Martin,

We changed this code in 3.0 so that it uses "public synchronized void  
setDefaultTransactionIsolation(String s)" where the string can be  
NONE, READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, or  
SERIALIZABLE and empty strings (i.e. "") are checked for explicitly.

Try upgrading and see if the issue doesn't go away.

-David

On May 14, 2008, at 5:55 AM, Martin Vysny wrote:

> Hi,
>  can you help me with this one? This error occurs quite randomly and I
> cannot reproduce it at will. The openejb.xml config file:
>
> <?xml version="1.0"?>
> <openejb>
> 	<Container id="Default CMP Container" ctype="CMP_ENTITY">
> 		ConnectorName Default JDBC Database
> 	</Container>
> 	<Connector id="Default JDBC Database">
> 		JdbcDriver org.h2.Driver
> 		JdbcUrl jdbc:h2:tcp://localhost/h2/h2;LOCK_TIMEOUT=60000
> 		Username sa
> 		Password
> 	</Connector>
> 	<TransactionManager id="Default Transaction Manager"/>
> </openejb>
>
>
> It seems that the default transaction isolation level property is not
> set in the config file, however I was unable to set it in the
> openejb.xml config file.
>
> Thanks!
>
>
> java.lang.RuntimeException: javax.naming.NamingException: Attempted to
> load OpenEJB. org.apache.xbean.recipe.ConstructionException: Error
> setting property: public synchronized void
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int):  
> Error setting property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)  
> [Root exception is org.apache.openejb.OpenEJBException:  
> org.apache.xbean.recipe.ConstructionException: Error setting  
> property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int):  
> Error setting property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)]
> 	at com.whitestein.fe.it.cal.CalUtils.newComm(CalUtils.java:74)
> 	at
> com 
> .whitestein.fe.it.cal.AbstractCalDbTest.setUp(AbstractCalDbTest.java: 
> 101)
> 	at
> com 
> .whitestein.fe.it.cal.db.TransactionTest.setUp(TransactionTest.java: 
> 35)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit 
> .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal 
> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org 
> .eclipse 
> .jdt 
> .internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 
> 196)
> Caused by: javax.naming.NamingException: Attempted to load OpenEJB.
> org.apache.xbean.recipe.ConstructionException: Error setting property:
> public synchronized void
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int):  
> Error setting property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)  
> [Root exception is org.apache.openejb.OpenEJBException:  
> org.apache.xbean.recipe.ConstructionException: Error setting  
> property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int):  
> Error setting property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)]
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory 
> .getInitialContext(LocalInitialContextFactory.java:40)
> 	at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java: 
> 679)
> 	at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:259)
> 	at javax.naming.InitialContext.init(InitialContext.java:235)
> 	at javax.naming.InitialContext.<init>(InitialContext.java:209)
> 	at
> com 
> .whitestein 
> .fe 
> .embedded 
> .launcher 
> .OpenEjbAndJettyLauncher.initOpenEJB(OpenEjbAndJettyLauncher.java:266)
> 	at
> com 
> .whitestein 
> .fe 
> .embedded 
> .launcher 
> .OpenEjbAndJettyLauncher.launch(OpenEjbAndJettyLauncher.java:149)
> 	at
> com.whitestein.fe.embedded.launcher.Launcher.launch(Launcher.java:109)
> 	at com.whitestein.fe.it.cal.CalUtils.newComm(CalUtils.java:47)
> 	... 15 more
> Caused by: org.apache.openejb.OpenEJBException:
> org.apache.xbean.recipe.ConstructionException: Error setting property:
> public synchronized void
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int):  
> Error setting property: public synchronized void  
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 263)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:267)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java: 
> 36)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
> 	at
> org 
> .apache 
> .openejb 
> .client 
> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
> 	... 24 more
> Caused by: org.apache.xbean.recipe.ConstructionException: Error  
> setting
> property: public synchronized void
> org 
> .apache 
> .commons.dbcp.BasicDataSource.setDefaultTransactionIsolation(int)
> 	at
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java: 
> 410)
> 	at
> org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java: 
> 363)
> 	at
> org 
> .apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java: 
> 278)
> 	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: 
> 888)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.buildContainerSystem(Assembler.java:327)
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 250)
> 	... 34 more
> Caused by: org.apache.xbean.propertyeditor.PropertyEditorException:
> java.lang.NumberFormatException: For input string: ""
> 	at
> org 
> .apache 
> .xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java: 
> 31)
> 	at
> org 
> .apache 
> .xbean 
> .propertyeditor.AbstractConverter.toObject(AbstractConverter.java:80)
> 	at
> org 
> .apache 
> .xbean.propertyeditor.PropertyEditors.getValue(PropertyEditors.java: 
> 246)
> 	at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java: 
> 172)
> 	at
> org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java: 
> 400)
> 	... 42 more
> Caused by: java.lang.NumberFormatException: For input string: ""
> 	at
> java 
> .lang 
> .NumberFormatException.forInputString(NumberFormatException.java:63)
> 	at java.lang.Integer.parseInt(Integer.java:502)
> 	at java.lang.Integer.valueOf(Integer.java:587)
> 	at
> org 
> .apache 
> .xbean.propertyeditor.IntegerEditor.toObjectImpl(IntegerEditor.java: 
> 29)
> 	... 46 more
>
>
>
> -- 
> Mgr. Martin Vysny | mvy@whitestein.com
> Software Engineer
> Whitestein Technologies s.r.o | www.whitestein.com
> Panenska 28 | 811 03 Bratislava | Slovak Republic
> Main +421 2 5443-5502 | Direct +421 2 5930-0717
>


Mime
View raw message