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

Wrong export package name for bean-validator-cdi module #22712

Closed
AngryGami opened this issue Jan 21, 2019 · 4 comments
Closed

Wrong export package name for bean-validator-cdi module #22712

AngryGami opened this issue Jan 21, 2019 · 4 comments

Comments

@AngryGami
Copy link
Contributor

AngryGami commented Jan 21, 2019

Environment Details

  • GlassFish Version (and build number): master (at least to 4013c90), 5.0 release suffer from this as well
  • JDK version: 1.8_192, but irrelevant to this problem
  • OS: Linux alpine, again, irrelevant to this problem

Problem Description

Deploying of application fails with:

  Exception while loading the app : java.lang.ClassNotFoundException: org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor
java.lang.ClassNotFoundException: org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor
        at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:841)
        at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:718)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
...

Looking for this class lead me to bean-validator-cdi module which is repackaged version of hibernate-validator-cdi. Though when I look at MANIFEST.MF file of repackaged jar I see following:

Export-Package: org.hibernate.validator.internal.cdi.interceptor;version
 ="6.0.2.Final",org.hibernate.validator.internal.cdi;version="6.0.2.Fina
 l"

See the problem? No?
And now?:

...
org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor
...
org.hibernate.validator.internal.cdi.interceptor
...

It look to me that jar is exporting package that doesn't exist and therefore classloader cannot access it. And indeed when I fixed bean-validator-cdi jar manifest - everything is deployed and worked again.

Please fix that.

Steps to reproduce

Deploy application with JPA entities in it

Impact of Issue

Can't run my application.

@AngryGami
Copy link
Contributor Author

I this so hard to fix?

@bshannon
Copy link
Contributor

I don't know. We're all busy with the Jakarta EE 8 release and haven't had time to look at this.
Sorry.

@AngryGami
Copy link
Contributor Author

#22792
made pull request

@bshannon
Copy link
Contributor

Fixed by #22798.

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

2 participants