CDI enabled deployments hang in sun annotation libraries
Environment
- JBoss Enterprise Application Platform (EAP) 6.x
- CDI
Issue
- We have multiple CDI enabled applications. Their deployment sometimes deadlocks in sun annotation libaries, for example:
"MSC service thread 1-38":
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3090)
- waiting to lock <0x00000007054dfba8> (a java.lang.Class for javax.enterprise.context.RequestScoped)
at java.lang.Class.getAnnotation(Class.java:3050)
at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:131)
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:84)
- locked <0x000000070253d288> (a java.lang.Class for sun.reflect.annotation.AnnotationType)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:220)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:87)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3093)
- locked <0x0000000708c5ef70>
at java.lang.Class.getAnnotations(Class.java:3073)
at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:126)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.load(ClassTransformer.java:60)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.load(ClassTransformer.java:51)
. . . .
"MSC service thread 1-17":
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:81)
- waiting to lock <0x000000070253d288> (a java.lang.Class for sun.reflect.annotation.AnnotationType)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:220)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:87)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3093)
- locked <0x00000007054dfba8> (a java.lang.Class for javax.enterprise.context.RequestScoped)
at java.lang.Class.getAnnotations(Class.java:3073)
at org.jboss.weld.introspector.jlr.WeldAnnotationImpl.create(WeldAnnotationImpl.java:57)
at org.jboss.weld.resources.ClassTransformer$TransformClassToWeldAnnotation.load(ClassTransformer.java:74)
at org.jboss.weld.resources.ClassTransformer$TransformClassToWeldAnnotation.load(ClassTransformer.java:65)
Resolution
- Update your JDK to the latest
Root Cause
- A bug in the JDK annotation layer
- Content from issues.jboss.org is not included.WELD-1296
- Content from issues.jboss.org is not included.WELD-1169
- Content from bugs.sun.com is not included.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7122142
- Content from bugs.sun.com is not included.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6588239
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.