I have a very annoying problem.
So I want to include 2 jar files in my java web application (.war file) - to be loaded on glassfish version 2.1.
The files are:
axis2-adb-1.4.1.jar
and wstx-asl-3.2.4.jar
.
In my console application, I simply add these to my classpath and they run fine. However, when I deploy this to glassfish (jars are placed in WEB-INF/lib/
) I get this:
java.lang.reflect.InvocationTargetException
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Can not invoke the getTypeObject method in the extension mapper class
I noticed that in my console application, when I removed wstx-asl-3.2.4.jar
from my classpath, I would get this exact same error. So my feeling is that this jar is not loaded some how.
I then moved on to repackaging the jars together. I made this big axis2+wstx.jar and loaded it into my glassfish project. Same error... It is definately loading since without the axis2 jar it would throw a axis2 class not def exception way earlier.
So my theory is that glassfish is loading the jars lazily and since neither the axis2 jar nor my main program requires this wstx jar, it is not loaded correctly. But I am probably totally wrong.
I really hope someone could help me out with this.