You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2008/06/21 03:26:36 UTC

Testing/TX Recovery (Fwd: Please help)

Going to see if I can't streamline this part of our configuration.   
We've had about three users report issues related to it in some way.

Two of them (the report below is one) were simply that they were  
getting tx logging enabled in testing scenarios.  This is really more  
an issue that our method of detecting if we are embedded  or not isn't  
spot on.  These people are winding up with "heavier" defaults geared  
toward a standalone server rather than a test/embedded environment.

The other reports have been around log files overflowing with warnings  
due to tx recovery enabled in the transaction manager but not in the  
data source or mdb container.  I.e. both need to "agree" and shouldn't  
mismatch.  Seems like that's always going to be problematic so I'm  
going to see if I can't have tx recovery enabled by simply having one  
flag in the transaction manager and everything else work without a  
special flag.  I.e. one flag period, so no potential mismatch.

-David

Begin forwarded message:

> Resent-From: <db...@visi.com>
> From: David Blevins <da...@visi.com>
> Date: June 20, 2008 2:57:03 PM PDT
> To: users@openejb.apache.org
> Subject: Re: Please help
> Reply-To: users@openejb.apache.org
>
>
> On Jun 20, 2008, at 11:09 AM, Karan Malhi wrote:
>
>> If you restart openejb, does that error go away?
>> Are you trying to run a unit test/s? Could you share that code  
>> please. It
>> seems to be a File locking issue with the Logger.
>
> Right, looks like the issue is:
>  "org.objectweb.howl.log.LogConfigurationException: Unable to obtain  
> lock on C:\openejb-3.0\txlog\howl_1.log"
>
> The tx logging feature was supposed to be off, but was left on by  
> mistake.
>
> Add this to your openejb.xml file and it should stop:
>
> <TransactionManager id="TransactionManager">
>  MaxLogFiles = 0
> </TransactionManager>
>
>
> -David
>
>> On Thu, Jun 19, 2008 at 2:44 PM, Lavanya Danda <ldanda@studentloan.org 
>> >
>> wrote:
>>
>>>
>>> -----Original Message-----
>>> From: Lavanya Danda
>>> Sent: Thursday, June 19, 2008 1:40 PM
>>> To: 'user@openejb.org'
>>> Subject: Please help
>>>
>>>
>>> I am trying to setup data source with openejb. I get the following  
>>> error,
>>>
>>> ERROR - FATAL ERROR: Unknown error in Assembler. Please send the  
>>> following
>>> stack trace and this message to user@openejb.org :
>>>
>>> org.apache.xbean.recipe.ConstructionException: Error invoking  
>>> factory
>>> method: public static
>>> org.apache.geronimo.transaction.manager.GeronimoTransactionManager
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create 
>>> (int 
>>> ,byte 
>>> [],java 
>>> .lang 
>>> .String 
>>> ,int 
>>> ,boolean 
>>> ,boolean 
>>> ,int 
>>> ,java 
>>> .lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
>>> throws java.lang.Exception
>>>
>>> at
>>> org.apache.xbean.recipe.ReflectionUtil 
>>> $StaticFactory.create(ReflectionUtil.java:721)
>>>
>>> at
>>> org 
>>> .apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java: 
>>> 268)
>>>
>>> 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.createTransactionManager(Assembler.java:1058)
>>>
>>> at
>>> org 
>>> .apache 
>>> .openejb 
>>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java: 
>>> 322)
>>>
>>> at  
>>> org 
>>> .apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>>> 250)
>>>
>>> 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)
>>>
>>> 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
>>> net 
>>> .mpm.reportadmin.web.ReportAdminSBTest.test(ReportAdminSBTest.java: 
>>> 33)
>>>
>>> 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 junit.framework.TestCase.runTest(TestCase.java:154)
>>>
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>
>>> 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:128)
>>>
>>> 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: org.objectweb.howl.log.LogConfigurationException:  
>>> Unable to
>>> obtain lock on C:\openejb-3.0\txlog\howl_1.log
>>>
>>> at org.objectweb.howl.log.LogFile.open(LogFile.java:191)
>>>
>>> at org.objectweb.howl.log.LogFileManager.open(LogFileManager.java: 
>>> 784)
>>>
>>> at org.objectweb.howl.log.Logger.open(Logger.java:303)
>>>
>>> at org.objectweb.howl.log.xa.XALogger.open(XALogger.java:893)
>>>
>>> at  
>>> org.apache.geronimo.transaction.log.HOWLLog.doStart(HOWLLog.java: 
>>> 224)
>>>
>>> at
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create(GeronimoTransactionManagerFactory.java:76)
>>>
>>> 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.xbean.recipe.ReflectionUtil 
>>> $StaticFactory.create(ReflectionUtil.java:711)
>>>
>>> ... 41 more
>>>
>>> FATAL - OpenEJB has encountered a fatal error and cannot be started:
>>> Assembler failed to build the container system.
>>>
>>> org.apache.openejb.OpenEJBException:
>>> org.apache.xbean.recipe.ConstructionException: Error invoking  
>>> factory
>>> method: public static
>>> org.apache.geronimo.transaction.manager.GeronimoTransactionManager
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create 
>>> (int 
>>> ,byte 
>>> [],java 
>>> .lang 
>>> .String 
>>> ,int 
>>> ,boolean 
>>> ,boolean 
>>> ,int 
>>> ,java 
>>> .lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
>>> throws java.lang.Exception: Error invoking factory method: public  
>>> static
>>> org.apache.geronimo.transaction.manager.GeronimoTransactionManager
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create 
>>> (int 
>>> ,byte 
>>> [],java 
>>> .lang 
>>> .String 
>>> ,int 
>>> ,boolean 
>>> ,boolean 
>>> ,int 
>>> ,java 
>>> .lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
>>> throws java.lang.Exception
>>>
>>> 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)
>>>
>>> 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
>>> net 
>>> .mpm.reportadmin.web.ReportAdminSBTest.test(ReportAdminSBTest.java: 
>>> 33)
>>>
>>> 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 junit.framework.TestCase.runTest(TestCase.java:154)
>>>
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>
>>> 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:128)
>>>
>>> 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:
>>>
>>> org.apache.xbean.recipe.ConstructionException: Error invoking  
>>> factory
>>> method: public static
>>> org.apache.geronimo.transaction.manager.GeronimoTransactionManager
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create 
>>> (int 
>>> ,byte 
>>> [],java 
>>> .lang 
>>> .String 
>>> ,int 
>>> ,boolean 
>>> ,boolean 
>>> ,int 
>>> ,java 
>>> .lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
>>> throws java.lang.Exception
>>>
>>> at
>>> org.apache.xbean.recipe.ReflectionUtil 
>>> $StaticFactory.create(ReflectionUtil.java:721)
>>>
>>> at
>>> org 
>>> .apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java: 
>>> 268)
>>>
>>> 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.createTransactionManager(Assembler.java:1058)
>>>
>>> at
>>> org 
>>> .apache 
>>> .openejb 
>>> .assembler.classic.Assembler.buildContainerSystem(Assembler.java: 
>>> 322)
>>>
>>> at  
>>> org 
>>> .apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>>> 250)
>>>
>>> ... 34 more
>>>
>>> Caused by:
>>>
>>> org.objectweb.howl.log.LogConfigurationException: Unable to obtain  
>>> lock on
>>> C:\openejb-3.0\txlog\howl_1.log
>>>
>>> at org.objectweb.howl.log.LogFile.open(LogFile.java:191)
>>>
>>> at org.objectweb.howl.log.LogFileManager.open(LogFileManager.java: 
>>> 784)
>>>
>>> at org.objectweb.howl.log.Logger.open(Logger.java:303)
>>>
>>> at org.objectweb.howl.log.xa.XALogger.open(XALogger.java:893)
>>>
>>> at  
>>> org.apache.geronimo.transaction.log.HOWLLog.doStart(HOWLLog.java: 
>>> 224)
>>>
>>> at
>>> org 
>>> .apache 
>>> .openejb 
>>> .resource 
>>> .GeronimoTransactionManagerFactory 
>>> .create(GeronimoTransactionManagerFactory.java:76)
>>>
>>> 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.xbean.recipe.ReflectionUtil 
>>> $StaticFactory.create(ReflectionUtil.java:711)
>>>
>>> ... 41 more
>>>
>>>
>>>
>>>
>>> This e-mail and any files transmitted with it are confidential and  
>>> intended
>>> solely for the use of the individual or entity to whom they are  
>>> addressed.
>>> If you have received this e-mail in error please notify the  
>>> originator of
>>> the message. This footer also confirms that this
>>> e-mail message has been scanned for the presence of computer  
>>> viruses.
>>>
>>> Any views expressed in this message are those of the individual  
>>> sender,
>>> except where the sender specifies and with authority, states them  
>>> to be the
>>> views of Iowa Student Loan.
>>>
>>>
>>
>>
>> -- 
>> Karan Singh Malhi
>
>