java - NoClassDefFoundError sun/io/ByteToCharConverter with InterBase JDBC driver -


with interclient 7.5.1 , 8.1.5, creation of new jdbc connection in java 8 fails with

java.lang.noclassdeffounderror: sun/io/bytetocharconverter 

this class seems referenced or used interclient jdbc library. error not occur java 7. there way work around error?


this code reproduces problem on java 8:

package com.example.so25365952;  import java.sql.drivermanager; import java.sql.sqlexception; import java.util.logging.level; import java.util.logging.logger;  public class main {     interbase.interclient.connection conn;       public static void main(string[] args) {         try {             class.forname("interbase.interclient.driver");                        drivermanager.getconnection("jdbc:interbase://localhost/data/mydb.gdb", "sysdba", "password123");                    } catch (classnotfoundexception | sqlexception ex) {             logger.getlogger(main.class.getname()).log(level.severe, null, ex);         }     } } 

output:

exception in thread "main" java.lang.noclassdeffounderror: sun/io/bytetocharconverter @ interbase.interclient.connection.connect(unknown source) @ interbase.interclient.connection.(unknown source) @ interbase.interclient.driver.connect(unknown source) @ java.sql.drivermanager.getconnection(drivermanager.java:664) @ java.sql.drivermanager.getconnection(drivermanager.java:247) @ com.example.so25365952.main.main(main.java:14) caused by: java.lang.classnotfoundexception: sun.io.bytetocharconverter @ java.net.urlclassloader$1.run(urlclassloader.java:372) @ java.net.urlclassloader$1.run(urlclassloader.java:361) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:360) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:357) ... 6 more

the sun.* , sunw.* packages internal , should not used reason. seems @ interclient screwed up. i'd advise contact them bug report, they'll know fix future releases.

if can't wait future release, , willing break licences (which don't recommend of course). may able create own sun.io.bytetocharconverter copying code here, , adding bootstrap classpath -xbootclasspath, last resort.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -