1

While building the war file (Struts2.0) and deploying it on the local tomcat everything is working file and I can able to access the web page but when I am trying to deploy it on the remote server I am getting the below exception. I checked the DTD tiles veriosn in tiles.xml it looks good. Can you please suggest me the way to solve this error?

Sep 15, 2011 7:34:37 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener
java.lang.IllegalStateException: Unable to instantiate container.
    at org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener.java:60)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1307)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1571)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1580)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1560)
    at java.lang.Thread.run(Unknown Source)

Hi My struts version is 2.0.6 and tiles is 2.0 and I don have any other errors. Differences between locan and remote also I couldnt see – veeru 9 mins ago

veeru
  • 31
  • 1
  • 1
  • 5
  • which version of tiles are you using with which version of truts2 – Umesh Awasthi Sep 15 '11 at 06:22
  • Are you sure you're deploying all the required libraries? If you have devMode turned on, and logging at DEBUG levels to you see any further exceptions in the log? Any other differences between your local and remote environments? – Dave Newton Sep 15 '11 at 06:23
  • My struts version is 2.0.6 and tiles is 2.0 and I don have any other errors. Differences between locan and remote also I couldnt see – veeru Sep 15 '11 at 07:24

2 Answers2

1

This may be caused by missing dependencies. Doing a search for this error turns up several occurences of people not including:

  • commons-beanutils-VERSION.jar
  • commons-collections-VERSION.jar
  • commons-digest-VERSION.jar

Make sure you have all the requirements listed here: To use Tiles in your application you need

Here is another example of the same error: Struts2 & Tiles: When apache.org is down my webapp fails to start

The last one is a DTD version mismatch.

As you can see it can be due to several reasons, but since it works on your local PC and not the remote, I would lean towards missing dependencies.

Community
  • 1
  • 1
Russell Shingleton
  • 3,176
  • 1
  • 21
  • 29
  • I already checked for the jars. They are present and also I have checked the version of DTD. It is correct. There might be some other issue. Ya the strange this is how it is working on my local PC? Same war file I am taking to Remote and trying to deploy there :-( – veeru Sep 15 '11 at 11:06
  • Have you tried copying the build directory instead of deploy via war file? Also you might check your server lib for differences. Different versions of Tomcat have difference libs sometimes or you may have put some libs locally in Tomcat and not on the remote server (that is assuming you're running Tomcat). – Russell Shingleton Sep 15 '11 at 12:29
1

Got the answer . Problem solved. The mistake wa in web.xml .

The local server is on windows where as remote server is on unix so there is a mistake in mentioning the relating path in web.xml ( / not required in unix server)

veeru
  • 31
  • 1
  • 1
  • 5