You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Kevan Miller (JIRA)" <ji...@apache.org> on 2011/01/13 02:05:46 UTC
[jira] Created: (GERONIMO-5751) LinkageError running CDI TCK
LinkageError running CDI TCK
----------------------------
Key: GERONIMO-5751
URL: https://issues.apache.org/jira/browse/GERONIMO-5751
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Affects Versions: 3.0-M2
Reporter: Kevan Miller
Fix For: 3.0-M2
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Commented] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032076#comment-13032076 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
This wasn't really a fix, but a work around. We've now got this hack in multiple places and it's still not enough. There are classloading environments not under our control. We need a better solution...
I've created an Equinox bug report -- https://bugs.eclipse.org/bugs/show_bug.cgi?id=345500
There may be other solutions, but would be cool if Equinox could help detect this situation like Felix does.
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevan Miller closed GERONIMO-5751.
----------------------------------
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981067#action_12981067 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
Same flow in Felix. However, Felix is detecting that this is a loadClass() for a class that is already being loaded by the ClassLoader. So, the redundant call is ignored.
ModuleImpl is org.apache.felix.framework.ModuleImpl
Daemon System Thread [RMI TCP Connection(4)-10.0.1.4] (Suspended)
ModuleImpl.findClassOrResourceByDelegation(String, boolean) line: 765
ModuleImpl.access$200(ModuleImpl, String, boolean) line: 73
ModuleImpl$ModuleClassLoader.loadClass(String, boolean) line: 1690
ModuleImpl$ModuleClassLoader(ClassLoader).loadClass(String) line: 248
ModuleImpl.getClassByDelegation(String) line: 634
Felix.loadBundleClass(BundleImpl, String) line: 1594
BundleImpl.loadClass(String) line: 887
BundleResourceClassLoader(BundleClassLoader).loadClass(String, boolean) line: 70
TemporaryClassLoader(ClassLoader).loadClass(String, boolean) line: 296
TemporaryClassLoader.loadClass(String, boolean) line: 104
TemporaryClassLoader.loadClass(String) line: 62
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String, boolean, ClassLoader) line: 247
PCClassFileTransformer.needsEnhance(String, Class, byte[]) line: 186
PCClassFileTransformer.transform0(String, Class, byte[]) line: 132
PCClassFileTransformer.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 120
PersistenceProviderImpl$ClassTransformerImpl.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 312
TransformerWrapper.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 43
TransformerCollection.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 53
TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169
InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365
ClassLoader.defineClass1(String, byte[], int, int, ProtectionDomain, String, boolean) line: not available [native method]
ModuleImpl$ModuleClassLoader(ClassLoader).defineClassCond(String, byte[], int, int, ProtectionDomain, boolean) line: 632
ModuleImpl$ModuleClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 616
ModuleImpl$ModuleClassLoader.findClass(String) line: 1829
ModuleImpl.findClassOrResourceByDelegation(String, boolean) line: 716
ModuleImpl.access$200(ModuleImpl, String, boolean) line: 73
ModuleImpl$ModuleClassLoader.loadClass(String, boolean) line: 1690
ModuleImpl$ModuleClassLoader(ClassLoader).loadClass(String) line: 248
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String, boolean, ClassLoader) line: 247
CoreReflectionFactory.makeNamedType(String) line: 95
Reifier.visitClassTypeSignature(ClassTypeSignature) line: 107
ClassTypeSignature.accept(TypeTreeVisitor<?>) line: 31
AnnotationParser.parseSig(String, Class) line: 370
AnnotationParser.parseAnnotation(ByteBuffer, ConstantPool, Class, boolean) line: 181
AnnotationParser.parseAnnotations2(byte[], ConstantPool, Class) line: 69
AnnotationParser.parseAnnotations(byte[], ConstantPool, Class) line: 52
Method.declaredAnnotations() line: 693
Method.getDeclaredAnnotations() line: 686
Method(AccessibleObject).getAnnotations() line: 175
AbstractFinder$MethodInfo(AbstractFinder$Annotatable).<init>(AbstractFinder, AnnotatedElement) line: 575
AbstractFinder$MethodInfo.<init>(AbstractFinder, AbstractFinder$ClassInfo, Method) line: 725
ClassFinder(AbstractFinder).readClassDef(Class) line: 552
ClassFinder.<init>(List<Class>) line: 137
AnnotationDeployer$ProcessAnnotatedBeans.createInheritedClassFinder(Class<?>...) line: 3608
AnnotationDeployer$ProcessAnnotatedBeans.deploy(CdiBeanInfo) line: 670
AnnotationDeployer.deploy(CdiBeanInfo) line: 246
CdiResourceInjectionService.buildInjections(Set<Class<?>>) line: 73
OpenEJBLifecycle.startApplication(Object) line: 158
ThreadSingletonServiceAdapter.initialize(StartupObject) line: 62
CdiBuilder.build(AppInfo, AppContext, List<BeanContext>) line: 46
Assembler.createApplication(AppInfo, ClassLoader, boolean) line: 649
Assembler.createApplication(AppInfo, ClassLoader) line: 461
OpenEjbSystemGBean.createApplication(AppInfo, ClassLoader) line: 438
EjbModuleImpl.doStart() line: 183
GBeanInstance.createInstance() line: 975
GBeanInstanceState.attemptFullStart() line: 271
GBeanInstanceState.start() line: 105
GBeanInstance.start() line: 546
GBeanDependency.attemptFullStart() line: 110
GBeanDependency.addTarget(AbstractName) line: 145
GBeanDependency$1.running(AbstractName) line: 119
BasicLifecycleMonitor.fireRunningEvent(AbstractName) line: 175
BasicLifecycleMonitor.access$300(BasicLifecycleMonitor, AbstractName) line: 44
BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent() line: 253
GBeanInstanceState.attemptFullStart() line: 301
GBeanInstanceState.start() line: 105
GBeanInstance.start() line: 546
GBeanDependency.attemptFullStart() line: 110
GBeanDependency.addTarget(AbstractName) line: 145
GBeanDependency$1.running(AbstractName) line: 119
BasicLifecycleMonitor.fireRunningEvent(AbstractName) line: 175
BasicLifecycleMonitor.access$300(BasicLifecycleMonitor, AbstractName) line: 44
BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent() line: 253
GBeanInstanceState.attemptFullStart() line: 301
GBeanInstanceState.start() line: 105
GBeanInstanceState.startRecursive() line: 127
GBeanInstance.startRecursive() line: 560
BasicKernel.startRecursiveGBean(AbstractName) line: 386
ConfigurationUtil.startConfigurationGBeans(AbstractName, Configuration, Kernel) line: 460
EditableKernelConfigurationManager(KernelConfigurationManager).start(Configuration) line: 224
EditableKernelConfigurationManager(SimpleConfigurationManager).startConfiguration(Artifact, LifecycleMonitor) line: 698
EditableKernelConfigurationManager(SimpleConfigurationManager).startConfiguration(Artifact) line: 677
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ReflectionMethodInvoker.invoke(Object, Object[]) line: 34
GBeanOperation.invoke(Object, Object[]) line: 131
GBeanInstance.invoke(String, Object[], String[]) line: 872
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 245
KernelGBean.invoke(AbstractName, String, Object[], String[]) line: 344
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ReflectionMethodInvoker.invoke(Object, Object[]) line: 34
GBeanOperation.invoke(Object, Object[]) line: 131
GBeanInstance.invoke(String, Object[], String[]) line: 872
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 245
MBeanGBeanBridge.invoke(String, Object[], String[]) line: 172
DefaultMBeanServerInterceptor.invoke(ObjectName, String, Object[], String[]) line: 836
JmxMBeanServer.invoke(ObjectName, String, Object[], String[]) line: 761
RMIConnectionImpl.doOperation(int, Object[]) line: 1427
RMIConnectionImpl.access$200(RMIConnectionImpl, int, Object[]) line: 72
RMIConnectionImpl$PrivilegedOperation.run() line: 1265
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
RMIConnectionImpl.doPrivilegedOperation(int, Object[], Subject) line: 1367
RMIConnectionImpl.invoke(ObjectName, String, MarshalledObject, String[], Subject) line: 788
GeneratedMethodAccessor62.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
UnicastServerRef2(UnicastServerRef).dispatch(Remote, RemoteCall) line: 305
Transport$1.run() line: 159
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
TCPTransport(Transport).serviceCall(RemoteCall) line: 155
TCPTransport.handleMessages(Connection, boolean) line: 535
TCPTransport$ConnectionHandler.run0() line: 790
TCPTransport$ConnectionHandler.run() line: 649
ThreadPoolExecutor$Worker.runTask(Runnable) line: 886
ThreadPoolExecutor$Worker.run() line: 908
Thread.run() line: 680
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick McGuire resolved GERONIMO-5751.
------------------------------------
Resolution: Fixed
Committed revision 1058546.
The stack trace for the transformer gave a good clue as to what is going on and suggested a simple fix. This error will only occur on the first time that annotation class is required. I added some simple retry logic to the xbean AbstractFinder class to catch a LinkageError and perform a single retry of the request. Since the annotation classes are already loaded on the second attempt, this will succeed.
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Commented] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034503#comment-13034503 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
New builds of Equinox contain a fix for LinkageError's caused by cyclical classloading.
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981286#action_12981286 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
That would work. A bit ugly... But not sure I have anything better to offer...
An obvious change would be to remove the special annotation processing from TemporaryClassLoader:
{code}
// Annotation classes must be loaded by the normal classloader
if (isAnnotationClass(bytes)) {
return super.loadClass(name, resolve);
}
{code}
TemporaryClassLoader (and this checking) originated in OpenJPA. It looks like any change to this behavior (i.e. loading annotations in the TemporaryClassLoader, rather than the parent) is going to cause problems for OpenJPA. See https://issues.apache.org/jira/browse/OPENJPA-646. This also implies that our TemporaryClassLoader may need a few updates. Will create a separate Jira to track this.
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981117#action_12981117 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
For the record, here's the LinkageError you get running the TCK:
Caused by: java.lang.LinkageError: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader): attempted duplicate class definition for name: "org/testng/annotations/BeforeSuite"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:181)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.reflect.Method.declaredAnnotations(Method.java:693)
at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:686)
at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:175)
at org.apache.xbean.finder.AbstractFinder$Annotatable.<init>(AbstractFinder.java:575)
at org.apache.xbean.finder.AbstractFinder$MethodInfo.<init>(AbstractFinder.java:725)
at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:552)
at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:137)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.createInheritedClassFinder(AnnotationDeployer.java:3608)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:670)
at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:246)
at org.apache.openejb.cdi.CdiResourceInjectionService.buildInjections(CdiResourceInjectionService.java:73)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:158)
at org.apache.geronimo.openejb.ThreadSingletonServiceAdapter.initialize(ThreadSingletonServiceAdapter.java:62)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:46)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:649)
... 70 more
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Reopened] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevan Miller reopened GERONIMO-5751:
------------------------------------
Assignee: Kevan Miller
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevan Miller resolved GERONIMO-5751.
------------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.0-M2)
3.0
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981064#action_12981064 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
Basic problem is that OpenJPA class transformation / TemporaryClassLoader behavior / Equinox behavior is causing duplicate/redundant defineClasse() invocations for the same Class on the same ClassLoader. Call stack follows. Apologies about the missing package names -- Eclipse doesn't give them to me. DefaultClassLoader is org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader:
Daemon System Thread [RMI TCP Connection(4)-10.0.1.4] (Suspended)
ClassLoader.defineClass1(String, byte[], int, int, ProtectionDomain, String, boolean) line: not available [native method]
DefaultClassLoader(ClassLoader).defineClassCond(String, byte[], int, int, ProtectionDomain, boolean) line: 632
DefaultClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 616
DefaultClassLoader.defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 188
ClasspathManager.defineClass(String, byte[], ClasspathEntry, BundleEntry, ClassLoadingStatsHook[]) line: 580
ClasspathManager.findClassImpl(String, ClasspathEntry, ClassLoadingStatsHook[]) line: 550
ClasspathManager.findLocalClassImpl(String, ClassLoadingStatsHook[]) line: 481
ClasspathManager.findLocalClass_LockClassLoader(String, ClassLoadingStatsHook[]) line: 469
ClasspathManager.findLocalClass(String) line: 449
DefaultClassLoader.findLocalClass(String) line: 216
BundleLoader.findLocalClass(String) line: 393
BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 469
BundleLoader.findClass(String, boolean) line: 422
BundleLoader.findClass(String) line: 410
DefaultClassLoader.loadClass(String, boolean) line: 107
DefaultClassLoader(ClassLoader).loadClass(String) line: 248
BundleLoader.loadClass(String) line: 338
BundleHost.loadClass(String, boolean) line: 232
BundleHost(AbstractBundle).loadClass(String) line: 1197
BundleResourceClassLoader(BundleClassLoader).loadClass(String, boolean) line: 70
TemporaryClassLoader(ClassLoader).loadClass(String, boolean) line: 296
TemporaryClassLoader.loadClass(String, boolean) line: 104
TemporaryClassLoader.loadClass(String) line: 62
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String, boolean, ClassLoader) line: 247
PCClassFileTransformer.needsEnhance(String, Class, byte[]) line: 186
PCClassFileTransformer.transform0(String, Class, byte[]) line: 132
PCClassFileTransformer.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 120
PersistenceProviderImpl$ClassTransformerImpl.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 312
TransformerWrapper.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 43
TransformerCollection.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 53
TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169
InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365
ClassLoader.defineClass1(String, byte[], int, int, ProtectionDomain, String, boolean) line: not available [native method]
DefaultClassLoader(ClassLoader).defineClassCond(String, byte[], int, int, ProtectionDomain, boolean) line: 632
DefaultClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 616
DefaultClassLoader.defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 188
ClasspathManager.defineClass(String, byte[], ClasspathEntry, BundleEntry, ClassLoadingStatsHook[]) line: 580
ClasspathManager.findClassImpl(String, ClasspathEntry, ClassLoadingStatsHook[]) line: 550
ClasspathManager.findLocalClassImpl(String, ClassLoadingStatsHook[]) line: 481
ClasspathManager.findLocalClass_LockClassLoader(String, ClassLoadingStatsHook[]) line: 469
ClasspathManager.findLocalClass(String) line: 449
DefaultClassLoader.findLocalClass(String) line: 216
BundleLoader.findLocalClass(String) line: 393
BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 469
BundleLoader.findClass(String, boolean) line: 422
BundleLoader.findClass(String) line: 410
DefaultClassLoader.loadClass(String, boolean) line: 107
DefaultClassLoader(ClassLoader).loadClass(String) line: 248
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String, boolean, ClassLoader) line: 247
CoreReflectionFactory.makeNamedType(String) line: 95
Reifier.visitClassTypeSignature(ClassTypeSignature) line: 107
ClassTypeSignature.accept(TypeTreeVisitor<?>) line: 31
AnnotationParser.parseSig(String, Class) line: 370
AnnotationParser.parseAnnotation(ByteBuffer, ConstantPool, Class, boolean) line: 181
AnnotationParser.parseAnnotations2(byte[], ConstantPool, Class) line: 69
AnnotationParser.parseAnnotations(byte[], ConstantPool, Class) line: 52
Method.declaredAnnotations() line: 693
Method.getDeclaredAnnotations() line: 686
Method(AccessibleObject).getAnnotations() line: 175
AbstractFinder$MethodInfo(AbstractFinder$Annotatable).<init>(AbstractFinder, AnnotatedElement) line: 575
AbstractFinder$MethodInfo.<init>(AbstractFinder, AbstractFinder$ClassInfo, Method) line: 725
ClassFinder(AbstractFinder).readClassDef(Class) line: 552
ClassFinder.<init>(List<Class>) line: 137
AnnotationDeployer$ProcessAnnotatedBeans.createInheritedClassFinder(Class<?>...) line: 3608
AnnotationDeployer$ProcessAnnotatedBeans.deploy(CdiBeanInfo) line: 670
AnnotationDeployer.deploy(CdiBeanInfo) line: 246
CdiResourceInjectionService.buildInjections(Set<Class<?>>) line: 73
OpenEJBLifecycle.startApplication(Object) line: 158
ThreadSingletonServiceAdapter.initialize(StartupObject) line: 62
CdiBuilder.build(AppInfo, AppContext, List<BeanContext>) line: 46
Assembler.createApplication(AppInfo, ClassLoader, boolean) line: 649
Assembler.createApplication(AppInfo, ClassLoader) line: 461
OpenEjbSystemGBean.createApplication(AppInfo, ClassLoader) line: 438
EjbModuleImpl.doStart() line: 183
GBeanInstance.createInstance() line: 975
GBeanInstanceState.attemptFullStart() line: 271
GBeanInstanceState.start() line: 105
GBeanInstance.start() line: 546
GBeanDependency.attemptFullStart() line: 110
GBeanDependency.addTarget(AbstractName) line: 145
GBeanDependency$1.running(AbstractName) line: 119
BasicLifecycleMonitor.fireRunningEvent(AbstractName) line: 175
BasicLifecycleMonitor.access$300(BasicLifecycleMonitor, AbstractName) line: 44
BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent() line: 253
GBeanInstanceState.attemptFullStart() line: 301
GBeanInstanceState.start() line: 105
GBeanInstance.start() line: 546
GBeanDependency.attemptFullStart() line: 110
GBeanDependency.addTarget(AbstractName) line: 145
GBeanDependency$1.running(AbstractName) line: 119
BasicLifecycleMonitor.fireRunningEvent(AbstractName) line: 175
BasicLifecycleMonitor.access$300(BasicLifecycleMonitor, AbstractName) line: 44
BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent() line: 253
GBeanInstanceState.attemptFullStart() line: 301
GBeanInstanceState.start() line: 105
GBeanInstanceState.startRecursive() line: 127
GBeanInstance.startRecursive() line: 560
BasicKernel.startRecursiveGBean(AbstractName) line: 386
ConfigurationUtil.startConfigurationGBeans(AbstractName, Configuration, Kernel) line: 460
EditableKernelConfigurationManager(KernelConfigurationManager).start(Configuration) line: 224
EditableKernelConfigurationManager(SimpleConfigurationManager).startConfiguration(Artifact, LifecycleMonitor) line: 698
EditableKernelConfigurationManager(SimpleConfigurationManager).startConfiguration(Artifact) line: 677
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ReflectionMethodInvoker.invoke(Object, Object[]) line: 34
GBeanOperation.invoke(Object, Object[]) line: 131
GBeanInstance.invoke(String, Object[], String[]) line: 872
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 245
KernelGBean.invoke(AbstractName, String, Object[], String[]) line: 344
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ReflectionMethodInvoker.invoke(Object, Object[]) line: 34
GBeanOperation.invoke(Object, Object[]) line: 131
GBeanInstance.invoke(String, Object[], String[]) line: 872
BasicKernel.invoke(AbstractName, String, Object[], String[]) line: 245
MBeanGBeanBridge.invoke(String, Object[], String[]) line: 172
DefaultMBeanServerInterceptor.invoke(ObjectName, String, Object[], String[]) line: 836
JmxMBeanServer.invoke(ObjectName, String, Object[], String[]) line: 761
RMIConnectionImpl.doOperation(int, Object[]) line: 1427
RMIConnectionImpl.access$200(RMIConnectionImpl, int, Object[]) line: 72
RMIConnectionImpl$PrivilegedOperation.run() line: 1265
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
RMIConnectionImpl.doPrivilegedOperation(int, Object[], Subject) line: 1367
RMIConnectionImpl.invoke(ObjectName, String, MarshalledObject, String[], Subject) line: 788
GeneratedMethodAccessor59.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
UnicastServerRef2(UnicastServerRef).dispatch(Remote, RemoteCall) line: 305
Transport$1.run() line: 159
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
TCPTransport(Transport).serviceCall(RemoteCall) line: 155
TCPTransport.handleMessages(Connection, boolean) line: 535
TCPTransport$ConnectionHandler.run0() line: 790
TCPTransport$ConnectionHandler.run() line: 649
ThreadPoolExecutor$Worker.runTask(Runnable) line: 886
ThreadPoolExecutor$Worker.run() line: 908
Thread.run() line: 680
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981061#action_12981061 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
Oops. Hit enter too soon. Original problem description from David Jencks:
More seriously I haven't been able to solve the linkage error I get with the persistence context tests under equinox. Perhaps someone with more classloader expertise than I could take a look at these.
To run just the linkage error tests add this to tck-tests-current.xml under <packages>
<package name="org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.*"/>
and comment out the existing lines. Then run
mvn clean test -Dgeronimo-assembly -Dincontainer -DassemblyId=tomcat7-javaee6 -Dcurrent
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Commented] (GERONIMO-5751) LinkageError running CDI TCK
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032143#comment-13032143 ]
Kevan Miller commented on GERONIMO-5751:
----------------------------------------
Here's a better stacktrace. At the top of the call stack, defineClass() has been called for the second time, on the same thread, for the same class. This defineClass will work.
{code}
"DefaultThreadPool 196" prio=5 tid=101dd3000 nid=0x12545e000 at breakpoint[125458000]
java.lang.Thread.State: RUNNABLE
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
- locked <7a66bf170> (a org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.apache.xbean.osgi.bundle.util.BundleClassLoader.loadClass(BundleClassLoader.java:75)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
- locked <7a6b2b9b8> (a org.apache.geronimo.kernel.classloader.TemporaryClassLoader)
at org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:104)
- locked <7a6b2b9b8> (a org.apache.geronimo.kernel.classloader.TemporaryClassLoader)
at org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:62)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.openjpa.enhance.PCClassFileTransformer.needsEnhance(PCClassFileTransformer.java:195)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:137)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:124)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:294)
at org.apache.geronimo.persistence.TransformerWrapper.transform(TransformerWrapper.java:43)
at org.apache.geronimo.transformer.TransformerCollection.transform(TransformerCollection.java:52)
at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
- locked <7a66bf170> (a org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.testng.internal.annotations.JDK15AnnotationFinder.<init>(JDK15AnnotationFinder.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.testng.internal.ClassHelper.createJdkAnnotationFinder(ClassHelper.java:183)
at org.testng.TestNG.initializeAnnotationFinders(TestNG.java:756)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:892)
at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
at org.testng.TestNG.run(TestNG.java:784)
at org.jboss.testharness.impl.runner.TestRunner.run(TestRunner.java:61)
at org.jboss.testharness.impl.runner.servlet.ServletTestRunner.doGet(ServletTestRunner.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:228)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891)
at org.apache.geronimo.jetty8.handler.GeronimoWebAppContext.doScope(GeronimoWebAppContext.java:229)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:353)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1059)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:243)
at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:373)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
{code}
> LinkageError running CDI TCK
> ----------------------------
>
> Key: GERONIMO-5751
> URL: https://issues.apache.org/jira/browse/GERONIMO-5751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 3.0-M2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 3.0-M2
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira