[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-07-06 Thread Balazs Zsoldos (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13060354#comment-13060354
 ] 

Balazs Zsoldos commented on ARIES-681:
--

Hi,

thank you very much for the fast response. I think as there is a new issue that 
has the aim to make this work this issue could be closed. I tried the solution 
compiled from SVN and ran into some exceptions. I will note these at ARIES-691.

Regards,
Balazs

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-07-04 Thread Balazs Zsoldos (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13059489#comment-13059489
 ] 

Balazs Zsoldos commented on ARIES-681:
--

Hi,

I will upload a sample application soon that will show my problem. I do not use 
the OSGI capabilities of EclipseLink due to the following reason:
- I would like to use aries blueprint and jpa:context tag.
- I am afraid that if I use the standard Eclipselink solution (persistence.xml 
into META-INF library) I will face many problems with transaction management 
and aries blueprint

So my solution was that I defined the Meta-Persistence in the manifest 
header. As EclipseLink does not register the PersistenceProvider as an OSGI 
service (Aries needs it based on the OSGI 4.2 specification I think) I created 
a jar file that does nothing else but the service registration.

I tried to register the osgi based PersistenceProvider of EclipseLink but I got 
an exception that createContainerEntityManagerFactory function cannot be called 
in an OSGI environment (Aries JPA container calls it). Due to this reason I 
registered the ordinary PersistenceProvider of EclipseLink and that is where 
this bug came from. Aries JPA container uses ordinary Eclipselink persistence 
provider. Aries creates the Persistence Unit as well, Eclipselink does not do 
anything automatically.

Regards,
Balazs

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on 

[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-07-04 Thread Valentin Mahrwald (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13059494#comment-13059494
 ] 

Valentin Mahrwald commented on ARIES-681:
-

Under ARIES-691 I have checked in some tests and integration code to make 
EclipseLink work the whole way (including using managed contexts). There is 
some more cleanup to be done under that JIRA to move more of the integration 
into the adapter bundle. 

The code prereqs the latest (as yet unreleased) JPA code but my help in your 
scenario :)

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-06-23 Thread Balazs Zsoldos (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13053687#comment-13053687
 ] 

Balazs Zsoldos commented on ARIES-681:
--

Hi,

thank you for the fast responses. I do not use classes from Eclipselink at all 
in my bundle so it may be during deployment time. I will be in the office in 
two weeks again and I will try the weaving setting you suggested. Also if it 
does not work I will create a jira issue on Eclipselink side as well with a 
sample application to see what they say.

Thanks,
Balazs

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira