Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: non supported character set characterset error

Re: non supported character set characterset error

From: <gbegley_at_gmail.com>
Date: 13 Feb 2005 21:39:55 -0800
Message-ID: <1108359595.692569.189850@f14g2000cwb.googlegroups.com>


I created a much simplified version of the test, which worked as expected so I must be having a setup issue...

Results:
ClassPath:
C:\IntelliJ\3.0.5\lib\junit.jar;C:\home\gbegley\tmp\xdbtest\classes;C:\oracle\ora92\jdbc\lib\nls_charset12.jar;C:\oracle\ora92\jdbc\lib\classes12.jar;C:\oracle\ora92\rdbms\jlib\xdb.jar;C:\oracle\ora92\rdbms\jlib\xdb.jar;C:\home\ibm\AppServer\java\jre\lib\i18n.jar;C:\home\ibm\AppServer\java\jre\lib\jaws.jar;C:\home\ibm\AppServer\java\jre\lib\rt.jar;C:\home\ibm\AppServer\java\jre\lib\ext\activation.jar;C:\home\ibm\AppServer\java\jre\lib\ext\certpath.jar;C:\home\ibm\AppServer\java\jre\lib\ext\classes12.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjcefips.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjcefw.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjceprovider.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjgssprovider.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjsse.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmjssefips-ob.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmorb.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmpkcs.jar;C:\home\ibm\AppServer\java\jre\lib\ext\ibmpkcs11.jar;C:\home\ibm\AppServer\java\j re\lib\ext\ibmspnego.jar;C:\home\ibm\AppServer\java\jre\lib\ext\indicim.jar;C:\home\ibm\AppServer\java\jre\lib\ext\iwsorbutil.jar;C:\home\ibm\AppServer\java\jre\lib\ext\jaas.jar;C:\home\ibm\AppServer\java\jre\lib\ext\jaas_activelm.jar;C:\home\ibm\AppServer\java\jre\lib\ext\jaas_lm.jar;C:\home\ibm\AppServer\java\jre\lib\ext\JawBridge.jar;C:\home\ibm\AppServer\java\jre\lib\ext\local_policy.jar;C:\home\ibm\AppServer\java\jre\lib\ext\log.jar;C:\home\ibm\AppServer\java\jre\lib\ext\mail.jar;C:\home\ibm\AppServer\java\jre\lib\ext\PD.jar;C:\home\ibm\AppServer\java\jre\lib\ext\runtime12.jar;C:\home\ibm\AppServer\java\jre\lib\ext\US_export_policy.jar;C:\IntelliJ\3.0.5\lib\xerces.jar;C:\IntelliJ\3.0.5\lib\log4j.jar;C:\IntelliJ\3.0.5\lib\junit.jar;C:\oracle\ora92\lib\xmlparserv2.jar;C:\IntelliJ\3.0.5\lib\idea_rt.jar Changed: 1

Code:

import oracle.xdb.XMLType;

import java.sql.SQLException;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.io.IOException;

import junit.framework.TestCase;

public class XDBTest extends TestCase {

    public void psTestUpdate() throws SQLException, IOException, ClassNotFoundException {

        Connection connection = createCon();
        System.out.println("ClassPath:
"+System.getProperty("java.class.path"));
        PreparedStatement ps = connection.prepareStatement("update
xml_store set xml_data=? where id=1");
        String s  = "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><update>Test: "+new java.util.Date()+"</update>";
        XMLType xt = XMLType.createXML(connection,s);
        ps.setObject(1,xt);
        int changed = ps.executeUpdate();
        System.out.println("Changed: "+changed);
        connection.close();

}

    Connection createCon() throws ClassNotFoundException, SQLException {

        Connection c = null;
        Class.forName("oracle.jdbc.driver.OracleDriver");
        c =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:epagb","epacube","epacube");
        return c;

}

} Received on Sun Feb 13 2005 - 23:39:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US