I am getting this error with the new restlet repository. It used to work: java.lang.NoSuchMethodError: org.restlet.routing.VirtualHost.attach(Ljava/lang/String;Lorg/restlet/Restlet;)Lorg/restlet/routing/Route; at org.apache.camel.component.restlet.RestletComponent.attachUriPatternToRestlet(RestletComponent.java:286)
I have an ivy dependency for restlet-2.1.1
I am using a restlet in a camel route
Related
Email from the application is not working from glassfish 6.0.0 due to conflict of javax mail library with the glassfish 6 mail libraries from a modules folder.
We have REST application implemented using jersey 3.0.0 deployed on glassfish 6. We are using log4j for logging.
When there is an error, it failed to send the email. I tried the same application from localhost using tomcat it is sending an email.
This is what I added to my pom.xml
-- Jakarata.mail (1.6.5) jar file and log4j(1.2.17)
I also tried replacing log4J 1.2.17 to log4j2.17.1
I keep getting ClassCastException or ClassNotFoundException or NoSuchMethodError.
With Jakarta.mail.jar I am receiving below error
java.lang.ClassCastException: com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler
I tried replacing Jakarta.mail.jar with (com.sun.mail) javax.mail.jar 1.6.2
I received below error
**ERROR An exception occurred processing Appender LogToMail org.apache.logging.log4j.core.appender.AppenderLoggingException: java.lang.NoSuchMethodError: com.sun.mail.util.MimeUtil.cleanContentType**
Tried with mail.jar 1.4.7 instead of javax.mail.jar and activation.jar(1.1.1)
Getting below Error
**java.lang.NoSuchMethodError: com.sun.mail.util.PropUtil.getBooleanSessionProperty**
As there is already some other mail library there in classloader I removed the mail library from the application then I am getting
**Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException
I tried copying jakarata.mail and jakarata.activation.jar under glassfish/domains/domain1/lib/ext folder but got NOSTMP provider**.
If I copy javax.mail.jar and activation.jar under glassfish/domains/domain1/lib/ext folder then same error **“ERROR An exception occurred processing Appender LogToMail org.apache.logging.log4j.core.appender.AppenderLoggingException: java.lang.NoSuchMethodError: com.sun.mail.util.MimeUtil.cleanContentType”**
I also tried adding mail.jar and activation.jar under glassfish/domains/domain1/lib/ext folder
**ERROR Caught exception while sending e-mail notification.: javax.mail.NoSuchProviderException: smtp javax.mail.NoSuchProviderException: smtp**
I refer to the below link. Not completely understood what xbootclasspath does but tried adding the below lines to domain.xml.
DCH class error with JavaMail
-Xbootclasspath/p:${com.sun.aas.installRoot}/modules/jakarta.mail.jar
-Xbootclasspath/p:${com.sun.aas.installRoot}/modules/jakarta.activation.jar
if anyone is able to successfully send an email from glassfish 6.0.0
Appreciate any help on this.
GlassFish already included Jakarta Mail. There's no need to include it in your pom. When you do, it will conflict, as you per the errors you got.
Jakarata.mail 1.6.5 which you use in your application is old, it uses the javax.mail package prefix. GlassFish 6 uses the jakarta package prefix. You should upgrade to jakarta.mail-api 2.1.0 and use it only for compilation, don't add it to your application WAR (provided scope):
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
I'm useing restlet, version 2.3.12. when using Swagger2SpecificationRestlet to generate swagger document, it failed with exception:
java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedClass.construct(Ljava/lang/Class;Lcom/fasterxml/jackson/databind/AnnotationIntrospector;Lcom/fasterxml/jackson/databind/introspect/ClassIntrospector$MixInResolver;)Lcom/fasterxml/jackson/databind/introspect/AnnotatedClass;
at org.restlet.ext.apispark.internal.introspection.application.RepresentationCollector.addRepresentation(RepresentationCollector.java:124)
at org.restlet.ext.apispark.internal.introspection.application.ResourceCollector.completeOperationOutput(ResourceCollector.java:345)
at org.restlet.ext.apispark.internal.introspection.application.ResourceCollector.completeOperation(ResourceCollector.java:199)
at org.restlet.ext.apispark.internal.introspection.application.ResourceCollector.collectResource(ResourceCollector.java:125)
at org.restlet.ext.apispark.internal.introspection.application.RestletCollector.collectForFinder(RestletCollector.java:100)
at org.restlet.ext.apispark.internal.introspection.application.RestletCollector.collect(RestletCollector.java:64)
at org.restlet.ext.apispark.internal.introspection.application.RestletCollector.collectForRoute(RestletCollector.java:116)
at org.restlet.ext.apispark.internal.introspection.application.RestletCollector.collectForRouter(RestletCollector.java:136)
at org.restlet.ext.apispark.internal.introspection.application.RestletCollector.collect(RestletCollector.java:55)
at org.restlet.ext.apispark.internal.introspection.application.ApplicationIntrospector.getDefinition(ApplicationIntrospector.java:169)
I see the source code, it calls a non exist function, I tried fasterxml jackson version from 2.7 to 2.9.
HAdoop single node cluster is working fine. HAdoop is working fine. JPS/Web interface of hadoop working fine.
I have done set up of hive.
When am entering into hive from hadoop its giving me below error :
"Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
Can someone help me in this case
If you get the slf4j IllegalAccessError shown above, then you are using an older version of slf4j-api, e.g. 1.4.3, with a new version of a slf4j binding, e.g. 1.5.6. As mentioned in the slf4j faq on IllegalAccessError, this typically occurs when your Maven pom.ml file incorporates hibernate 3.3.0 which declares a dependency on slf4j-api version 1.4.2. If your pom.xml declares a dependency on an slf4j binding, say slf4j-log4j12 version 1.5.6, then you will get illegal access errors.
Also refer to the solution here: IllegalAccessError slf4j
We are trying to make a webservice call using CXF framework involving CXF - ws security and the application being deployed in weblogic 10.3 , but receiving the below exception and seems like the weblogic specific jars are picked up , though the xercesimpl jar is present in the application in /WEB-INF/lib .
Options tried , but did not help:
Setting the weblogic container descriptor with
web-inf preferences
true .
Setting the JVM arguments or system property as -
-Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
-Djavax.xml.soap.SOAPFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl
-Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl
Adding xercesimpl jar to maven pom.
Exception
]] Root cause of ServletException.
java.lang.AssertionError: UNIMPLEMENTED
at weblogic.xml.domimpl.NodeImpl.setTextContent(NodeImpl.java:216)
at org.apache.jcp.xml.dsig.internal.dom.XmlWriterToTree.writeAttribute(XmlWriterToTree.java:137)
at org.apache.jcp.xml.dsig.internal.dom.XmlWriterToTree.writeNamespace(XmlWriterToTree.java:114)
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.marshal(DOMXMLSignature.java:211)
at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:329)
at org.apache.wss4j.dom.message.WSSecSignature.computeSignature(WSSecSignature.java:578)
at org.apache.wss4j.dom.action.SignatureAction.execute(SignatureAction.java:151)
at org.apache.wss4j.dom.handler.WSHandler.doSenderAction(WSHandler.java:226)
at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$100(WSS4JOutInterceptor.java:54)
at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessageInternal(WSS4JOutInterceptor.java:282)
at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:154)
at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:141)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)enter code here
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:98)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:138)
Thanks,
Soumya
I finally found the answer without modifying any weblogic startup script (tested on CXF 2.7.0 and weblogic 10.3.6
The reason for this issue is that CXF is not compatible with weblogic implementation of SAAJ. http://cxf.apache.org/docs/application-server-specific-configuration-guide.html
1.
Q: I have this error: javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance.
A: Please make sure you have the saaj-impl-1.3.jar in the classpath and make sure your app picks up this one instead of weblogic one.
The same issue is also causing the UNIMPLEMENTED error in the question
So my solution is
1) put saaj-impl in classpath. If you are using maven, put the dependency on pom.xml
2) in weblogic.xml (in your resources folder) put
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>com.sun.xml.messaging.saaj.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
3) Restart your server through Node Manager and by right the CXF WS-Security should be working
Hope it helps!
I am using Axis2 for connecting the SOAP web service. While connecting I am getting the following exception.
I am using the following jars :
axis2 - 1.6.2
axiom-api - 1.2.14
axis2-transport-http - 1.6.2
Exception :
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory cannot be cast to org.apache.axiom.om.impl.builder.OMFactoryEx
at org.apache.axiom.om.impl.builder.StAXBuilder.<init>(StAXBuilder.java:129)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.<init>(StAXOMBuilder.java:106)
at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.internalCreateStAXOMBuilder(AbstractOMMetaFactory.java:81)
at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.createOMBuilder(AbstractOMMetaFactory.java:95)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:154)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:134)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:105)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:590)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:575)
at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:90)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:857)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at com.emc.exsearchwebservice.driver.ExSearchWebServiceDriver.main(ExSearchWebServiceDriver.java:44)
Finally I got the solution. Problem is mismatched jar version. Axis2 uses axiom-impl.1.2.13.jar, but I have included axiom-api.1.2.14.jar as dependency. Finally I changed the axiom-api version to 1.2.13, this solves the problem.