Error retrieving data from DB2 NoSuchMethodEror:sun.io.ByteToCharSingleByte
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Error retrieving data from DB2 NoSuchMethodEror:sun.io.ByteToCharSingleByte

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Question Error retrieving data from DB2 NoSuchMethodEror:sun.io.ByteToCharSingleByte

    Hi All,

    I am trying retrieve data from DB2 database using select command from java code,
    able to establish connection but not getting the data, my source data in Croatian Language.
    the following error was occurred,
    can any one help out me...

    Exception in thread "main" java.lang.NoSuchMethodError: sun.io.ByteToCharSingleByte.createCharMap(Ljava/lang/String;Z)[C
    at sun.io.ByteToCharCp870.<clinit>(ByteToCharCp870.java:86)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at sun.io.Converters.getConverterClass(Unknown Source)
    at sun.io.Converters.newConverter(Unknown Source)
    at sun.io.ByteToCharConverter.getConverter(Unknown Source)
    at com.ibm.db2.jcc.b.j.a(j.java:426)
    at com.ibm.db2.jcc.c.kc.a(kc.java:2366)
    at com.ibm.db2.jcc.c.jb.a(jb.java:3167)
    at com.ibm.db2.jcc.c.jb.a(jb.java:1720)
    at com.ibm.db2.jcc.c.jb.a(jb.java:1647)
    at com.ibm.db2.jcc.c.jb.n(jb.java:562)
    at com.ibm.db2.jcc.c.jb.j(jb.java:247)
    at com.ibm.db2.jcc.c.jb.c(jb.java:57)
    at com.ibm.db2.jcc.c.w.c(w.java:42)
    at com.ibm.db2.jcc.c.cc.h(cc.java:178)
    at com.ibm.db2.jcc.b.sf.p(sf.java:1256)
    at com.ibm.db2.jcc.b.sf.a(sf.java:1954)
    at com.ibm.db2.jcc.b.sf.a(sf.java:523)
    at com.ibm.db2.jcc.b.sf.executeQuery(sf.java:507)

    thanks in advance.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Error retrieving data from DB2 NoSuchMethodEror:sun.io.ByteToCharSingleByte

    The class versions in use are incompatible - probably a jar file from the wrong version is being loaded - or it may be a jar precedence problem where one jar has an older version of the class and is being loaded before the jar with the correct version.

    Check your classpath jars, especially their order - ensure that the correct jar(s) for the Java version you compiled for are being used and that they precede the other jars on the classpath.

    The outcome of any serious research can only be to make two questions grow where only one grew before...
    T. Veblen
    Please use &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center