openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <>
Subject [jira] Closed: (OPENJPA-91) java.lang.VerifyError on websphere after application reload
Date Thu, 18 Sep 2008 18:32:44 GMT


Michael Dick closed OPENJPA-91.

    Resolution: Fixed
      Assignee: Michael Dick

Looks like this issue has been resolved.

The javax.persistence.Persistence class maintains a static cache of PersistenceProviderImpls,
this static cache remains in memory for the life of the Application Server.

The problem occurs when OpenJPA is included in an Enterprise Application, the application
runs (using classloader 1) and is restarted (classloader 1 is destroyed and a new classloader
is created). The Persistence class may hold a reference to the OpenJPA classes which were
loaded with classloader 1, when they are used with classloader 2 errors similar to the one
reported by this issue occur.

As noted earlier one way to resolve the problem is to move the OpenJPA classes outside of
the application - either to lib/ext, or to  shared library. This prevents the OpenJPA classes
from being loaded by the application classloader (instead it's loaded by the ext classloader
which is not destroyed). 

Whether this is the exact scenario that was reported by this issue is hard to say due to the
age of the issue. Please re-open the issue if it can be reproduced with a more recent version
of OpenJPA. 

> java.lang.VerifyError on websphere after application reload
> -----------------------------------------------------------
>                 Key: OPENJPA-91
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Using OpenJPA (openjpa-all-0.9.6-incubating.jar) in Rational Developer
7 ( Websphere 6.1 test environment ) connected to Oracle 9.2 database.
> OS: WinXP SP2
>            Reporter: Anders Monrad
>            Assignee: Michael Dick
>            Priority: Minor
> Hi ..
> Not sure if this is a bug or just the way websphere reacts to openjpa. 
> I have a small test program using OpenJPA against an Oracle database. I am running this
program in the Websphere 6.1 test environment included with Rational Developer 7. This is
all working just fine. But when I make changes to some ressource in the application, the chagnes
are automatically published to the test environment and the app is restarted. After this I
get the Exception below, whenever I try to access an EntityManager. 
> If I restart the entire server, the app is running fine again. So I guess this is related
to restarting the application.
> Caused by: java.lang.VerifyError: class loading constraint violated (class: org/apache/openjpa/kernel/BrokerImpl
method: newQueryImpl(Ljava/lang/String;Lorg/apache/openjpa/kernel/StoreQuery;)Lorg/apache/openjpa/kernel/QueryImpl;)
at pc: 0
> 	at java.lang.J9VMInternals.verifyImpl(Native Method)
> 	at java.lang.J9VMInternals.verify(
> 	at java.lang.J9VMInternals.initialize(
> 	at java.lang.Class.forNameImpl(Native Method)
> 	at java.lang.Class.forName(
> 	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.class$(
> 	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(
> 	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(
> 	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(
> 	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.<init>(
> 	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.apache.openjpa.kernel.Bootstrap.invokeFactory(
> 	at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(
> 	at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(
> 	at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(
> 	at javax.persistence.Persistence.createEntityManagerFactory(
> 	at javax.persistence.Persistence.createEntityManagerFactory(
> 	at util.EntityManagerFactoryHelper.getEntityManagerFactory(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message