Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weld fails to start on Java 17 (since build 21) #24

Closed
tomas-langer opened this issue May 11, 2021 · 3 comments
Closed

Weld fails to start on Java 17 (since build 21) #24

tomas-langer opened this issue May 11, 2021 · 3 comments

Comments

@tomas-langer
Copy link

Since build OpenJDK Runtime Environment (build 17-ea+21-1866) weld fails to start due to issue in EnumAnnotationValue.

This issue was fixed in PR #15, though it was never merged.

How to reproduce (with Weld):

  • create a bean with an annotation that uses an enum value
  • start Weld

How to reproduce in general:

  • create a ClassFile from a class with an enum annotation value
  • load the class
  • call getAnnotations() on the loaded class

Stack trace (from Weld):

Exception in thread "main" java.lang.reflect.GenericSignatureFormatError: Signature Parse error: Expected Field Type Signature
	Remaining input: org.eclipse.microprofile.openapi.annotations.enums.SchemaType
	at java.base/sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:124)
	at java.base/sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:291)
	at java.base/sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:277)
	at java.base/sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:469)
	at java.base/sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:188)
	at java.base/sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:430)
	at java.base/sun.reflect.annotation.AnnotationParser.parseEnumValue(AnnotationParser.java:468)
	at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:343)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:282)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:227)
	at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:282)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:227)
	at java.base/sun.reflect.annotation.AnnotationParser.lambda$parseAnnotationArray$2(AnnotationParser.java:726)
	at java.base/sun.reflect.annotation.AnnotationParser.parseArrayElements(AnnotationParser.java:737)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotationArray(AnnotationParser.java:725)
	at java.base/sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:528)
	at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:351)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:282)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:121)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
	at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:624)
	at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:622)
	at java.base/java.lang.reflect.Executable.getDeclaredAnnotations(Executable.java:610)
	at java.base/java.lang.reflect.Method.getDeclaredAnnotations(Method.java:747)
	at java.base/java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:566)
	at org.jboss.weld.resources.HotspotReflectionCache.internalGetAnnotations(HotspotReflectionCache.java:58)
	at org.jboss.weld.resources.DefaultReflectionCache.lambda$new$0(DefaultReflectionCache.java:40)
	at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.lambda$new$0(ReentrantMapBackedComputingCache.java:55)
	at org.jboss.weld.util.LazyValueHolder$1.computeValue(LazyValueHolder.java:32)
	at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:46)
	at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:72)
	at org.jboss.weld.resources.DefaultReflectionCache.getAnnotations(DefaultReflectionCache.java:75)
	at org.jboss.weld.annotated.slim.backed.BackedAnnotated.getAnnotations(BackedAnnotated.java:36)
	at org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedMethodImpl.of(EnhancedAnnotatedMethodImpl.java:61)
	at org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedTypeImpl.<init>(EnhancedAnnotatedTypeImpl.java:224)
	at org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedTypeImpl.of(EnhancedAnnotatedTypeImpl.java:134)
	at org.jboss.weld.resources.ClassTransformer$TransformSlimAnnotatedTypeToEnhancedAnnotatedType.apply(ClassTransformer.java:93)
	at org.jboss.weld.resources.ClassTransformer$TransformSlimAnnotatedTypeToEnhancedAnnotatedType.apply(ClassTransformer.java:90)
	at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.lambda$new$0(ReentrantMapBackedComputingCache.java:55)
	at org.jboss.weld.util.LazyValueHolder$1.computeValue(LazyValueHolder.java:32)
	at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:46)
	at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:72)
	at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:251)
	at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:232)
	at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.initEnhancedSubclass(SubclassedComponentInstantiator.java:86)
	at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.<init>(SubclassedComponentInstantiator.java:79)
	at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.forInterceptedDecoratedBean(SubclassedComponentInstantiator.java:63)
	at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:121)
	at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
	at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)
	at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:481)
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86)
@Ladicek
Copy link

Ladicek commented May 11, 2021

If I can trust GitHub, it's since build 20: openjdk/jdk@8758b55

(Yes, I'm looking into this exact problem right now, too! :-) )

@Ladicek
Copy link

Ladicek commented May 11, 2021

It might take a while, but we'll get the fix merged and released.

@manovotn
Copy link
Contributor

Resolved by #15.
I will get some intel on how releasing works for this repo so we can get a version out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants