You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use a url jdbc:oracle:thin:@ldap://..., I get the following error at startup: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory]
Expected behavior
Should work same as non ldap oracle jdbc url.
Actual behavior
Here is the full exception:
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2021-07-28 11:51:47,444 WARN [io.agr.pool] (agroal-11) Datasource '<default>': IO Error: JNDI Package failure javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory] (CONNECTION_ID=yh0svrfuQK+prg+PVtb/mw==)
2021-07-28 11:51:47,445 WARN [org.hib.eng.jdb.env.int.JdbcEnvironmentInitiator] (JPA Startup Thread: <default>) HHH000342: Could not obtain connection to query metadata: java.sql.SQLRecoverableException: IO Error: JNDI Package failure javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory] (CONNECTION_ID=yh0svrfuQK+prg+PVtb/mw==)
at oracle.jdbc.driver.T4CConnection.handleLogonNetException(T4CConnection.java:870)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:675)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:1032)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:90)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:681)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:602)
at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:204)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:470)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:452)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1126)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: oracle.net.ns.NetException: JNDI Package failure javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory] (CONNECTION_ID=yh0svrfuQK+prg+PVtb/mw==)
at oracle.net.jndi.JndiAttrs.initializeLDAPContext(JndiAttrs.java:290)
at oracle.net.jndi.JndiAttrs.<init>(JndiAttrs.java:165)
at oracle.net.resolver.AddrResolution.<init>(AddrResolution.java:334)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:329)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1967)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:640)
... 14 more
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory]
at javax.naming.spi.NamingManager.getFactory(NamingManager.java:760)
at javax.naming.spi.NamingManager.lambda$getInitialContext$1(NamingManager.java:722)
at jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:722)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
at javax.naming.InitialContext.init(InitialContext.java:236)
at javax.naming.InitialContext.<init>(InitialContext.java:208)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
at oracle.net.jndi.JndiAttrs.initializeLDAPContext(JndiAttrs.java:282)
... 19 more
Caused by: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:64)
at java.lang.Class.forName(DynamicHub.java:1308)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:127)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:133)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:96)
at javax.naming.spi.NamingManager.getFactory(NamingManager.java:757)
... 28 more
How to Reproduce?
Create an application using the quarkus-jdbc-oracle driver.
Compile the application in native.
Run the application with a url of type: quarkus.datasource.jdbc.url=jdbc:oracle:thin:@ldap://....
The application fails at startup.
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+8-jvmci-21.1-b05)
Quarkus version or git rev
2.1.0
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
Note that the application works with tns style url: quarkus.datasource.jdbc.url=jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)... (the address resolved by ldap).
So the issue is really about ldap access, not oracle.
The text was updated successfully, but these errors were encountered:
@gsmet I have a similar issue with the following trace:
Caused by: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:64)
at java.lang.Class.forName(DynamicHub.java:1308)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:127)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:133)
at com.sun.naming.internal.VersionHelper.loadClass(VersionHelper.java:96)
at javax.naming.spi.NamingManager.getFactory(NamingManager.java:757)
... 28 more
Describe the bug
If I use a url
jdbc:oracle:thin:@ldap://...
, I get the following error at startup:java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory]
Expected behavior
Should work same as non ldap oracle jdbc url.
Actual behavior
Here is the full exception:
How to Reproduce?
Create an application using the
quarkus-jdbc-oracle
driver.Compile the application in native.
Run the application with a url of type:
quarkus.datasource.jdbc.url=jdbc:oracle:thin:@ldap://...
.The application fails at startup.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+8-jvmci-21.1-b05)
Quarkus version or git rev
2.1.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Note that the application works with tns style url:
quarkus.datasource.jdbc.url=jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)...
(the address resolved by ldap).So the issue is really about ldap access, not oracle.
The text was updated successfully, but these errors were encountered: