0

I want to use tiles and jasper plugins with struts2 in my web application but I am getting error while deploying the application. After doing Google I found that there is plugins version miss match in my application.

When I use struts2 2.2.3 and jasper plugin , it not worked. But when I have used struts2 2.1.8 and jasper its works fine. then I decided to use integrate tiles with struts 2.1.8 and got error at deploying time

SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.apache.struts2.tiles.StrutsTilesListener
  • What do you mean, which versions of the plugins? The same version as Struts 2. – Dave Newton Jun 16 '12 at 12:20
  • sir, to work with tiles and jasper some additional jar files(plugins) are needed. I am asking the version of those plugins. And these versions of plugins are vary with the variation in struts2 version. so i need to know the versions of tiles and jasper that are compatible with struts2 2.2.3 – Abhishek Aggarwal Jun 16 '12 at 13:28
  • As Dave has pointed out there isn't a question at all when using the plugins with maven, unless you want to use a version of tiles later than the one supported by the plugin (if that is the case I can provide advice how to move forward after you have basic functionality). – Quaternion Jun 17 '12 at 03:28

2 Answers2

2

Nutshell: whatever versions are used by the Struts 2.2.3 Tiles and Jasper plugins.

That it's being asked means you're not using Maven, instead managing transitive dependencies by hand--this is almost always a Really Bad Idea. Can't urge you strongly enough to not do this.

Long answer: When you have questions like this, use the Maven config files and/or Maven itself to find the answers, because that's how Struts 2 is being built.

You can use sites like http://mvnrepository.com when the info is explicit in the pom.

Struts 2 JasperReports Plugin Dependencies: JasperReports 3.1.2

Struts 2 Tiles Plugin Dependencies: Tiles 2.0.6, but not as easy to figure out since the Tiles version isn't explicit in the POM. Running mvn dependency:tree shows that it's 2.0.6:

[INFO] org.apache.struts:struts2-tiles-plugin:jar:2.2.3
[INFO] +- org.apache.tiles:tiles-core:jar:2.0.6:compile
[INFO] |  +- org.apache.tiles:tiles-api:jar:2.0.6:compile
[INFO] |  +- commons-digester:commons-digester:jar:2.0:compile (version managed from 1.8)
[INFO] |  |  \- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] |  \- commons-logging:commons-logging-api:jar:1.1:compile
[INFO] +- org.apache.tiles:tiles-jsp:jar:2.0.6:runtime
... etc ...
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • sir i want to construct a web application using struts2 , tiles, jasper . And i understand that i have to use maven . But i do not get any proper example of this . SO sir if u have any link for the same then please share. Thank you. – Abhishek Aggarwal Jun 18 '12 at 07:57
  • @abhishekaggarwal Every example application that comes with the S2 distro uses Maven--those are the easiest starting points. I believe the showcase app has both Tiles and JR examples as well. – Dave Newton Jun 18 '12 at 09:40
0

the above said problem occur due to incompatibility of plugin with the struts version. select your plugin which matches with struts version. upgrade your jasper plugin.

for you download link

http://www.java2s.com/Code/Jar/s/Downloadstruts2jasperreportsplugin223jar.htm

venus
  • 1,188
  • 9
  • 18