You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Reinhard Sandtner (JIRA)" <ji...@apache.org> on 2016/03/04 14:58:40 UTC

[jira] [Updated] (OPENJPA-2632) select new not working if result class is not in same classloader

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

Reinhard Sandtner updated OPENJPA-2632:
---------------------------------------
    Attachment: OPENJPA-2632.patch

pull request is also available here https://github.com/apache/openjpa/pull/4
patch was made with git

i've no idea how to add a unit test for this issue. you can reproduce the issue with https://github.com/struberg/was_bugs/tree/master/was_bug19

{{mvn clean install tomee:run}} in was_bug19_ear
browse to http://localhost:8080/was_bug19
click 'Insert Data' -> 1000 entries will be inserted
click the 'Load Data' -> kawumm...

after appliing the patch just do the same with {{-Dopenjpa.version=2.4.2-SNAPSHOT}} and it should work

> select new not working if result class is not in same classloader
> -----------------------------------------------------------------
>
>                 Key: OPENJPA-2632
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2632
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.4.1
>            Reporter: Reinhard Sandtner
>         Attachments: OPENJPA-2632.patch
>
>
> in my case i'm using an ear with multiple war files.
> the entities are located in ear/lib and my select new result class and the service which loads it are located in a war (doesn't matter if in WEB-INF/lib or WEB-INF/classes)
> openJPA uses the CL stored in QueryImpl but this one can not load my class.
> imo if the class can not be loaded with the stored class loader, we can try to use the TCCL to load the class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)