Solved

What should I do to fix and IllegalStateException?

Posted on 2014-04-01
8
699 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now