You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jfjames <je...@atosorigin.com> on 2008/04/08 12:37:30 UTC

@TransactionAttribute pb with OpenEJB 3.0

Hi,

I've tried to migrate an application from OpenEJB 3.0-beta2 to OpenEJB 3.0
(delivered by D. Blevins on April 4th).

I've encountered a deployment error linked to the @TransactionAttribute
annotation. 

When this annotation is present on a Stateless Session bean method, whatever
its value is (SUPPORTS, REQUIRED etc ...), it generates a ClassCastException
on MethodTransactionInfo :

Caused by: java.lang.ClassCastException:
org.apache.openejb.assembler.classic.MethodTransactionInfo
	at
org.apache.openejb.assembler.classic.MethodTransactionBuilder.applyTransactionAttributes(MethodTransactionBuilder.java:58)
	at
org.apache.openejb.assembler.classic.MethodTransactionBuilder.build(MethodTransactionBuilder.java:42)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:498)
	
When I remove the annotation, the application is deployed and run correctly.

I've done this test using Tomcat 6.0.16 and the SUN JVM 1.5.0_04 under
Windows NT.
-- 
View this message in context: http://www.nabble.com/%40TransactionAttribute-pb-with-OpenEJB-3.0-tp16556629p16556629.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: @TransactionAttribute pb with OpenEJB 3.0

Posted by David Blevins <da...@visi.com>.
On Apr 8, 2008, at 12:47 PM, David Blevins wrote:

>
> On Apr 8, 2008, at 3:37 AM, jfjames wrote:
>>
>> Hi,
>>
>> I've tried to migrate an application from OpenEJB 3.0-beta2 to  
>> OpenEJB 3.0
>> (delivered by D. Blevins on April 4th).
>>
>> I've encountered a deployment error linked to the  
>> @TransactionAttribute
>> annotation.
>>
>> When this annotation is present on a Stateless Session bean method,  
>> whatever
>> its value is (SUPPORTS, REQUIRED etc ...), it generates a  
>> ClassCastException
>> on MethodTransactionInfo :
>>
>> Caused by: java.lang.ClassCastException:
>> org.apache.openejb.assembler.classic.MethodTransactionInfo
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .assembler 
>> .classic 
>> .MethodTransactionBuilder 
>> .applyTransactionAttributes(MethodTransactionBuilder.java:58)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .assembler 
>> .classic 
>> .MethodTransactionBuilder.build(MethodTransactionBuilder.java:42)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .assembler.classic.Assembler.createApplication(Assembler.java:498)
>> 	
>> When I remove the annotation, the application is deployed and run  
>> correctly.
>>
>
> Ok, I see the bug.  It's in some debug output that can be shut off.   
> If you set the log4j "OpenEJB.startup.attributes" log category to  
> INFO or anything higher than DEBUG, the problem will go away.
>
> Already fixed it in trunk, it will be released with 3.0.1.  The 3.0  
> final is in mid vote and hopefully will be out tomorrow.


Just an FYI, the 3.0 binaries did have to be re-rolled and we were  
able to include this fix.  So you shouldn't have this issue with the  
3.0 final binaries up download.

-David


Re: @TransactionAttribute pb with OpenEJB 3.0

Posted by David Blevins <da...@visi.com>.
On Apr 8, 2008, at 3:37 AM, jfjames wrote:
>
> Hi,
>
> I've tried to migrate an application from OpenEJB 3.0-beta2 to  
> OpenEJB 3.0
> (delivered by D. Blevins on April 4th).
>
> I've encountered a deployment error linked to the  
> @TransactionAttribute
> annotation.
>
> When this annotation is present on a Stateless Session bean method,  
> whatever
> its value is (SUPPORTS, REQUIRED etc ...), it generates a  
> ClassCastException
> on MethodTransactionInfo :
>
> Caused by: java.lang.ClassCastException:
> org.apache.openejb.assembler.classic.MethodTransactionInfo
> 	at
> org 
> .apache 
> .openejb 
> .assembler 
> .classic 
> .MethodTransactionBuilder 
> .applyTransactionAttributes(MethodTransactionBuilder.java:58)
> 	at
> org 
> .apache 
> .openejb 
> .assembler 
> .classic 
> .MethodTransactionBuilder.build(MethodTransactionBuilder.java:42)
> 	at
> org 
> .apache 
> .openejb 
> .assembler.classic.Assembler.createApplication(Assembler.java:498)
> 	
> When I remove the annotation, the application is deployed and run  
> correctly.
>

Ok, I see the bug.  It's in some debug output that can be shut off.   
If you set the log4j "OpenEJB.startup.attributes" log category to INFO  
or anything higher than DEBUG, the problem will go away.

Already fixed it in trunk, it will be released with 3.0.1.  The 3.0  
final is in mid vote and hopefully will be out tomorrow.

-David