tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas LE BAS <m...@nlebas.net>
Subject Re: tiles3.0.1 + struts2 => java.lang.NoClassDefFoundError: org/apache/tiles/web/startup/TilesListener"
Date Sun, 20 Oct 2013 17:03:02 GMT
xOn 13-10-18 03:53 PM, Emi Lu wrote:
> On 10/18/2013 03:42 PM, Paul Benedict wrote:
>> I think you're using the wrong result class. See step #3 of the document.
> 
> It's the same result class, and here is the struts-login.xml. Thanks.

I think Paul is right, although his answer is a bit ambiguous. Let me
explain a bit further.

>>> But got the following exception:
>>> ====================================
>>> java.lang.NoSuchMethodError: org.apache.tiles.access.
>>> TilesAccess.getContainer(Ljava/lang/Object;)Lorg/
>>> apache/tiles/TilesContainer;
>>>          at org.apache.struts2.views.tiles.TilesResult.doExecute(
>>> TilesResult.java:100)

TilesAccess.getContainer(Object xxx) only exists in tiles2 (and was
deprecated there). In Tiles 3 it takes different arguments.

So although the class name for TilesResult is correct, I believe you're
using the old version from struts2-tiles-plugin:
-
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java?view=markup

instead of the new one from struts2-tiles3-plugin
-
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java?view=markup)

Do you perchance still have the old struts2-tiles-plugin in your classpath?

Hope this helps,

Nick.

Mime
View raw message