Showing posts with label WSO2DSS. Show all posts
Showing posts with label WSO2DSS. Show all posts

Friday, July 25, 2014

WSO2 DSS in Windows - accessing Oracle 11g requires the orai18n.jar

Okay, I should preface this post with the fact that I've seen as many connection strings and ways of connecting to Oracle as there are DB clients.  I don't think there is anything unusual about having trouble connecting to Oracle on a new application, and I expect connection methods may change with future oracle versions.

The Symptoms

You are attemting to connect to Oracle 11g R2 using the WSO2 DSS server running on Windows.  When attempting to add a datasource, you see an unusual error:

TID: [0] [DSS] [2014-07-24 17:47:05,125] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} -  oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter; {org.apache.axis2.rpc.receivers.RPCMessageReceiver}
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
...
Caused by: java.lang.NoSuchMethodError: oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter;
 

The Solution

Just like the stack dump indicates, there may be a missing method.  This appears to have something to do with Oracle 11g jdbc in Windows environments.  Oracle offers an additional jar for this scenario, namely orai18n.jar.  This file is needed in addition to the jdbc6 driver.  I found it offered on the same Oracle 11g site that offered the jdbc6 driver for that version.  Adding the orail18n.jar along with the driver should take care of the missing method, and allow you to connect to Oracle 11g.

Or, you could try running WSO2 DSS from *nix instead... Works like a charm there.

Cheers, Y'all!