What should I do to fix and IllegalStateException?

Below is the error I get when trying to deploy my web service.  The code is the exact same as on another server so I have no clue why I am getting this error on the new server.  Where should I begin to look to fix this problem?

SEVERE: Error deploying web application archive /path/to/web/sercvice/webservice.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/benchmarkwebservice]]
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:744)

Open in new window

Monica StanleyInformation Technology SpecialistAsked:
Who is Participating?
 
Monica StanleyInformation Technology SpecialistAuthor Commented:
I figured out my problem.  It turns out that the java that is installed on the new server comes prepackaged with jaxws and on the old server I had to package it with my code.  I removed the jaxws from my packaged code and was able to deploy successfully.

I don't know how to close this ticket and who to give credit to.  Looking at the "Caused by" as suggested by mccarl is what led me to finding the answer.  I am new to this forum.
0
 
Sharon SethCommented:
Could be one of these :

1) The runtime  may be different on both machines . The current machine may be missing some runtime jars.

2) Some jars may be missing from the application's lib dir .

Compare these two on the 2 machines and you shld be fine.
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Is there anything more to that stack trace? I would have expected some lines after what you posted above saying... "Caused by:" and then further stack trace info.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Monica StanleyInformation Technology SpecialistAuthor Commented:
@mccarl,  that is all the system admin provided to me.  I don't get that error on any other server and I don't have access to the tomcat logs to give you the entire print stack.  I will ask him to email it to me.

New Server:  java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Old Server:  java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

The setup of this OpenJDK is really strange.  I find all of the runtime jars under a directory called java-1.6.0-openjdk-1.6.0.0.x86_64 NOT java-1.7.0-openjdk-1.7.0.51.x86_64 as would be expected.  I noticed the following jar files are not on the new server:  ant-javafx.jar, javafx-doclet.jar and javafx-mx.jar.  We develop using NetBeans on a Windows 7 system and then upload to RedHat Linux machine.  Does Apache Ant NEED to be present to run code written with NetBeans?

So... is the problem that ANT is missing or that issue between Java Hotspot and OpenJDK?
0
 
Monica StanleyInformation Technology SpecialistAuthor Commented:
There is the entire stack trace.

INFO: Deploying web application archive /path/to/web/service/webservice.war
Apr 04, 2014 2:59:09 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/benchmarkwebservice]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        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:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1648)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
        at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
        at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:284)
        at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:206)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(Ljavax/servlet/ServletContext;)V
        at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:65)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5456)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 43 more
0
 
Peter_TorettoCommented:
Hi,

JAXWS is a Java API for XML Web Services. It is one of the technologies used by Java to develop web services. JAXWS is a fundamental technology for developing SOAP i.e Simple Object Access Control. It comes prepackaged with Java. Many old servers did not support it but now the latest servers are compatible with it. You can remove the JAXWS anytime to configure your settings.

Hope you find this information useful.

Regards
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
@Amzngmo,

Sorry for not being able to reply sooner, I was away for the weekend.

I'm glad that you were able to find the solution to your problem, and that my prompt to look for more information in the stack trace helped you get there. Your method of closing the questions seems appropriate to me; it indicates which post actually gives the solution to the problem (in case anyone comes across this thread at a later date) and it also awards points to posts that assisted you in getting to that solution. :)
0
 
Monica StanleyInformation Technology SpecialistAuthor Commented:
After searching google for the error in the line starting with "Caused by" I found out that the OpenJDK came prepackaged with JAXWS.  I then realized that may be causing a conflict with the state so I un-packaged it from MY code and it worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.