Axis works very well and I like it a lot. I am using Axis 1.1 final in WSAD 5 and it runs fine normally.
The only thing is that when I am running and make any change at all to my implementation class, then WSAD/Websphere reloads the servlet to pick up the change (so far so good), and right away I get exceptions (see below) that force me to manually restart the application. This occurs reproducibly every time.
I have attached the source but cannot figure out exactly what is happening. Maybe someone else can see. Somehow it is getting a class cast exception running deployTypeMapping, called from initTMR.
BeanSerializerFactory is getting the ClassCastException at the line marked <======= below.
Variables are as follows:
constructor has
clazz= java.lang.Class (org.apache.axis.encoding.ser.BeanSerializerFactory) (id=281)
modifiers= 1
parameterTypes= java.lang.Class[2] (id=290)
[0]= java.lang.Class (java.lang.Class) (id=282)
[1]= java.lang.Class (javax.xml.namespace.QName) (id=285)
factory is
factory= java.lang.Class (org.apache.axis.encoding.ser.BeanSerializerFactory) (id=281)
xmlType is xmlType= javax.xml.namespace.QName (id=284) localPart= "SearchControlParameters" namespaceURI= "http://t.ncfbins.com/tranzax/"
javaType is
javaType= java.lang.Class (com.ncfbins.hostaccess.generated.SearchControlParameters) (id=283)
Again, all of this works on normal load. It is only when the servlet is *re-loaded" that the problem occurs.
Any suggestions would be appreciated.
Thanks!
Don
======================== public static SerializerFactory createFactory(Class factory, Class javaType, QName xmlType) {
SerializerFactory sf = null; try { Method method = factory.getMethod( "create", new Class[] {Class.class, QName.class}); sf = (SerializerFactory) method.invoke(null, new Object[] {javaType, xmlType}); } catch (NoSuchMethodException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) {}
if (sf == null) {
try {
Constructor constructor =
factory.getConstructor(
new Class[] {Class.class, QName.class});
sf = (SerializerFactory) <=========== Exception occurs here
constructor.newInstance(
new Object[] {javaType, xmlType});
} catch (NoSuchMethodException e) {
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {}
}
if (sf == null) { try { sf = (SerializerFactory) factory.newInstance(); } catch (InstantiationException e) { } catch (IllegalAccessException e) {} } return sf; }
==============================================================
Thread [Servlet.Engine.Transports : 0] (Suspended (exception java.lang.ClassCastException))
org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(java.lang.Class, java.lang.Class, javax.xml.namespace.QName) line: 257
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(org.apache.axis.deployment.wsdd.WSDDTypeMapping) line: 549
org.apache.axis.deployment.wsdd.WSDDService.initTMR() line: 267
org.apache.axis.deployment.wsdd.WSDDService.<init>(org.w3c.dom.Element) line: 247
org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(org.w3c.dom.Element) line: 243
org.apache.axis.deployment.wsdd.WSDDDocument.<init>(org.w3c.dom.Document) line: 104
org.apache.axis.configuration.FileProvider.configureEngine(org.apache.axis.AxisEngine) line: 209
org.apache.axis.server.AxisServer(org.apache.axis.AxisEngine).init() line: 187
org.apache.axis.server.AxisServer(org.apache.axis.AxisEngine).<init>(org.apache.axis.EngineConfiguration) line: 172
org.apache.axis.server.AxisServer.<init>(org.apache.axis.EngineConfiguration) line: 126
org.apache.axis.server.DefaultAxisServerFactory.createServer(java.util.Map) line: 148
org.apache.axis.server.DefaultAxisServerFactory.getServer(java.util.Map) line: 112
org.apache.axis.server.AxisServer.getServer(java.util.Map) line: 111
org.apache.axis.transport.http.AxisServletBase.getEngine(javax.servlet.http.HttpServlet) line: 221
org.apache.axis.transport.http.AxisServlet(org.apache.axis.transport.http.AxisServletBase).getEngine() line: 187
org.apache.axis.transport.http.AxisServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 224
org.apache.axis.transport.http.AxisServlet(javax.servlet.http.HttpServlet).service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 740
org.apache.axis.transport.http.AxisServlet(org.apache.axis.transport.http.AxisServletBase).service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 339
org.apache.axis.transport.http.AxisServlet(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 853
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 110 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet)._service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 174 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.IdleServletState.service(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 313 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 116 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 283 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(com.ibm.ws.webcontainer.servlet.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 42 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 40 [local variables unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 923 [local variables unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean) line: 528 [local variables unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 176 [local variables unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 79 [local variables unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(java.lang.Object) line: 201 [local variables unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker(com.ibm.ws.webcontainer.cache.invocation.CachedInvocation).handleInvocation(java.lang.Object) line: 71 [local variables unavailable]
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(java.lang.String, com.ibm.ws.webcontainer.srp.ISRPConnection) line: 182 [local variables unavailable]
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(com.ibm.ws.webcontainer.oselistener.api.IOSEConnection) line: 334 [local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest() line: 56 [local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).readAndHandleRequest(boolean) line: 516 [local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).run() line: 362 [local variables unavailable]
com.ibm.ws.util.ThreadPool$Worker.run() line: 593 [local variables unavailable]