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

EclipseLink for JPA 3.1 may encounter IllegalArgumentException: Unsupported api 0 #27588

Closed
tkburroughs opened this issue Feb 6, 2024 · 0 comments · Fixed by #27582
Closed
Assignees
Labels
in:JPA release bug This bug is present in a released version of Open Liberty release:24002 team:Blizzard

Comments

@tkburroughs
Copy link
Member

Describe the bug
When using EclipseLink from the JPA 3.1 feature, the following error may occur if org.eclipse.persistence.asm.Opcodes is initialized before org.eclipse.persistence.asm.ASMFactory:

Caused by: java.lang.IllegalArgumentException: Unsupported api 0
	at org.eclipse.persistence.internal.libraries.asm.ClassVisitor.<init>(ClassVisitor.java:77)
	at org.eclipse.persistence.asm.internal.platform.eclipselink.ClassVisitorImpl$ElClassVisitor.<init>(ClassVisitorImpl.java:27)
	at org.eclipse.persistence.asm.internal.platform.eclipselink.ClassVisitorImpl.<init>(ClassVisitorImpl.java:106)
	at org.eclipse.persistence.asm.ASMFactory.createClassVisitor(ASMFactory.java:194)
	at org.eclipse.persistence.asm.ClassVisitor.<init>(ClassVisitor.java:26)
	at org.eclipse.persistence.asm.EclipseLinkClassVisitor.<init>(EclipseLinkClassVisitor.java:20)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory$ClassMetadataVisitor.<init>(MetadataAsmFactory.java:269)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.buildClassMetadata(MetadataAsmFactory.java:91)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.getMetadataClass(MetadataAsmFactory.java:184)
	at org.eclipse.persistence.internal.jpa.metadata.ORMetadata.getMetadataClass(ORMetadata.java:408)
	at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.initPersistenceUnitClasses(XMLEntityMappings.java:642)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.initPersistenceUnitClasses(MetadataProcessor.java:299)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:583)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:640)

Expected behavior
The IllegalArgumentException should not occur; the metadata should be processed without error.

Diagnostic information:

  • OpenLiberty Version: 23.0.0.7
  • Affected feature(s) : jpa-3.1
  • Java Version: any

Additional context
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:JPA release bug This bug is present in a released version of Open Liberty release:24002 team:Blizzard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants