My OS = CentOS-7 Oracle 18.4 XE Java 8 JDK + Tomcat 8
I facing the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole
at oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:46)
at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:1713)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:849)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:443)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:712)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at Test.main(Test.java:9)
Caused by: java.lang.ClassNotFoundException: oracle.dms.console.DMSConsole
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 9 more
- I searched a lot but was unable to find any forum where I can see aforementioned error related to oracle 18.4.0.
- I searched my whole server even unzipped all ojdbc*.jar but not found
DMSConsole
anywhere - I removed all previous jdbc jar drivers and downloaded latest ojdbc8-full.tar.gz driver form this LINK but nothing fixed the problem
Best Regards
2
Answers
What are you trying to do? If you are planning to use dms jar then you should use
ojdbc8dms.jar. Check out the question “What are the different JAR files on the 19.3 JDBC driver download page for?” in JDBC FAQ
You can get these jars from maven. Check out the blog for details. You can also download these from ojdbc8-debug.tar.gz from OTN. Make sure to have dms.jar in the classpath.
This can be solved by adding a correct dms.jar but when not detailled log is needed the following jars are the minimum to include
ojdbc8.jar
orai18n.jar