JDeveloper 10.1.3.3.0.4157
Java 1.5.0_06-b05
Oracle Containers for J2EE 10g (10.1.3.1.1)
I have written some straight forward web services client code to create a SOAP message as follows:
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage msg = mf.createMessage();
SOAPHeader sh = msg.getSOAPPart().getEnvelope().getHeader();
The code runs fine from within JDeveloper and returns a MessageFactory of type oracle.j2ee.ws.saaj.soap.MessageFactoryImpl, however, when I deploy the same code to my Oracle10gAS (where it is invoked from within an MDB) it fails with the stack trace shown at the end of this post.
The saaj-api.jar and orasaaj.jar are both available in the classpath (in webservices/lib and within the APP-INF/lib directory of my ear file)
I have tried defining -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl in the java start options for the oc4j instance, but exactly the same error still occurs.
I've run out of ideas to diagnose this issue. Any help or suggestions would be much appreciated.
Thanks
Matthew
WARNING: java.lang.NoClassDefFoundError:null
10/02/24 14:55:59 java.lang.NoClassDefFoundError
10/02/24 14:55:59 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10/02/24 14:55:59 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
10/02/24 14:55:59 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
10/02/24 14:55:59 at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
10/02/24 14:55:59 at java.lang.Class.newInstance0(Class.java:350)
10/02/24 14:55:59 at java.lang.Class.newInstance(Class.java:303)
10/02/24 14:55:59 at javax.xml.soap.FactoryFinder.newInstance(Unknown Source)
10/02/24 14:55:59 at javax.xml.soap.FactoryFinder.find(Unknown Source)
10/02/24 14:55:59 at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:29)
10/02/24 14:55:59 at com.cedarhr.dsl.ws.WebServiceMethodImpl.processDocument(WebServiceMethodImpl.java:49)
etc...