openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leake, Stephen" <stephenle...@fairisaac.com>
Subject Re: OpenJPA incompatibility with WebSphere container managed transaction
Date Thu, 07 Feb 2008 10:14:00 GMT
Hi Mike,
 
I have not installed the EJB3 Feature Pack into WebSphere Server.
Instead, I am packaging the OpenJPA jar with my application.
 
The problem occurs whether I include openjpa-1.0.1.jar or
com.ibm.ws.jpa.client_6.1.0.jar (from the WebSphere Application Server
*Client* Feature Pack for EJB3) in my EAR file.
 
I am deploying my EAR file to WebSphere 6.1.0.13.
 
Is there any way to force the use of RegistryManagedRuntime instead of
WASManagedRuntime?
 
Steve.
 
 
 
 
Hi Steve,
 
Have you installed the EJB3 feature pack for WebSphere, or are you using
OpenJPA in an application?
 
I'm guessing something went wrong with the auto detection of which
ManagedRuntime to use, you should be using
org.apache.openjpa.ee.RegistryManagedRuntime, not WASManagedRuntime. I'm
not
sure how that happened though, could you describe how you've installed
OpenJPA with WebSphere?
 
The WASManagedRuntime class uses WebSphere specific APIs to sync up with
WebSphere's transaction service. It's somewhat obsolete on newer
versions of
WebSphere (including 6.1) which  support for the
TransactionSynchronizationRegsitry.
 
The workaround you mentioned uses WebSphere internal APIs, which is
frowned
upon by WebSphere support. It might work for you, but I wouldn't
recommend
using it in production unless you absolutely have to.
 
-Mike
 
On Feb 6, 2008 4:31 AM, Leake, Stephen <stephenleake@fairisaac.com>
wrote:
 
> I am having difficulty getting OpenJPA to work with WebSphere
container
> managed transactions. Code that works using the JPA transaction
manager
> fails when I to switch to JTA I get the following error:
> 
> 
> 
> Caused by: <openjpa-1.0.1-r420667:592145 nonfatal user error>
> org.apache.openjpa.persistence.InvalidStateException: An error occured
> reflecting WebSphere proprietary interfaces. Please ensure that you
are
> running the application from within WebSphere Application Server
> (version 5.0.2 or newer).
> 
>      at
>
org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASMa
> nagedRuntime.java:157)
> 
>      at
>
org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASMana
> gedRuntime.java:104)
> 
>      ... 49 more
> 
> Caused by: java.lang.IllegalArgumentException
> 
>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>      at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:64)
> 
>      at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:43)
> 
>      at java.lang.reflect.Method.invoke(Method.java:615)
> 
>      at
>
org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASMa
> nagedRuntime.java:155)
> 
>      ... 50 more
> 
> 
> 
> A Google search suggested using  aopenjpa.ManagedRuntime setting of
>
invocation(TransactionManagerMethod=com.ibm.ws.Transaction.TransactionMa
> nagerFactory.getTransactionManager) but this results in the following
> error:
> 
> 
> 
> Caused by: java.lang.NoClassDefFoundError:
> com.ibm.wsspi.extension.ExtensionRegistryFactory (initialization
> failure)
> 
>      at
>
com.ibm.ws.Transaction.TransactionManagerFactory.getTransactionManager(T
> ransactionManagerFactory.java:100)
> 
>      ... 54 more
> 
> 
> 
> Is there a magic configuration that gets CMT working or is this a bug?
> 
> 
> 
> I am using WebSphere 6.1 with the latest fixpack applied.
> 
> 
> 
> Steve.
> 
> 
> This email and any files transmitted with it are confidential,
proprietary
> and intended solely for the individual or entity to whom they are
> addressed.
> If you have received this email in error please delete it immediately.
> 
> 

 


This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message