CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Location
    Wantagh,NY
    Posts
    151

    Error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper

    I am receiving an error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper when trying to connect to the database. The thing is, it is not even an mysql database, it is an Oracle database. Below is the code I am using to form the connection.

    Code:
    try {
    						
    			Class.forName("oracle.jdbc.driver.OracleDriver");
    			
    
    			String database = "jdbc:oracle:thin:@localhost:1521:xe";
    			
    			myConn = DriverManager.getConnection(
    					database, "user", "password");
    
    			logger.info("Connection successful");
    		//	System.out.println("Connected");
    		} catch (Exception exc) {
    			logger.severe(exc.toString());
    		}
    Why would I be getting this error if the database is an Oracle DB.

  2. #2
    Join Date
    May 2012
    Posts
    2

    Re: Error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper

    Did you try to refresh and rebuild your project?

  3. #3
    Join Date
    Sep 2006
    Location
    Wantagh,NY
    Posts
    151

    Re: Error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper

    Yes I have refreshed and rebuilt the project and I am still getting the error.

  4. #4
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper

    Please post the full error message including the stack trace.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  5. #5
    Join Date
    Sep 2006
    Location
    Wantagh,NY
    Posts
    151

    Re: Error: java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper

    java.lang.NoClassDefFoundError: com/mysql/jdbc/DocsConnectionPropsHelper
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.DocsConnectionPropsHelper
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured