You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/04/06 21:28:13 UTC
[jira] [Created] (OPENJPA-2575) wrong context class loader in
org.apache.openjpa.enhance.PCClassFileTransformer#transform0
Romain Manni-Bucau created OPENJPA-2575:
-------------------------------------------
Summary: wrong context class loader in org.apache.openjpa.enhance.PCClassFileTransformer#transform0
Key: OPENJPA-2575
URL: https://issues.apache.org/jira/browse/OPENJPA-2575
Project: OpenJPA
Issue Type: New Feature
Reporter: Romain Manni-Bucau
Hi
if there is a temp loader in org.apache.openjpa.enhance.PCClassFileTransformer#transform0 then it should be the context where classes are loaded during the enhancement (transform0). typically "new Project().loadClass(new ByteArrayInputStream(bytes), _tmpLoader)" shouldn't be done outside of _tmpLoader contextual loader.
Standard Thread.currentThread().setContextClassLoader(_tmpLoader); then setContextClassLoader(old) try/finally solves it.
Side note: this issue has been reported originally on tomee@.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)