Menu

Having trouble with picking correct versions of Jackcess and its dependencies

2015-10-05
2015-10-05
  • Dan Shriver

    Dan Shriver - 2015-10-05

    I have some legacy code that uses Jackcess and am having trouble getting the right jar version combination

    When I try what seems to be a semi reasonable set for the old version of the jar I have:
    I'd prefer to fix this one up but I seem to be having trouble finding the right jars.

    Commons lang 2.1.0 I wanted a 2.0 version but could not find one
    Commons logging 1.0.3
    Ojdbc6 11.2.0.3.0
    Jackcess 1.2.4
    Log4j 1.2.7

    But it looks like this doesn't work correctly because when I run the Jar it seems it cannot find the Database class

    java.lang.NullPointerException
    at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:73)
    at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
    Exception in thread "main" java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/Database
    at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:40)
    at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
    Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.Database
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

    If I try a more modern set I get other problems. I'd prefer not to go this route because it looks like the API has changed and I can't compile without rewriting the old code.

    Commons lang 2.6.0
    Commons logging 1.1.3
    Ojdbc6 11.2.0.3.0
    Jackcess 2.0.1
    Log4j 1.2.7
    Poi 3.9

    warning: [options] bootstrap class path not set in conjunction with -source 1.6
    /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:40: error: cannot find symbol
    db = Database.open(new File(accessFile));
    ^
    symbol: method open(File)
    location: interface Database
    /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:89: error: cannot find symbol
    index.initialize();
    ^
    symbol: method initialize()
    location: variable index of type Index
    /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:100: error: cannot find symbol
    for (Map<String, Object=""> row : Cursor.createCursor(table))
    ^
    symbol: method createCursor(Table)
    location: interface Cursor

     
    • Tim McCune

      Tim McCune - 2015-10-05

      Check the <dependencies> section inside
      META-INF/maven/com.healthmarketscience.jackcess/jackcess/pom.xml inside of
      your jackcess jar to see what versions of external libraries it depends on.

      On Mon, Oct 5, 2015 at 6:33 AM, Dan Shriver dshriver@users.sf.net wrote:

      I have some legacy code that uses Jackcess and am having trouble getting
      the right jar version combination

      When I try what seems to be a semi reasonable set for the old version of
      the jar I have:
      I'd prefer to fix this one up but I seem to be having trouble finding the
      right jars.

      Commons lang 2.1.0 I wanted a 2.0 version but could not find one
      Commons logging 1.0.3
      Ojdbc6 11.2.0.3.0
      Jackcess 1.2.4
      Log4j 1.2.7

      But it looks like this doesn't work correctly because when I run the Jar
      it seems it cannot find the Database class

      java.lang.NullPointerException
      at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:73)
      at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
      Exception in thread "main" java.lang.NoClassDefFoundError:
      com/healthmarketscience/jackcess/Database
      at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:40)
      at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
      Caused by: java.lang.ClassNotFoundException:
      com.healthmarketscience.jackcess.Database
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

      If I try a more modern set I get other problems. I'd prefer not to go this
      route because it looks like the API has changed and I can't compile without
      rewriting the old code.

      Commons lang 2.6.0
      Commons logging 1.1.3
      Ojdbc6 11.2.0.3.0
      Jackcess 2.0.1
      Log4j 1.2.7
      Poi 3.9

      warning: [options] bootstrap class path not set in conjunction with
      -source 1.6
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:40:
      error: cannot find symbol
      db = Database.open(new File(accessFile));
      ^
      symbol: method open(File)
      location: interface Database
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:89:
      error: cannot find symbol
      index.initialize();
      ^
      symbol: method initialize()
      location: variable index of type Index
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:100:
      error: cannot find symbol
      for (Map<String, Object=""> row : Cursor.createCursor(table))
      ^
      symbol: method createCursor(Table)
      location: interface Cursor


      Having trouble with picking correct versions of Jackcess and its
      dependencies
      http://sourceforge.net/p/jackcess/discussion/456473/thread/736ccd95/?limit=25#9ee9


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jackcess/discussion/456473/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
    • Tim McCune

      Tim McCune - 2015-10-05

      BTW, a ClassNotFoundException on com.healthmarketscience.jackcess.Database
      sounds like you may be trying to solve the wrong problem, and that you
      simply don't have the jackcess jar in your classpath.

      On Mon, Oct 5, 2015 at 6:33 AM, Dan Shriver dshriver@users.sf.net wrote:

      I have some legacy code that uses Jackcess and am having trouble getting
      the right jar version combination

      When I try what seems to be a semi reasonable set for the old version of
      the jar I have:
      I'd prefer to fix this one up but I seem to be having trouble finding the
      right jars.

      Commons lang 2.1.0 I wanted a 2.0 version but could not find one
      Commons logging 1.0.3
      Ojdbc6 11.2.0.3.0
      Jackcess 1.2.4
      Log4j 1.2.7

      But it looks like this doesn't work correctly because when I run the Jar
      it seems it cannot find the Database class

      java.lang.NullPointerException
      at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:73)
      at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
      Exception in thread "main" java.lang.NoClassDefFoundError:
      com/healthmarketscience/jackcess/Database
      at org.mitre.caasd.jeppge.Converter.dumpDatabase(Converter.java:40)
      at org.mitre.caasd.jeppge.Converter.main(Converter.java:131)
      Caused by: java.lang.ClassNotFoundException:
      com.healthmarketscience.jackcess.Database
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

      If I try a more modern set I get other problems. I'd prefer not to go this
      route because it looks like the API has changed and I can't compile without
      rewriting the old code.

      Commons lang 2.6.0
      Commons logging 1.1.3
      Ojdbc6 11.2.0.3.0
      Jackcess 2.0.1
      Log4j 1.2.7
      Poi 3.9

      warning: [options] bootstrap class path not set in conjunction with
      -source 1.6
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:40:
      error: cannot find symbol
      db = Database.open(new File(accessFile));
      ^
      symbol: method open(File)
      location: interface Database
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:89:
      error: cannot find symbol
      index.initialize();
      ^
      symbol: method initialize()
      location: variable index of type Index
      /devel/crs/dshriver/svn/crs/trunk/crs-db/crs_migration/Jep_Ge/src/main/java/org/mitre/caasd/jeppge/Converter.java:100:
      error: cannot find symbol
      for (Map<String, Object=""> row : Cursor.createCursor(table))
      ^
      symbol: method createCursor(Table)
      location: interface Cursor


      Having trouble with picking correct versions of Jackcess and its
      dependencies
      http://sourceforge.net/p/jackcess/discussion/456473/thread/736ccd95/?limit=25#9ee9


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jackcess/discussion/456473/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Dan Shriver

        Dan Shriver - 2015-10-05

        Good point. I need to read these things a little better.... I'm going to look into bundling my dependencies with my jar since I don't want users to have to make a classpath that points to the dependencies.

         

Log in to post a comment.