2.0.3.Final upgrade has NoClassDefFoundError

166 views
Skip to first unread message

David Hoffer

unread,
Jul 29, 2021, 11:44:22 AM7/29/21
to Quarkus Development mailing list
After upgrading from 1.13.7.Final to 2.0.3.Final we get this error at app startup.

2021-07-29 09:36:53,742 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
        at java.base/javax.crypto.Cipher.getInstance(Cipher.java:540)

We are using JDK11.

This is being used by Agroal to decrypt the DB password.

at io.quarkus.agroal.runtime.AgroalVaultCredentialsProviderPassword.asProperties(AgroalVaultCredentialsProviderPassword.java:21)
        at io.agroal.api.security.AgroalDefaultSecurityProvider.getSecurityProperties(AgroalDefaultSecurityProvider.java:23)
        at io.agroal.pool.ConnectionFactory.securityProperties(ConnectionFactory.java:190)
        at io.agroal.pool.ConnectionFactory.securityProperties(ConnectionFactory.java:179)
        at io.agroal.pool.ConnectionFactory.jdbcProperties(ConnectionFactory.java:160)
        at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:204)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:490)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:472)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:68)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1126)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

What might be causing this with Quarkus 2.x?

-Dave

David Hoffer

unread,
Jul 29, 2021, 5:03:22 PM7/29/21
to Quarkus Development mailing list
Same error in  2.1.0.Final
Works in 1.13.7.Final.  

What would make 2.x not find javax.crypto.JceSecurity at runtime?

-Dave

David Hoffer

unread,
Aug 2, 2021, 10:51:13 AM8/2/21
to Quarkus Development mailing list
Does anyone have any idea why Quarkus 2.x can't find javax.crypto.JceSecurity class?

- I am using the exact same OpenJDK 11.0.11+9 in all cases.
- I am using the exact same Quarkus code base in all cases.
- The app works in 1.13.7.Final
- The app fails in all 2.x cases with this  java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
        at java.base/javax.crypto.Cipher.getInstance(Cipher.java:540)

This is blocking our upgrade to 2.x

-Dave

George Gastaldi

unread,
Aug 2, 2021, 10:53:50 AM8/2/21
to David Hoffer, Quarkus Development mailing list
That should work. Can you open an issue with a small reproducer project? That would help a lot.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/03595a89-d4ba-4568-957c-ae356fafa347n%40googlegroups.com.

Stuart Douglas

unread,
Aug 2, 2021, 7:34:33 PM8/2/21
to David Hoffer, Quarkus Development mailing list
I am guessing it is an issue with the context class loader. If you file an issue can you include the full stack trace? It's possible this may already be fixed, depending on where it is being initialized from.

Stuart

David Hoffer

unread,
Aug 2, 2021, 7:47:17 PM8/2/21
to Stuart Douglas, Quarkus Development mailing list
I will try to do that tomorrow...got pulled in another direction today.

-Dave

You received this message because you are subscribed to a topic in the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quarkus-dev/5LgvV5MJQNQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cwmmQ3rJrdu3b_AJzj8byQZk2uD6EtAQ3OMEMOZ3_7uTQ%40mail.gmail.com.

David Hoffer

unread,
Aug 5, 2021, 5:39:07 PM8/5/21
to Quarkus Development mailing list
I created https://github.com/quarkusio/quarkus/issues/19265 for this issue.  It's a 2.x blocker for us.

-Dave

Reply all
Reply to author
Forward
0 new messages