Solved

What should I do to fix and IllegalStateException?

Posted on 2014-04-01
8
1,099 Views
Last Modified: 2014-04-12
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

0
Comment
Question by:Monica Stanley
8 Comments
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 39971520
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
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 500 total points
ID: 39973925
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
 

Author Comment

by:Monica Stanley
ID: 39978169
@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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:Monica Stanley
ID: 39978861
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
 

Accepted Solution

by:
Monica Stanley earned 0 total points
ID: 39978926
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
 

Expert Comment

by:Peter_Toretto
ID: 39979624
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
 
LVL 35

Expert Comment

by:mccarl
ID: 39987512
@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
 

Author Closing Comment

by:Monica Stanley
ID: 39995861
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 62
HTTPSessionBindingListernter not configured in deployment descriptor 2 65
login jsp example 24 63
swing controls 2 16
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question