java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.AnnotationIntrospector.findPropertyIndex - java

I'm trying to deploy a WAR application into a wls 12c (v12.2.1.0.0) and I'm getting the error above.
I'm using Swagger (for REST WS) and some pages supported by JSF framework.
The error happens only when I have a DTO as a parameter on a POST method:
#POST
#Path("/pesquisa")
#Consumes(MediaType.APPLICATION_JSON)
#ApiOperation(value = "Lista de Centros")
#ApiResponses(value = {
#ApiResponse(code = HttpServletResponse.SC_BAD_REQUEST, message = "BAD REQUEST"),
#ApiResponse(code = HttpServletResponse.SC_OK, message = "OK")})
public Response pesquisaCentros(#ApiParam(required = true) PesquisaCentroDto dto){
List<CentrosBean> lista = pesquisaCentros.pesquisaCentros(dto);
return Response.ok(lista).build();
}
But if I put a String instead of PesquisaCentroDto all works fine...
I know that probably this is an compatibility error, but where? Here is my
mvn dependency:tree result
The error stack trace:
Aug 18, 2017 10:46:15 AM BST> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: weblogic.application.ModuleException: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.AnnotationIntrospector.findPropertyIndex(Lcom/fasterxml/jackson/databind/introspect/Annotated;)Ljava/lang/Integer;
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:237)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:232)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:82)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:753)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:263)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:53)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:601)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:343)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:895)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1422)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:454)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.AnnotationIntrospector.findPropertyIndex(Lcom/fa
sterxml/jackson/databind/introspect/Annotated;)Ljava/lang/Integer;
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:363)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:127)
at io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:99)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:106)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:71)
at io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:79)
at io.swagger.converter.ModelConverters.readAsProperty(ModelConverters.java:58)
at io.swagger.util.ParameterProcessor.applyAnnotations(ParameterProcessor.java:175)
at io.swagger.jaxrs.Reader.getParameters(Reader.java:971)
at io.swagger.jaxrs.Reader.parseMethod(Reader.java:897)
at io.swagger.jaxrs.Reader.read(Reader.java:298)
at io.swagger.jaxrs.Reader.read(Reader.java:150)
at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:235)
at io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:214)
at pt.gov.cic.rest.ApplicationBootstrap.init(ApplicationBootstrap.java:55)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:343)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:294)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:196)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:99)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:87)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:71)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:57)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:31)
at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:673)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:612)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2053)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:2030)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1919)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3063)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1830)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:875)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
Any idea of what could be happening here?
Thank you in advance!

The error was probably generated by incompatibility versions of libraries in weblogic and EAR package.
You can configure weblogic to load only jackson libraries are inside the package, by the application deployment descriptor.
weblogic-application.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application
xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.5/weblogic-application.xsd">
<prefer-application-packages>
<package-name>com.fasterxml.*</package-name>
</prefer-application-packages>

Related

Weblogic 12c deploy error with CXF web app: java.lang.IncompatibleClassChangeError: Implementing class

I am trying to deploy a simple CXF web service app to WebLogic 12c. This CXF app runs fine on Tomcat v9.0.
I get the deployment error below when I try to activate the installation in the WLS 12c console
<Mar 24, 2020 1:56:21,866 PM EDT> <Error> <Deployer> <myserver> <MSvr1> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <28078776-c663-4758-859c-57a95e259a96-0000087f> <1585072581866> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-149265> <Failure occurred in the execution of deployment request with ID "1616440100713499" for task "145" on [partition-name: DOMAIN]. Error is: "weblogic.management.DeploymentException: java.lang.IncompatibleClassChangeError: Implementing class"
weblogic.management.DeploymentException: java.lang.IncompatibleClassChangeError: Implementing class
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:132)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:244)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:66)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:65)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:229)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:103)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:242)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:800)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1352)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:270)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:177)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:186)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:14)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:47)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:678)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
Caused By: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:71)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:71)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow.loadClass(PojoAnnotationProcessingFlow.java:366)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow.access$100(PojoAnnotationProcessingFlow.java:58)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow$CollectorFilter.accept(PojoAnnotationProcessingFlow.java:341)
at weblogic.application.utils.annotation.ClassfinderClassInfos.getAnnotatedClasses(ClassfinderClassInfos.java:720)
at weblogic.application.utils.annotation.ClassfinderClassInfos.getAnnotatedClassesByTargetsAndSources(ClassfinderClassInfos.java:664)
at weblogic.application.utils.annotation.ClassfinderClassInfos.getAnnotatedClassesByTargetsAndSources(ClassfinderClassInfos.java:639)
at weblogic.servlet.internal.War$CompositeClassInfoFinder.getAnnotatedClassesByTargetsAndSources(War.java:836)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow.processAnnotations(PojoAnnotationProcessingFlow.java:288)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow.processPOJOsInModuleScopes(PojoAnnotationProcessingFlow.java:229)
at weblogic.application.internal.flow.PojoAnnotationProcessingFlow.prepare(PojoAnnotationProcessingFlow.java:73)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:241)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:66)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:65)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:229)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:103)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:242)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:800)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1352)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:270)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:177)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:186)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:14)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:47)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:678)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
>
Here is my META-INF/weblogic-application.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application
xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd
http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>com.ctc.wstx.*</wls:package-name>
<wls:package-name>javax.wsdl.*</wls:package-name>
<wls:package-name>org.apache.cxf.*</wls:package-name>
<wls:package-name>javax.jws.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
I am deploying the app as an .ear file with all the CXF libraries packaged in the war inside the /lib directory.
Should I install the CXF libraries on WebLogic and take them out of the .ear/.war?

War not getting deployed in weblogic on changing camel version

I have spring project that is using apache camel version 2.13.2 and when i try to update the version to 2.18.1. My war fails to start and throws the following error -
Target state: deploy failed on Server Common
java.lang.ClassNotFoundException: org.springframework.util.backoff.BackOff
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:981)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:942)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:564)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:500)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:464)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:441)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at org.apache.camel.component.jms.JmsConfiguration.chooseMessageListenerContainerImplementation(JmsConfiguration.java:691)
at org.apache.camel.component.jms.JmsConfiguration.createMessageListenerContainer(JmsConfiguration.java:681)
at org.apache.camel.component.jms.JmsEndpoint.createMessageListenerContainer(JmsEndpoint.java:183)
at org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:178)
at org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:71)
at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69)
at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:103)
at org.apache.camel.impl.RouteService.doWarmUp(RouteService.java:167)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:141)
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3615)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3522)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3308)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3162)
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:275)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:353)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:776)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:725)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:196)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:251)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:204)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:189)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1910)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3063)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1830)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:875)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:237)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:232)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:82)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:753)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:263)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:53)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:601)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:343)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:895)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1422)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:454)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Is there any specific reason why this is happening or what and where i should look as i am really clueless as to why change in camel results in spring's class not being found?
And apart from this, all my routes made in java configuration are not working and throw exceptions like consumer not found for endpoint for all the routes that consume message from given endpoint but same seems to work in when writen in xml. Is there any reason for this? I am using camel 2.13.2 and java configuration for routes is done by extending RouteBuilder, also i have other routes that are already written in xml and the xml has been added in contextConfigLocation. Is it somehow related to adding xml in contextConfig?
camel-jms:2.18.1 component uses spring-jms with version 4.3.4.RELEASE. You need to upgrade to spring 4.3.4.RELEASE or migrate camel-jms component to camel-sjms, which does not use spring. You can find all relevant dependencies in camel-parent-2.18.1.pom
If you are using Maven, the best way to keep your dependencies consistent is using BOM:
<dependencyManagement>
<dependnecies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
<version>2.18.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependnecies>
</dependencyManagement>
and then exclude version for all camel and spring related dependencies, which you are using in application.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>

Deploy ApacheCXF on weblogic 12.1.2.0.0

I try to deploy my application that uses spring+apache cxf on weblogic server.
I keep getting this error message:
javax.servlet.ServletException: Servlet class:
org.apache.cxf.transport.servlet.CXFServlet' does not implement
javax.servlet.Servlet at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:330)
at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at
weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:98)
at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:86)
at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
at
weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:60)
at
weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:34)
at
weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:652)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:593)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1924)
at
weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1901)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1791)
at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2807)
at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1661)
at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:822)
at
weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at
weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at
weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
In my web.xml:
<servlet>
<description>Apache CXF Endpoint</description>
<display-name>cxf</display-name>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/ksas4/*</url-pattern>
</servlet-mapping>
weblogic.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-web-app
xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://http://www.oracle.com/technology/weblogic/weblogic-web-app/1.1/weblogic-web-app.xsd">
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
and my weblogic-application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application">
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
<prefer-application-packages>
<package-name>com.ctc.wstx.*</package-name>
<package-name>javax.jws.*</package-name>
<package-name>com.sun.xml.*</package-name>
<package-name>javax.xml.bind.*</package-name>
<package-name>org.slf4j.*</package-name>
<package-name>ch.qos.logback.*</package-name>
<!--<package-name>org.apache.cxf.*</package-name>-->
<package-name>org.apache.xml.security.*</package-name>
<package-name>antlr.*</package-name>
<package-name>com.google.common.*</package-name>
<package-name>com.sun.istack.*</package-name>
<package-name>javax.annotation.*</package-name>
<package-name>javax.annotation.security.*</package-name>
<package-name>javax.annotation.sql.*</package-name>
<package-name>javax.mail.*</package-name>
<package-name>javax.mail.event.*</package-name>
<package-name>javax.mail.internet.*</package-name>
<package-name>javax.mail.search.*</package-name>
<package-name>javax.mail.util.*</package-name>
<package-name>javax.servlet.*</package-name>
<package-name>javax.servlet.annotation.*</package-name>
<package-name>javax.servlet.descriptor.*</package-name>
<package-name>javax.servlet.http.*</package-name>
<package-name>javax.wsdl.*</package-name>
<package-name>javax.wsdl.extensions.*</package-name>
<package-name>javax.wsdl.factory.*</package-name>
<package-name>javax.wsdl.xml.*</package-name>
<package-name>javax.xml.stream.*</package-name>
<!--<package-name>javax.xml.ws.*</package-name>-->
<package-name>org.bouncycastle.*</package-name>
<package-name>org.bouncycastle.*</package-name>
<package-name>org.bouncycastle.asn1.*</package-name>
<package-name>org.bouncycastle.crypto.*</package-name>
<package-name>org.bouncycastle.i18n.*</package-name>
<package-name>org.bouncycastle.jce.*</package-name>
<package-name>org.bouncycastle.math.*</package-name>
<package-name>org.bouncycastle.util.*</package-name>
<package-name>org.bouncycastle.x509.*</package-name>
<package-name>org.codehaus.stax2.*</package-name>
<package-name>org.joda.time.*</package-name>
<package-name>org.jvnet.fastinfoset.*</package-name>
<package-name>org.objectweb.asm.*</package-name>
<package-name>org.opensaml.soap.*</package-name>
</prefer-application-packages>
</weblogic-application>
I used this to add needed package and then ran analysis tool on weblogic that told me to add rest.
On glassfish everything works ok, so application itself should be ok. And CXFServlet does implement Servlet ( it extends GenericServlet ).
EDIT:
If i don't use weblogic-application.xml, it gets deployed, however i keep getting
o.a.c.p.PhaseInterceptorChain - Interceptor for {xxx}zzz
has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAA
JInInterceptor.java:146) ~[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAA
JInInterceptor.java:108) ~[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[
cxf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:1
21) [cxf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java
:251) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.ja
va:234) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cx
f-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cx
f-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.ja
va:293) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:751) [weblogic.server.merged.jar:
12.1.2.0.0]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268
) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:280) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:254) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136) [
weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341) [weblogic.ser
ver.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238) [weblogic.ser
ver.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServ
letContext.java:3363) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:3333) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) [
weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) [com.oracle.css
.weblogic.security.wls_7.0.0.0.jar:CSS 7.0 0.0]
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) [weblogic.server
.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java
:2220) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
146) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124) [w
eblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564) [weblogic.
server.merged.jar:12.1.2.0.0]
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSu
pportProviderImpl.java:254) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295) [weblogic.server.merged.jar:1
2.1.2.0.0]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254) [weblogic.server.merged.jar:12.1.
2.0.0]
Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: oracle.j2ee.ws.s
aaj.soap.MessageFactoryImpl cannot be cast to javax.xml.soap.MessageFactory
at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:125) ~[saaj-api-1.3.4.jar:1
.7.0_67]
at org.apache.cxf.binding.soap.saaj.SAAJFactoryResolver.createMessageFactory(SAAJFactoryReso
lver.java:62) ~[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.getFactory(SAAJIn
Interceptor.java:158) ~[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAA
JInInterceptor.java:134) ~[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
... 29 common frames omitted
08:09:22.195 [[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN
o.a.c.p.PhaseInterceptorChain - Interceptor for {xxx}zzz
has thrown exception, unwinding now
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454) ~[na:1.7.0_67]
at java.lang.Integer.valueOf(Integer.java:582) ~[na:1.7.0_67]
at webservice.interceptors.FaultOutInterceptor.handleMessage(FaultOutInterceptor.java:56) ~[
_wl_cls_gen.jar:na]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [c
xf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultCha
inInitiatorObserver.java:112) [cxf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.jav
a:366) [cxf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324) [c
xf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:1
21) [cxf-core-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java
:251) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.ja
va:234) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cx
f-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cx
f-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.ja
va:293) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:751) [weblogic.server.merged.jar:
12.1.2.0.0]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268
) [cxf-rt-transports-http-3.1.4.jar:3.1.4]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:280) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:254) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136) [
weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341) [weblogic.ser
ver.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238) [weblogic.ser
ver.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServ
letContext.java:3363) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:3333) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) [
weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) [com.oracle.css
.weblogic.security.wls_7.0.0.0.jar:CSS 7.0 0.0]
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) [weblogic.server
.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java
:2220) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
146) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124) [w
eblogic.server.merged.jar:12.1.2.0.0]
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564) [weblogic.
server.merged.jar:12.1.2.0.0]
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSu
pportProviderImpl.java:254) [weblogic.server.merged.jar:12.1.2.0.0]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295) [weblogic.server.merged.jar:1
2.1.2.0.0]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254) [weblogic.server.merged.jar:12.1.
2.0.0]
Made it work.
First problem was in
<package-name>javax.servlet.*</package-name>
<package-name>javax.servlet.annotation.*</package-name>
<package-name>javax.servlet.descriptor.*</package-name>
<package-name>javax.servlet.http.*</package-name>
and that caused
javax.servlet.ServletException: Servlet class: org.apache.cxf.transport.servlet.CXFServlet
does not implement javax.servlet.Servlet
and that moved me on to second problem :
javax.xml.soap.SOAPException: Unable to create message factory for SOAP: oracle.j2ee.ws.s
aaj.soap.MessageFactoryImpl cannot be cast to javax.xml.soap.MessageFactory
to resolve this I needed to add two libraries in my POM
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>saaj-api</artifactId>
<version>1.3.5</version>
</dependency>
and then in weblogic-application.xml add
<package-name>com.sun.xml.messaging.saaj.*</package-name>
<package-name>javax.xml.soap.*</package-name>
Now it works both on weblogic and glassfish.

Weblogic 12c web service generates null pointer exception on deployment

When upgrading to weblogic 12c from 10.3 we are getting the following null pointer exception on deployment for our web service. The same web service works fine in weblogic 10.3. I am using wsgen to build the webservice. I am also using java 1.7, but have tried the same with 1.6
com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor java.lang.NullPointerException
java.lang.NullPointerException
at org.eclipse.persistence.jaxb.compiler.SchemaGenerator.addSchemaComponents(SchemaGenerator.java:206)
at org.eclipse.persistence.jaxb.compiler.SchemaGenerator.generateSchema(SchemaGenerator.java:144)
at org.eclipse.persistence.jaxb.compiler.SchemaGenerator.generateSchema(SchemaGenerator.java:132)
at org.eclipse.persistence.jaxb.compiler.Generator.generateSchemaFiles(Generator.java:209)
at org.eclipse.persistence.jaxb.JAXBContext.generateSchema(JAXBContext.java:242)
at org.eclipse.persistence.jaxb.JAXBContext.generateSchema(JAXBContext.java:215)
at com.sun.xml.ws.db.toplink.JAXBContextWrapper.generateSchema(JAXBContextWrapper.java:116)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.generateTypes(WSDLGenerator.java:433)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.generateDocument(WSDLGenerator.java:409)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.doGeneration(WSDLGenerator.java:306)
at com.sun.xml.ws.db.DatabindingImpl.generateWSDL(DatabindingImpl.java:224)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:528)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:240)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:546)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:525)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:257)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:151)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:233)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:190)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1730)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:192)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:186)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:94)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
I ran into this issue and discovered that I had included two (2) Weblogic 10 files in my WAR file which cause this issue; weblogic-10.3.6.jar and wlfullclient-10.3.6.jar.
Once I removed the, it started up fine.

Problem with running CXF on Weblogic 10.3.5 /w SOA server

I deployed a CXF Web Service war file on a Weblogic 10.3.5 with OracleSOA server, and I got following exceptions. I tested the war file on another Weblogic without OracleSOA without server and work fine.
<Jul 28, 2011 3:08:31 PM HKT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodException: oracle.j2ee.ws.wsdl.extensions.soap.SOAPBindingImpl.getElementType()
at java.lang.Class.getDeclaredMethod(Class.java:1937)
at org.apache.cxf.tools.common.ExtensionInvocationHandler.invoke(ExtensionInvocationHandler.java:41)
at $Proxy607.getElementType(Unknown Source)
at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.hasUsingAddressing(JaxWsEndpointImpl.java:240)
at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.extractWsdlExtensibilities(JaxWsEndpointImpl.java:201)
Truncated. see log file for complete stacktrace
>
<Jul 28, 2011 3:08:31 PM HKT> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NoSuchMethodException: oracle.j2ee.ws.wsdl.extensions.soap.SOAPBindingImpl.getElementType()
at java.lang.Class.getDeclaredMethod(Class.java:1937)
at org.apache.cxf.tools.common.ExtensionInvocationHandler.invoke(ExtensionInvocationHandler.java:41)
at $Proxy607.getElementType(Unknown Source)
at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.hasUsingAddressing(JaxWsEndpointImpl.java:240)
at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.extractWsdlExtensibilities(JaxWsEndpointImpl.java:201)
at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.<init>(JaxWsEndpointImpl.java:191)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createEndpoint(JaxWsServiceFactoryBean.java:235)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:166)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
I have added following lines to weblogic.xml, but can't fix the problem:
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
How to fix this problem, because the war file suppose deploy on the SOA Weblogic server?
Package the juddiv3 plus cxf war as an ear
Add the following deployment descriptors to the ear
file "META-INF/application.xml" :
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
<display-name>juddiv3</display-name>
<module>
<web>
<web-uri>juddiv3</web-uri>
<context-root>juddiv3</context-root>
</web>
</module>
</application>
file "META.INF/weblogic-application.xml" :
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>javax.wsdl.*</wls:package-name>
<!-- If using hibernate also add this
<wls:package-name>antlr.*</wls:package-name>
-->
</wls:prefer-application-packages>
</wls:weblogic-application>
A similar issue reported with CXF and Weblogic 10.3.3 says the error is because Oracle loads it's own wsdl4j and instead use one from within your war. Is wsdl4j jar present in the WEB-INF/lib of your war?
Only then will wls:prefer-web-inf-classes be effective.
Otherwise CXF recommends packaging your war as an ear on Weblogic, add a weblogic-application.xml (Weblogic specific) in the META-INF folder and using
<prefer-application-packages>
Can you try the first approach and then the second?

Categories

Resources