Topic
  • No replies
migsss
migsss
13 Posts

Pinned topic Using java class adapter to call an old version class

‏2013-06-12T10:48:58Z |

I am using java class adapter to call a java class. Given that my version of WTX is 8.1, I have had to compile my class for JRE 1.4. Otherwise, Type designer was unable to make the tree. My PC has version 1.6 installed.

When I call a very simple method, that only returns a literal, for example, the adapter works ok. The problem comes when I have to import some namespace. In my code, I use SAXParserFactory and, when I try to call the method, this error is produced: 

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.invokeMethodsAndGenerateOutput(MAdapterImpl.java:993)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.performClassOperation(MAdapterImpl.java:667)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.get(MAdapterImpl.java:251)
Caused by: java.lang.NoClassDefFoundError: javax/xml/validation/SchemaFactory

That class is in %WTX installation folder%\java\lib\xml.jar and I have tried to put this entry in dtx.ini, in external jar files, but it did not make any difference.

¿What can I do to call the method?

Thanks...

Updated on 2013-06-12T14:06:31Z at 2013-06-12T14:06:31Z by migsss