Jpublisher Fails with java.lang.NoClassDefFoundError: sun/io/CharToByteConverter When Using With Java Version 1.8 (Doc ID 2244878.1)

Last updated on MARCH 17, 2017

Applies to:

JPublisher - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.1.0.2.0 version, publish types & PL/SQL to Java

When trying to execute JPublisher with JDK 1.8, there is an error reported. While using JDK 1.7 all works fine.

Example:
1) JDK 1.8.0_112

c:\Java\jdk1.8.0\bin\java -cp c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\translator.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\runtime12.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\sqljutl.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\javax-ssl-1_1.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\runtime12ee.jar;c:\apps\oracle\product\12.1.0\client_1\jdbc\lib\ojdbc7.jar oracle.jpub.Doit -user=tia/tia -props=C:\myprojects\resources\jpub.properties

Result:

[INFO] Exception in thread "main" java.lang.NoClassDefFoundError: sun/io/CharToByteConverter
[INFO] at sqlj.util.io.UCode_CharStream.(UCode_CharStream.java:169)
[INFO] at sqlj.util.io.UCode_CharStream.(UCode_CharStream.java:187)
[INFO] at oracle.jpub.DoitImpl.mainSql(DoitImpl.java:242)
[INFO] at oracle.jpub.DoitImpl.main(DoitImpl.java:118)
[INFO] at oracle.jpub.Doit.main(Doit.java:30)
[INFO] Caused by: java.lang.ClassNotFoundException: sun.io.CharToByteConverter
[INFO] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[INFO] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] ... 5 more

2) JDK 1.7.0_80
c:\Java\jdk1.7.0_80\bin\java -cp c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\translator.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\runtime12.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\sqljutl.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\javax-ssl-1_1.jar;c:\apps\oracle\product\12.1.0\client_1\sqlj\lib\runtime12ee.jar;c:\apps\oracle\product\12.1.0\client_1\jdbc\lib\ojdbc7.jar oracle.jpub.Doit -user=tia/tia -props=C:\myprojects\jpub.properties

and the result: ora types are generated well.



ERROR
-----------------------

Exception in thread "main" java.lang.NoClassDefFoundError: sun/io/CharToByteConverter
Caused by: java.lang.ClassNotFoundException: sun.io.CharToByteConverter



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms