1

I have developed an app and now am trying to deployed it on Tomcat. when I start start.bat file in Tomcat directory. My console doesn't display any errors and when I open log files, I see this error:

java.lang.ClassNotFoundException: com.sun.xmk.ws.transport.http.servlet.WSServletContextListener

On many forums people say that I didn't add jaxws-rt.jar lib. But I have added it. First I added it as a dependency in maven. After that I deleted the dependency and downloaded the library from official site and added it to my lib folder. This too didn't help. So how can I fix this error? UPDATE

full stacktrace

SEVERE: Error configuring application listener of class 

    com.sun.xmk.ws.transport.http.servlet.WSServletContextListener
    java.lang.ClassNotFoundException: com.sun.xmk.ws.transport.http.servlet.WSServletContextListener
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
5
  • Double check did you add it to the Tomcat library folder ? Commented Jul 1, 2013 at 15:17
  • Just as experiment: try to put the jaxws-rt.jar to tomcat/lib directory. Try to run tomcat without your application. Does it work? Please send full stack trace. It may be helpful Commented Jul 1, 2013 at 15:17
  • @AlexR look at update Commented Jul 1, 2013 at 15:20
  • and yes. without my app tomcat works fine Commented Jul 1, 2013 at 15:21
  • 1
    See recommendation of @Pradeep Pati. Let us know it it helps. Commented Jul 1, 2013 at 15:26

1 Answer 1

2

Instead of putting the jars in your app's WEB-INF/lib dir, put it under the lib dir under Tomcat install directory. That should fix the error.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.