i'm trying to use optaplanner OSGI-core.
In a Java standard environment i have custimze the Vehiclerouting example in order to run it without UI and all works fine. After that i made an OSGI bundle of this project, but when it start i get this error from Xstream.
com.thoughtworks.xstream.mapper.CannotResolveClassException: org.optaplanner.core.config.solver.SolverConfig
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
the exception is raised from this snippet of code:
#Override
protected Solver createSolver() {
File solver = new File(SOLVER_CONFIG);
SolverFactory solverFactory =SolverFactory.createFromXmlFile(solver);
return solverFactory.buildSolver();
}`
Googling i undestrand that it is a problem related to Xtream and Class Loading on OSGI, someone suggest to wrap Xstream inside the bundle that use it. But in my case Xstream metodhs are called by a 3rd part bundle (Optaplanner-core).
How can i fix this problem?
I think I solved this issue.
So, I have 3 bundles:
XStream (Bundle A)
OptaPlanner-Core, which is where org.optaplanner.core.config.solver.SolverConfig is
(Bundle B)
My code that use the SolverFactory.createFromXmlResource() (Bundle C)
Now, when Bundle B invokes xStream.fromXML (https://github.com/droolsjbpm/optaplanner/blob/2a0c40283c8b8a068d24c40297581ff2c597bf1e/optaplanner-core/src/main/java/org/optaplanner/core/impl/solver/XStreamXmlSolverFactory.java#L117) it needs to resolve SolverConfig.class (https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-core/src/main/java/org/optaplanner/core/impl/solver/XStreamXmlSolverFactory.java#L51).
However, in an OSGI environment, XStream lives in an isolated Classloader, so Bundle A can't access Bundle B's components. That said, to make XStream work, I have to call the Xstream.setClassloader(getclass().getClassloader()) after the initialization.
Finally, XStream must resolve the class that I declare into the solver.xml and this class is in Bundle C. But since OptaPlanner-Core, obviously, can't import that class, I need to add <DynamicImport-Package>*</DynamicImport-Package> in Bundle B's pom.xml. In this way OptaPlanner can load everything it needs at runtime.
Related
I have log4j in spring boot project which uses firebase admin
Randomly firebase admin threw this error even if it is not in use.
Exception in thread "firebase-database-worker" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.error(Logger.java:538)
at com.google.firebase.database.core.JvmPlatform$1.handleException(JvmPlatform.java:57)
at com.google.firebase.database.utilities.DefaultRunLoop.handleExceptionInternal(DefaultRunLoop.java:102)
at com.google.firebase.database.utilities.DefaultRunLoop.access$000(DefaultRunLoop.java:34)
at com.google.firebase.database.utilities.DefaultRunLoop$1.afterExecute(DefaultRunLoop.java:65)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-08-13 22:27:22,729 INFO [http-nio-9658-exec-190]
It seems like it needs a different log library, and when I tried to install ch/qos
The project won't work. unless I removed it from the pom.xml
Does anyone have a solution?
i don't want to change my log library as I can't replace firebase now
I am unable to configure Spring Batch Admin 1.3.0
I have overridden the data source defaults but I keep getting all kinds of errors.
The last one has to do with ClassNotFoundException.
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.MessagingException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) ~[catalina.jar:7.0.42]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ~[catalina.jar:7.0.42]
... 35 more
Sep 30, 2014 5:45:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
I have included Spring Messaging 4.0 jar in the pom..
I had similar issues using Spring Batch Admin 1.3.0 with Spring 4.1.4 . Several of the classes have had their names changed or have been moved to different packages. Also, a couple of the previously deprecated "SimpleXxx" classes have been dropped (SimpleJdbcTemplate, for example). The resolution is to use the current classes and packages, and to lose the "simple" from a couple of class names.
I finally resolved all of my issues with spring-batch-admin by downloading the current 1.3.1.RELEASE source from github and building it without any modifications.
Does this help?
You might be missing spring-integration-core jar. Please check and try again.
I have a curious behavior when I start my Karaf.
My JAR bundle contains a simple camel spring xml route that transforms an incoming xml fragment to text with an xslt. I use a BridgePropertyPlaceholderConfigurer to externalize my properties into {karaf.base}/etc/karaf-invalid-bundle.cfg.
To illustrate my post, I created a github repository https://github.com/johanlelan/Karaf-invalid-bundle-example.
Occasionally, my bundle fails to start for a strange cause:
karaf#root> log:display-exception
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route error.sample at: >>> To[xslt:xslt/template.xslt] <
<< in route: Route(error.sample)[[From[ref:incoming.endpoint]] -> [SetHea... because of java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)[121:org.apache.camel.camel-spring:2.12.2]
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)[121:org.apache.camel.camel-spring:2.12.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)[78:org.springframework.context:3.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)[78:org.springframework.context:3.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)[78:org.springframework.context:3.2.4.RELEASE]
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[117:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[117:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[117:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[117:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[118:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_45]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route error.sample at: >>> To[xslt:xslt/template.xslt] <<< in route: Route(error.sample)[[From[ref:incoming.endpoint]] -> [SetHea... because of java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1670)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)[121:org.apache.camel.camel-spring:2.12.2]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)[121:org.apache.camel.camel-spring:2.12.2]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)[121:org.apache.camel.camel-spring:2.12.2]
... 10 more
Caused by: org.apache.camel.RuntimeCamelException: java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.core.osgi.OsgiServiceRegistry.findByTypeWithName(OsgiServiceRegistry.java:110)[121:org.apache.camel.camel-spring:2.12.2]
at org.apache.camel.impl.CompositeRegistry.findByTypeWithName(CompositeRegistry.java:87)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.findByTypeWithName(PropertyPlaceholderDelegateRegistry.java:70)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.processor.interceptor.DefaultChannel.getOrCreateBacklogTracer(DefaultChannel.java:339)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.processor.interceptor.DefaultChannel.initChannel(DefaultChannel.java:202)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.ProcessorDefinition.wrapChannel(ProcessorDefinition.java:269)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.ProcessorDefinition.wrapProcessor(ProcessorDefinition.java:251)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:507)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)[113:org.apache.camel.camel-core:2.12.2]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)[113:org.apache.camel.camel-core:2.12.2]
... 20 more
Caused by: java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleContextImpl.getAllServiceReferences(BundleContextImpl.java:411)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.camel.core.osgi.OsgiServiceRegistry.findByTypeWithName(OsgiServiceRegistry.java:94)[121:org.apache.camel.camel-spring:2.12.2]
... 29 more
karaf#root>
I think that this error is linked to my properties or to my BundleActivator class.
Any ideas on the way to stop this behavior?
Johan
Not sure about your concrete problem in spring. I stopped using spring on OSGi a long time ago.
A much easier solution would be to just use blueprint instead of spring. You can then use the config admin support of blueprint to attach to the config file in etc. BLueprint runs much smoother in OSGi than spring dm.
You also have the advantage that config admin properties configured by blueprint are automatically available as camel properties.
I have a question. I'm still new to Spring Framework and how to configure a Jetty server with Apache CXF and JAX-RS services there.
I'm working on a Maven multi-module project and my module is just one part of that whole project. It's written in Java. And it uses the Spring Framework with Spring Beans/BeanFactory there. It's configured in an XML file there.
I followed those documentations:
- http://cxf.apache.org/docs/jetty-configuration.html
- http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAX-RSservices
- http://cxf.apache.org/docs/secure-jax-rs-services.html
The JAX-RS service is running so far already, but it shows me an empty webpage then. It also shows me in a LOG file that the Java classes (with the JAX-RS annotations #GET, #PUT and so on) of the JAX-RS service are running and called already, but as soon as I send a request, I receive the following error message:
27 Apr 2014 20:05:53 (cdmi) [] /
java.lang.NoSuchMethodError: org.eclipse.jetty.server.Request.getConnection()Lorg/eclipse/jetty/server/HttpConnection;
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:222) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.Server.handle(Server.java:370) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
Does someone know this error message. What is the error message trying to tell me and how can I solve it?
I'm not sure which further information might be required, but I can add that information if necessary. The dependency for cxf-rt-transports-http-jetty (version 2.4.0) exists in the POM.xml file of my Maven module.
Many thanks in advance!!!
NoSuchMethodError basically means that a class definition has changed between compile time and runtime. This can be caused by using a different version of a jar when running your application than the version things were compiled with.
It looks like sometime between Jetty 8 and 9 the getConnection method was removed from Request. I would check your target folder to make sure you don't have multiple versions of any jars and that the versions you are using are compatible with each other. Also make sure that however you are running Jetty, it's the same version as the libraries your application depends on.
You might also run maven dependency:tree to check that versions in your pom aren't being overridden in unexpected ways.
My problem concerns CXF and the wsdl4j_1.6.2.jar colliding with something, presumably the axis-wsdl4j.jar.
I have read: What's wrong with my Apache CXF client?
My project does not include the axis-wsdl4j.jar in the war. I have also asked our admin to switch Websphere to Parent Last. I still get this:
[12/13/12 16:01:28:378 CST] 0000001b ServletWrappe E SRVE0068E:
Uncaught exception thrown in one of the service methods of the
servlet: CXFServlet. Exceptio n thrown : java.lang.RuntimeException:
org.apache.cxf.interceptor.Fault:
javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)
Ljavax/wsdl/Definition;
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:322)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: org.apache.cxf.interceptor.Fault:
javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
... 26 more Caused by: java.lang.NoSuchMethodError: javax/wsdl/xml/WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:242)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
at org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:92)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:147)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:97)
at javax.xml.ws.Service.(Service.java:35)
...
Project is built by Maven, deployed to Websphere via Continuum only; and all settings are changed via request. Application runs perfect on local Tomcat.
EDIT:
This was eventually fixed by:
Copy wsdl4j.jar to /usr/WebSphere/AppServer/appLibs/APPNAME directory.
Chmod 775 on previous.
In websphere admin console, environment (on left), Shared Libraries, and define a container wide shared library with name as APPNAME above.
Add the jar to the classpath of the shared library.
Servers (on left), APPNAME java, process management, Class Loader and make sure "Classes loaded with application class loader first"
Click on the class loader and assign the shared library to it.
Restart Server
i think you need to disable Jax ws engine
Try setting JVM property as below
com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true
here is what i would do.
Turn on verbose class loading on WAS runtime and look at the JAR that contains WSDLReader.
Check if this is the JAR that you expected to be used in run-time (to start with) based on the verbose class loading.
HTH