You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Daniel Goodman <da...@comlab.ox.ac.uk> on 2004/05/31 16:58:41 UTC

Orcale Driver Instantiation causing java.lang.reflect.InvocationTargetException

Hi
I am trying to create a simple web service that will query a database,
parse the results and return them. The data base that we are using is an
Oracle data base. The application works fine when it is run
independently from the command line. However when it is run as a web
service, it throws a "java.lang.reflect.InvocationTargetException".
Through testing I have discover this exception is caused  by the line
"new oracle.jdbc.OracleDriver()". I try to catch exceptions, but none
seem to be thrown to catch on the server so I have no details of what
happens after this line is reached. The application appears to  just
stop at this line. The driver classes are supplied by oracle in a zip
file titled "oracle_jdbc_classes12.zip" after reading on the web that
tomcat may be having problems with the zip file, I converted this into a
jar file, but to no avail. I am fairly confident that my class paths are
all correct. I have a copy of this file in
/usr/jakarta-tomcat/webapps/axis/WEB-INF/lib and I have tried having a
copy of the file  in /usr/jakarta-tomcat/common/lib.  I'm now starting
to run out of ideas, any help would be greatly appreciated.

Daniel

java.lang.reflect.InvocationTargetException
    at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
    at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
    at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at
CPDNServiceManager.CPSoapBindingStub.remoteinitate(CPSoapBindingStub.java:170)
    at
HandleService.CPServiceConnection.initate(CPServiceConnection.java:41)
    at HandleService.InitaliseServices.<init>(InitaliseServices.java:32)
    at HandleService.InitaliseServices.main(InitaliseServices.java:39)


Re: Orcale Driver Instantiation causing java.lang.reflect.InvocationTargetException

Posted by "sreekantan, vijay" <vi...@yahoo.com>.
new oracle.jdbc.OracleDriver()
 
I thought the qualified name of the Oracle Driver class
was oracle.jdbc.driver.OracleDriver.
 
Check that you proceed further.
 
Vijay


Daniel Goodman <da...@comlab.ox.ac.uk> wrote:
Hi
I am trying to create a simple web service that will query a database,
parse the results and return them. The data base that we are using is an
Oracle data base. The application works fine when it is run
independently from the command line. However when it is run as a web
service, it throws a "java.lang.reflect.InvocationTargetException".
Through testing I have discover this exception is caused by the line
"new oracle.jdbc.OracleDriver()". I try to catch exceptions, but none
seem to be thrown to catch on the server so I have no details of what
happens after this line is reached. The application appears to just
stop at this line. The driver classes are supplied by oracle in a zip
file titled "oracle_jdbc_classes12.zip" after reading on the web that
tomcat may be having problems with the zip file, I converted this into a
jar file, but to no avail. I am fairly confident that my class paths are
all correct. I have a copy of this file in
/usr/jakarta-tomcat/webapps/axis/WEB-INF/lib and I have tried having a
copy of the file in /usr/jakarta-tomcat/common/lib. I'm now starting
to run out of ideas, any help would be greatly appreciated.

Daniel

java.lang.reflect.InvocationTargetException
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
CPDNServiceManager.CPSoapBindingStub.remoteinitate(CPSoapBindingStub.java:170)
at
HandleService.CPServiceConnection.initate(CPServiceConnection.java:41)
at HandleService.InitaliseServices.(InitaliseServices.java:32)
at HandleService.InitaliseServices.main(InitaliseServices.java:39)

		
---------------------------------
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger