File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Adding tiles to the Struts 2 Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Adding tiles to the Struts 2 Application " Watch "Adding tiles to the Struts 2 Application " New topic
Author

Adding tiles to the Struts 2 Application

Jyothi Sree
Ranch Hand

Joined: Jun 14, 2010
Posts: 41

Hi

While Adding Tiles to the Struts2 Appllication

If i add <listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
to the web.xml it is giving me an error saying

SEVERE: Error configuring application listener of class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/logging/LoggerFactory
at org.apache.struts2.tiles.StrutsTilesListener.<clinit>(StrutsTilesListener.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3916)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.logging.LoggerFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
... 22 more
15 Jun, 2010 10:35:47 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
15 Jun, 2010 10:35:47 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
15 Jun, 2010 10:35:47 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Struts2] startup failed due to previous errors

I have added the rest of files in their location ,, Y is this error occuring ?



Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What version of Struts 2? What version of Tiles 2? What other libraries are you deploying?
Jyothi Sree
Ranch Hand

Joined: Jun 14, 2010
Posts: 41
Hi This is the version i m haveing

Struts 2.1.8.1 with tiles2.0.6 and the jar files as follows


activation.jar
commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-dijestor-1.8.jar
commons-fileupload-1.2.1.jar
commons-logging-1.1.jar
freemarker-2.3.8.jar
mail.jar
ognl-2.6.11.jar
spring-support.jar
struts2-core-2.0.6.jar
struts2-tiles-plugin-2.1.8.1.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
xwork-2.0.1.jar
xwork-core-2.1.6.jar







These are the jars i have included .....................

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617


struts2-core-2.0.6.jar
struts2-tiles-plugin-2.1.8.1.jar
xwork-2.0.1.jar
xwork-core-2.1.6.jar

These files don't make sense; please deploy only a single version of struts and XWork and try again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding tiles to the Struts 2 Application
 
Similar Threads
Tomcat error while running JForum integrated project
Tomcat startup problems
There is no Action mapped for namespace / and action name . - [unknown location]
java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher