This content has been marked as final. Show 2 replies
I am using XMLParserV2.jar for Oracle XSQL functionality. We are migrating to 11GR2 and I am now using XMLParserV2-184.108.40.206.jar from Oracle client installation path. Also this jar is uploaded to our maven repository. When I package this jar an deploy I am getting the below error when launching application:
Jan 23, 2013 3:47:32 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Logon] in context with path  threw exception [Servlet execution threw an exception] with root cause
. . .
When I add orai18n-mapping.jar to the package and deploy it gives me Protocol error with XSL transformation.
But when I change the name of jar to xmlparserv2.jar instead of XMLParserV2.jar and deploy it works fine. I could not understand what the issue is.
ALL offficial (meaning Oracle supplied) versions of the xmlparserv2.jar file I have seen have always used strictly lower case letters in the name. So if you have one named 'XMLParserV2.jar' using upper-case letters I would be suspicious of that one to begin with. At a minimum someone probably changed the name. Worst case is anyone's guess: anything from a trojan to a corrupt jar from a non-official source.
The name of a jar file is irrevelant to the contents inside the jar and to Java. The name would only have significance when it is specified on a case-sensitive system in the classpath or a configuration file.
So if merely renaming the jar file eliminates or alters any exception you are getting then you likely have a config file somewhere looking for a case-sensitive name. Or perhaps you have loader code that is treating names as case-sentive and not finding the file.
Another CAVEAT is that when using xmlParserV2.jar you usually need to make sure you have the correct matching jars for the international aspects.
Where did you get the orai18n-mapping.jar file from? In my 11.1.0 client installation there are 5 instances of that file and three DIFFERENT file sizes: meaning at least three DIFFERENT versions. Pick the wrong one of three for the parser jar you select (of which there are at least three different versions installed with the client and something is very likely to go wrong depending on what functionality is being used.
There are, and have been, many different version of the xmlParserV2.jar file around and you need to make sure you use the correct version for the other Oracle supplied jars that you are using.
For example the Oracle 11g database installation includes at least three DIFFERENT versions of that same jar file. And The 11.1.0 client installation installs three different versions of that jar also. One in the LIB folder, one in oui\jib and one in sqldeveloper\lib.
Double check your sources for any Oracle jar files you are using and make sure that all jar file versions are the correct ones and come from the same installation set. Even then since Oracle itself provides multiple versions with its products you need to have any third-party vendors specify for you exactly which jar files to use and possibly provide an MD5, or other checksum so you can ensure you have an unaldulterated jar.
The issue is resolved when I change the name of jar to all lower case and package it to war file. I provided uppercase letters by mistake when uploading to repository. Thanks for your help.