Non supported character set error when using refCursor in java service

I am developing an API with its base code inside of a jar file, the code connects to our oracle database, but when i try to run any code that uses a refcursor like so :

String sql = "BEGIN\n" + 
"  BS_BOJ_CMS_FASTMSG_API.Get_CMS_Parameters("  + 
"P_RESULT => ? " +
"  );\n" + 
"END;" ;
stmt  = conn.prepareCall(sql);
stmt.registerOutParameter( 1 , OracleTypes.CURSOR);
stmt.execute();
ResultSet rs    = (ResultSet) stmt.getObject(1);
while (rs.next()) {
if ( rs.getInt("ID") == 1 )
      x= rs.getString("VALUE");
}

it returns the error “Non supported character set (add orai18n.jar in your classpath): AR8MSWIN1256”
the problem only seem to arise on out dev server, but it works fine on my local machine .
I’ve included the following jars with the package : ojdbc8.jar, orai18n.jar

and they are the same i use on my machine , but still no luck .
take note that my machine and the server connect to the same DB.

Hi,

what is your IS version, JDBC Adapter version and Oracle Database version?
Please check the META-INF/MANIFEST.MF files from the mentioned jars to see if they refer to the same JDBC Driver version.

Hopefully, your local machine and your server connect to different users/schemata on your DB as mixing several server in one database schema set is not recommended except for clustering purposes where it is required.

Regards,
Holger

1 Like

Are you certain that doing this in Java is necessary? Is there a specific constraint such that JDBC adapter services won’t do what you want?

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.