Java ClassCastException when generating WSDL in Eclipse? -


i trying create new web service in eclipse (bottom up, apache axis 1, tomcat 6), warnings before attempt , error after.

error:

iwab0398e error in generating wsdl java:  java.lang.classcastexception: org.apache.axis.encoding.ser.beanserializer cannot cast org.apache.axis.encoding.serializer 

here use serializable:

public class integrationutils extends utilities implements java.io.serializable {     private static final long serialversionuid = 7515033201857603982l; 

summary of warnings: lot of warnings have classes used web service class not having default constructors.

here warnings:

the service class "net.abc.indy.webservice.integrationutils" not comply 1 or more requirements of jax-rpc 1.1 specification, , may not deploy or function correctly. service class "net.abc.indy.webservice.integrationutils" not comply 1 or more requirements of jax-rpc 1.1 specification, , may not deploy or function correctly.   field or property "headers" on value type "org.apache.axis.axisfault" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.util.arraylist", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "cause" on value type "java.rmi.remoteexception" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.throwable", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "noclasses" on value type "org.apache.axis.description.typedesc" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.class", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "noobjects" on value type "org.apache.axis.description.typedesc" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.object", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "propertydescriptormap" on value type "org.apache.axis.description.typedesc" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.util.map", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "type" on value type "org.apache.axis.utils.beanpropertydescriptor" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.class", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "actualtype" on value type "org.apache.axis.utils.beanpropertydescriptor" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.class", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "javatype" on value type "org.apache.axis.description.fielddesc" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.class", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "headers" on value type "org.apache.axis.axisfault" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.util.arraylist", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   field or property "cause" on value type "java.rmi.remoteexception" used via service class "net.abc.indy.webservice.integrationutils" has data type, "java.lang.throwable", not supported jax-rpc 1.1 specification. instances of type may not serialize or deserialize correctly. loss of data or complete failure of web service may result.   value type "org.w3c.dom.element" used via service class "net.abc.indy.webservice.integrationutils" not have public default constructor. chapter 5.4 of jax-rpc 1.1 specification requires value type have public default constructor, otherwise jax-rpc 1.1 compliant web service engine may unable construct instance of value type during deserialization.   value type "org.w3c.dom.typeinfo" used via service class "net.abc.indy.webservice.integrationutils" not have public default constructor. chapter 5.4 of jax-rpc 1.1 specification requires value type have public default constructor, otherwise jax-rpc 1.1 compliant web service engine may unable construct instance of value type during deserialization.   value type "org.apache.axis.description.typedesc" used via service class "net.abc.indy.webservice.integrationutils" not have public default constructor. chapter 5.4 of jax-rpc 1.1 specification requires value type have public default constructor, otherwise jax-rpc 1.1 compliant web service engine may unable construct instance of value type during deserialization.   value type "org.apache.axis.utils.beanpropertydescriptor" used via service class "net.abc.indy.webservice.integrationutils" not have public default constructor. chapter 5.4 of jax-rpc 1.1 specification requires value type have public default constructor, otherwise jax-rpc 1.1 compliant web service engine may unable construct instance of value type during deserialization.   value type "org.apache.axis.description.fielddesc" used via service class "net.abc.indy.webservice.integrationutils" not have public default constructor. chapter 5.4 of jax-rpc 1.1 specification requires value type have public default constructor, otherwise jax-rpc 1.1 compliant web service engine may unable construct instance of value type during deserialization. 

thanks help!

you classcastexception, whenever have duplicate jars or jar-files same class-files in it. in case different axis version too. problem typically occures, when tomcat instantiates axis-class , sends instance application. application on other side can uses own jars (packaged war or ear). , because of posibility of multi classloader hirarchie in web- or java ee-container can run different webapps there own jar-files-versions @ same server @ same time.

but how solve it? well, search these classes (shown in stacktrace) in jars of tomcat , web-application , check, 1 used instantiate axis-requests/-responses. easiest solution is, remove relevant jar web application , compile code against jar's of runtime environment (your tomcat). if tomcat-jar-versions not usable case, try patch server-jars. alternative solution can different configuration of web-application/server controll classloaders.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -