Can any one tell me why the below error comes...
Unable to perform rendering due to exception (java.lang.ClassCastException: org.apache.axiom.util.stax.xop.XOPEncodingStreamWriter incompatible with org.apache.axiom.ext.stax.datahandler.DataHandlerWriter)
I am using axiom in my application which got deployed in WAS 8.5.5.2. The same application is working fine in Jboss6 with axiom-impl,axiom-api,axiom-ext 1.2.12 jars but getting the below error in Websphere. No clues at all.
StackTrace:
stacktrace=org.apache.axiom.util.stax.XMLStreamWriterUtils.internalGetDataHandlerWriter(XMLStreamWriterUtils.java:71)
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(XMLStreamWriterUtils.java:134)
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(XMLStreamWriterUtils.java:134)
com.myapplication.mdivrs.axis2.mdivrsStub$RenderDocument.serialize(mdivrsStub.java:1503)
com.myapplication.mdivrs.axis2.mdivrsStub$RenderDocumentE.serialize(mdivrsStub.java:2607)
com.myapplication.mdivrs.axis2.mdivrsStub$RenderDocumentE.serialize(mdivrsStub.j ava:2593)
org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:90)
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:781)
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:207)
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
Related
I recently migrated my application from java6 to java7 and Websphere 6 to 8.5. but were getting 1 error:
[AxisServlet]: java.lang.NoClassDefFoundError: org.apache.woden.resolver.URIResolver in Axis2 1.3 and WebSphere 8.5 by doing
When I fixed the error using the approach below:
As I am bundling axis2 engine with my application, I disabled WebSphere JAX-WS runtime. I needed to:
configure my web moudle to PARENT LAST classloader
set DisableIBMJAXWSEngine: true in the META-INF/MANIFEST.MF of a WAR file
Now i am getting new error
webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[action]: java.lang.ClassCastException: com.test.obm.struts.filter.OBMFilter incompatible with javax.servlet.Filter
So I have tried to upgrade/degrade the javax/j2ee jar version also to solve above error javax incompatibility error but that too did not work and above error is same coming but when I am running my application by not using PARENT LAST classloader the J2EE error not coming but WSDLs are not running and getting the same:
java.lang.NoClassDefFoundError: org.apache.woden.resolver.URIResolver. again.
I am learning WebServices with JAX-B and Jasper. I can easily generate XML response, but I want to get JSON response, but I get error 500.
Here is exception:
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy [228]
Full server log: http://pastebin.com/Eq2KbyKJ
Okey, I tried with Tomcat, and it works, it seems that is Glassfish related problem, but I want to use Glassfish as server, since I use EJB in my projects.
It's a bug inside Eclipselink: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463169 , try upgrading to the latest version?
I have an application which is using jacorb.jar (org.omg.orb.ORB.class). When i deploying my war file in WAS 8.5.5, I am getting classcast exceptions with ibmorb located at openJdk/jre/lib/ibmorb.jar file. Could anyone help me in using jacorb.jar and resolving errors.
Error:
[3/3/15 5:30:51:863 PST] 00000001 ActivityServi E WACT0001E: The method pre_init(ORBInitInfo) in class com.ibm.ws.activity.remote.cos.ActivityServiceClientInterceptor received an unexpected exception;
the exception stack trace follows: java.lang.ClassCastException: org.jacorb.orb.portableInterceptor.ORBInitInfoImpl incompatible with com.ibm.CORBA.iiop.ExtendedORBInitInfo
at com.ibm.ws.activity.remote.cos.ActivityServiceClientInterceptor.pre_init(ActivityServiceClientInterceptor.java:219)
at org.jacorb.orb.ORB.interceptorPreInit(Unknown Source)
at org.jacorb.orb.ORB.internalInit(Unknown Source)
at org.jacorb.orb.ORB.set_parameters(Unknown Source)
at org.omg.CORBA.ORB.init(ORB.java:371)
Caused by: java.lang.ClassCastException: org.jacorb.orb.ORB incompatible with com.ibm.CORBA.iiop.ORB
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
IBM doesn't support third party ORB as it provides its own ORB. You can find the orb.properties with default properties in IBM JAVA jre folder. If you want to add anything related to ORB that need to inform JRE , we can add an entry in this property folder.
I have completely removed the JacORB from my code and used IBM ORB. They wont be any problem if you compile your code with JacORB and to use the same in IBM websphere as the package structure and method signature wont change. I have tested this practically.
Refer to this thread for more information in creating a corba name space and using it in code. If you follow those, you wont need to add jacorb jars in IBM websphere.
Corba NameService configuration in Websphere 8.5.5
I am developing an application which is a standalone application and gonna package it as a jar file (Which is lika a OSGi Plugin) and will deploy that jar into JBoss.
When I run my application in my eclipse the application works fine. In Jboss It throws error.
java.lang.ClassNotFoundException: org.w3c.dom.Node.
If I add rt.jar to WEB-INF/lib folder and deploy into Jboss. That error no longer thrown. But I got a new exception Even I added jsse.jar to lib but unable to resolve the error.
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a
secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.
Error: "class configured for SSLContext: sun.security.ssl.SSLContextImpl$TLS10Context
not a SSLContext".
......
Caused by: java.security.NoSuchAlgorithmException: class configured for
SSLContext: sun.security.ssl.SSLContextImpl$TLS10Context not a SSLContext
06:10:53,484 ERROR [stderr] (default-short-running-threads-threads - 26) at
sun.security.jca.GetInstance.checkSuperClass(GetInstance.java:258)
06:10:53,484 ERROR [stderr] (default-short-running-threads-threads - 26) at
sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
06:10:53,484 ERROR [stderr] (default-short-running-threads-threads - 26) at
sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
06:10:53,484 ERROR [stderr] (default-short-running-threads-threads - 26) at
javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
06:10:53,500 ERROR [stderr] (default-short-running-threads-threads - 26) at
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1353)
My Development environment is Jdk1.7 , Windows XP and Eclipse Juno The server Environment is also same as my local environment.
Also try to add
#PowerMockIgnore("javax.net.ssl.*")
as class annotation. Worked for me.
dont ever package rt.jar (or any other java built-in) as part of your deployment. it causes classloading issues and weird errors - like the one youre experiencing now.
what you need to do is declare your dependency on the dom API in your jar's manifest. this has been asked already on the jboss forums. the solution is to have an "Import-Package" key in your top-level artifact's (.ear/.war etc) manifest file with the value org.w3c.dom.Node;resolution:="optional"
edit: or you could switch your DOM-parsing code to rely on an external library not provided with the jdk like dom4j and include that as a library
Help me on this exception , Occurs during calling wcf webservice
Log by netbeans
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy32.logon(Unknown Source)
at newtestclient.NewTestClient.main(NewTestClient.java:92)
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:533)
... 5 more
Java Result: 1
The exception says :
java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext.
It's a common error that appears when there is a conflict between libraries and its dependencies. You should try to execute your code in a test project with only the libraries from JAX-RPC, and then add one by one the rest of your app libraries.
Also, you should check your server libraries to discard any kind of conflict for having the same library (or its dependencies) in your app and in your server with different versions.