How to solve sun/io/MalformedInputException during JNDI lookup on remote WebSphere

后端 未结 2 390
囚心锁ツ
囚心锁ツ 2021-01-06 07:42

I use WebSphere 8.5 to host my application and configured some JDBC resources on the application server. Also I developed a client application using the thin client runtime

相关标签:
2条回答
  • 2021-01-06 08:16

    If you wanna use Oracle JDK 8.0 with IBM Websphere, try to replace 'ibmorb.jar' in your classpath to a newer (that using new java.nio.charset.MalformedInputException class).

    You can find it here:

    1. Download IBM JDK 8.0 (https://www.ibm.com/developerworks/java/jdk/java8/);
    2. Unzip obtained archive into a folder (eclipseDevelopmentPackage by default);
    3. Copy 'ibmorb.jar' from the following path: /eclipseDevelopmentPackage/ibm_sdk80/jre/lib/ibmorb.jar

    Hope these help.

    0 讨论(0)
  • 2021-01-06 08:29

    In case of Sterling Commerce agents(Sterling 9.5 with JDK 8), you may get the below exception while starting the agent/Integration Servers.

    cause : In JDK 8 , MalformedInputException was moved to another package and sterling still expecting in the same packance throwing this error.

    *

    Caused by: java.lang.NoClassDefFoundError: sun/io/MalformedInputException
            at com.ibm.rmi.iiop.CDRReader.getTcsCConverter(CDRReader.java:451)
            at com.ibm.rmi.iiop.CDRReader.readStringOrIndirection(CDRReader.java:532)
            at com.ibm.rmi.iiop.CDRReader.read_string(CDRReader.java:518)
    ...
    Caused by: java.lang.ClassNotFoundException: sun.io.MalformedInputException
            at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            ... 34 more
    

    *

    Solution : Take the rt.jar from previous java versions(1.6 or 1.7) where sun.io.MalformedInputException is still in the same package as sterling expects and do the Thirdparty installation of the jar.

    It works :)

    0 讨论(0)
提交回复
热议问题