web services - ClassCastException for xml security (TransformC14NExclusive) -
i have implemented web service cxf application (jdk 1.6.24) , runs on jboss 5.1.0 fine. after time web service not working throws following exception
java.lang.classcastexception: org.apache.xml.security.transforms.implementations.transformc14nexclusive cannot cast org.apache.xml.security.transforms.transformspi @ org.apache.xml.security.transforms.transform.gettransformspi(unknown source) @ org.apache.xml.security.transforms.transform.<init>(unknown source) @ org.apache.xml.security.transforms.transform.getinstance(unknown source) @ org.apache.xml.security.transforms.transform.getinstance(unknown source) @ org.apache.xml.security.transforms.transforms.addtransform(unknown source) @ org.apache.ws.security.message.wssecsignature.addreferencestosign(wssecsignature.java:599) @ org.apache.ws.security.message.wssecsignature.build(wssecsignature.java:774) @ org.apache.ws.security.action.signatureaction.execute(signatureaction.java:65) @ org.apache.ws.security.handler.wshandler.dosenderaction(wshandler.java:206) @ org.apache.cxf.ws.security.wss4j.wss4joutinterceptor.access$200(wss4joutinterceptor.java:50) @ org.apache.cxf.ws.security.wss4j.wss4joutinterceptor$wss4joutinterceptorinternal.handlemessage(wss4joutinterceptor.java:257) @ org.apache.cxf.ws.security.wss4j.wss4joutinterceptor$wss4joutinterceptorinternal.handlemessage(wss4joutinterceptor.java:134) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:255) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:516) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:313) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:265) @ org.apache.cxf.frontend.clientproxy.invokesync(clientproxy.java:73) @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:124) @ $proxy566.getentityrepresentatives(unknown source) @ mycodeclient() @ mycodemethodcall() @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.jboss.aop.joinpoint.methodinvocation.invoketarget(methodinvocation.java:122) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:111) @ org.jboss.ejb3.ejbcontainerinvocationwrapper.invokenext(ejbcontainerinvocationwrapper.java:69) @ org.jboss.ejb3.interceptors.aop.interceptorsequencer.invoke(interceptorsequencer.java:73) @ org.jboss.ejb3.interceptors.aop.interceptorsequencer.aroundinvoke(interceptorsequencer.java:59) @ sun.reflect.generatedmethodaccessor325.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.jboss.aop.advice.perjoinpointadvice.invoke(perjoinpointadvice.java:174) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.interceptors.aop.invocationcontextinterceptor.fillmethod(invocationcontextinterceptor.java:72) @ org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.invocationcontextinterceptor_z_fillmethod_1509825954.invoke(invocationcontextinterceptor_z_fillmethod_1509825954.java) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.interceptors.aop.invocationcontextinterceptor.setup(invocationcontextinterceptor.java:88) @ org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.invocationcontextinterceptor_z_setup_1509825954.invoke(invocationcontextinterceptor_z_setup_1509825954.java) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.connectionmanager.cachedconnectioninterceptor.invoke(cachedconnectioninterceptor.java:62) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.entity.transactionscopedentitymanagerinterceptor.invoke(transactionscopedentitymanagerinterceptor.java:56) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.allowedoperationsinterceptor.invoke(allowedoperationsinterceptor.java:47) @ org.jboss.aop.joinpoint.methodinvocation.invokenext(methodinvocation.java:102) @ org.jboss.ejb3.tx.nullinterceptor.invoke(nullinterceptor.java:42)
the workaround have used removing tmp, data , work folder jboss. works fine afterwards, until throws error again later.
most cause of exception same class loaded multiple classloaders.
you have review how package application.
jboss has cxf jars , visible default application. if package cxf jars application, must understand jboss classloading rules , how tweak them.
Comments
Post a Comment