You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Balazs Zsoldos (JIRA)" <ji...@apache.org> on 2011/07/06 15:49:16 UTC
[jira] [Created] (ARIES-704) BundleToClassLoaderAdapter does not
implement loadClass(String, boolean)
BundleToClassLoaderAdapter does not implement loadClass(String, boolean)
------------------------------------------------------------------------
Key: ARIES-704
URL: https://issues.apache.org/jira/browse/ARIES-704
Project: Aries
Issue Type: Bug
Components: Util
Environment: Glassfish 3.1, aries-eclipselink-adapter, JDK 1.6.0_26
Reporter: Balazs Zsoldos
When there is a loadClass(String) to a classloader it simply calls loadClass(String, boolean). The second function checks if a class is available in the parent classloader by checking loadClass(String, boolean). If BundleToClassLoader adapter is used for a ClassLoader as the parent, the loadClass(String) will never be called.
Here is a sample stacktrace ( line numbers from JDK 1.6.0_26):
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer$1.findClass(Activator.java:102)
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:93)
at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (ARIES-704) BundleToClassLoaderAdapter does not
implement loadClass(String, boolean)
Posted by "Alasdair Nottingham (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alasdair Nottingham resolved ARIES-704.
---------------------------------------
Resolution: Fixed
I just found this and it appears that it was fixed over 16 months ago, so I'm marking it as resolved.
> BundleToClassLoaderAdapter does not implement loadClass(String, boolean)
> ------------------------------------------------------------------------
>
> Key: ARIES-704
> URL: https://issues.apache.org/jira/browse/ARIES-704
> Project: Aries
> Issue Type: Bug
> Components: Util
> Environment: Glassfish 3.1, aries-eclipselink-adapter, JDK 1.6.0_26
> Reporter: Balazs Zsoldos
> Fix For: util-0.5
>
> Attachments: BundleToClassLoaderAdapter fix.patch
>
>
> When there is a loadClass(String) to a classloader it simply calls loadClass(String, boolean). The second function checks if a class is available in the parent classloader by checking loadClass(String, boolean). If BundleToClassLoader adapter is used for a ClassLoader as the parent, the loadClass(String) will never be called.
> Here is a sample stacktrace ( line numbers from JDK 1.6.0_26):
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer$1.findClass(Activator.java:102)
> 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:93)
> at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-704) BundleToClassLoaderAdapter does not
implement loadClass(String, boolean)
Posted by "Balazs Zsoldos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Balazs Zsoldos updated ARIES-704:
---------------------------------
Attachment: BundleToClassLoaderAdapter fix.patch
The patch I created simply implements the loadClass(String, boolean) in a way that if the parameter resolved is true it throws an unsupported exception otherwise the original behavior will be done.
> BundleToClassLoaderAdapter does not implement loadClass(String, boolean)
> ------------------------------------------------------------------------
>
> Key: ARIES-704
> URL: https://issues.apache.org/jira/browse/ARIES-704
> Project: Aries
> Issue Type: Bug
> Components: Util
> Environment: Glassfish 3.1, aries-eclipselink-adapter, JDK 1.6.0_26
> Reporter: Balazs Zsoldos
> Attachments: BundleToClassLoaderAdapter fix.patch
>
>
> When there is a loadClass(String) to a classloader it simply calls loadClass(String, boolean). The second function checks if a class is available in the parent classloader by checking loadClass(String, boolean). If BundleToClassLoader adapter is used for a ClassLoader as the parent, the loadClass(String) will never be called.
> Here is a sample stacktrace ( line numbers from JDK 1.6.0_26):
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer$1.findClass(Activator.java:102)
> 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:93)
> at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-704) BundleToClassLoaderAdapter does not
implement loadClass(String, boolean)
Posted by "Jeremy Hughes (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Hughes updated ARIES-704:
--------------------------------
Fix Version/s: util-0.4
> BundleToClassLoaderAdapter does not implement loadClass(String, boolean)
> ------------------------------------------------------------------------
>
> Key: ARIES-704
> URL: https://issues.apache.org/jira/browse/ARIES-704
> Project: Aries
> Issue Type: Bug
> Components: Util
> Environment: Glassfish 3.1, aries-eclipselink-adapter, JDK 1.6.0_26
> Reporter: Balazs Zsoldos
> Fix For: util-0.4
>
> Attachments: BundleToClassLoaderAdapter fix.patch
>
>
> When there is a loadClass(String) to a classloader it simply calls loadClass(String, boolean). The second function checks if a class is available in the parent classloader by checking loadClass(String, boolean). If BundleToClassLoader adapter is used for a ClassLoader as the parent, the loadClass(String) will never be called.
> Here is a sample stacktrace ( line numbers from JDK 1.6.0_26):
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer$1.findClass(Activator.java:102)
> 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:93)
> at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-704) BundleToClassLoaderAdapter does not
implement loadClass(String, boolean)
Posted by "Jarek Gawor (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Gawor updated ARIES-704:
------------------------------
Fix Version/s: (was: util-0.4)
util-0.5
> BundleToClassLoaderAdapter does not implement loadClass(String, boolean)
> ------------------------------------------------------------------------
>
> Key: ARIES-704
> URL: https://issues.apache.org/jira/browse/ARIES-704
> Project: Aries
> Issue Type: Bug
> Components: Util
> Environment: Glassfish 3.1, aries-eclipselink-adapter, JDK 1.6.0_26
> Reporter: Balazs Zsoldos
> Fix For: util-0.5
>
> Attachments: BundleToClassLoaderAdapter fix.patch
>
>
> When there is a loadClass(String) to a classloader it simply calls loadClass(String, boolean). The second function checks if a class is available in the parent classloader by checking loadClass(String, boolean). If BundleToClassLoader adapter is used for a ClassLoader as the parent, the loadClass(String) will never be called.
> Here is a sample stacktrace ( line numbers from JDK 1.6.0_26):
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer$1.findClass(Activator.java:102)
> 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:93)
> at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira