openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (OPENJPA-1454) InstrumentationFactory crashes the tomcat WebappClassLoader by injecting org.apache.openjpa classes into the SystemClassLoader
Date Wed, 03 Mar 2010 18:22:27 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Donald Woods reassigned OPENJPA-1454:
-------------------------------------

    Assignee: Donald Woods

My proposed solution is to:
1) add the validation spec into the openjpa-all jar, to resolve one issue you were seeing
2) update the user guide to state that the openjpa-all jar should be used with Tomcat when
the instrumentation is used, to resolve the issue of missing classes from the system classloader


> InstrumentationFactory crashes the tomcat WebappClassLoader by injecting org.apache.openjpa
classes into the SystemClassLoader
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1454
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1454
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: UnenhancedClasses
>    Affects Versions: 2.0.0-M3
>            Reporter: Mark Struberg
>            Assignee: Donald Woods
>             Fix For: 2.0.0
>
>
> The InstrumentationFactory tries to find the jar containing the manifest with the pre-main
and attaches this jar to the VM.
> This has the side effect that all classes which get loaded via the Instrumentation are
added to the 'classes' Vector of the SystemClassLoader. And this causes a problem when running
OpenJPA in a WebApplication - because the SystemClassLoader only contains a few of those class
definitions, and e.g. executing     
> public void setBrokerFactory(BrokerFactory factory) {
>         _factory = new DelegatingBrokerFactory(factory,
>             PersistenceExceptions.TRANSLATOR);
>     }
> crashes the WebApp because org.apache.openjpa.util.Exceptions is available in the SystemClassLoader
but the dependent J2DoPrivHelper is not.
> This is even more problematic when using openjpa-lib, openjpa-kernel, etc as single jars
(instead of openjpa-all), because in this case only openjpa-kernel gets injected into the
VMs  system classpath - causing the agent to subsequently crash because all the classes from
openjpa-lib obviously cannot be found. 
> This might also be an explanation to a few other open JIRAs I've read through the last
few days.

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


Mime
View raw message