DictionaryToDatabase Registering SQL driver

Help
2005-02-15
2013-04-29
  • johanna1210
    johanna1210
    2005-02-15

    Hello,

    During the database creation using DictionaryToDatabase ...
    I get "Error while registering SQL driver"

    When running:
    java -cp jwnl.jar;utilities.jar;commons-logging.jar
    net.didion.jwnl.utilities.DictionaryToDatabase .\include\file-properties.xml
    .\include\create.sql com.mysql.jdbc.Driver
    jdbc:mysql://localhost/jwnl?user=jwnl&password=jwnl"

    ... I get the folowing error message. I have already checked my paths, the
    sql driver is in the path. The jdbc is installed and in path.

    What I am doing wrong? Thanks for suggestions!

    ERROR MESSAGE:

    15.02.2005 08:43:06 net.didion.jwnl.util.MessageLog doLog

    INFO: Installing dictionary
    net.didion.jwnl.dictionary.FileBackedDictionary@443226

    net.didion.jwnl.JWNLException: Error while registering SQL driver

    at
    net.didion.jwnl.dictionary.database.ConnectionManager.registerDriver(Connect
    ionManager.java:45)

    at net.didion.jwnl.dictionary.database.ConnectionManager.getConnection(Connecti
    onManager.java:29)

    at net.didion.jwnl.utilities.DictionaryToDatabase.main(DictionaryToDatabase.jav
    a:63)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    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)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)

    at
    net.didion.jwnl.dictionary.database.ConnectionManager.registerDriver(Connect
    ionManager.java:41)

    ... 2 more

     
    • Kirkov
      Kirkov
      2006-03-04

      I had the same error and the reason was that the file mysql-connector-java-3.1.12-bin.jar was in my jdk/ ... /lib/ext instead of jre folder.