You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yayo <ed...@gmail.com> on 2008/05/01 17:00:35 UTC
Struts2 and tiles NullpointerExxception
I simply can't find anything wrong in my config, I've got a simple app with
a login action returning "success"
this is my Struts.xml file:
<struts>
<package name="strainer" namespace="/" extends="tiles-default">
<action name="login"
class="com.eduyayo.strainer.action.Login">
<result name="success" type="tiles">working.page</result>
</action>
and this is my tiles.xml:
<definition name="working.page" extends="mainLayout">
<put name="title" value="Working on it" type="string"/>
<put name="body" value="/WEB-INF/jsp/working.jsp" />
</definition>
<definition name="mainLayout"
path="/WEB-INF/jsp/tiles/mainLayout.jsp">
<put name="title" value=""/>
<put name="description" value=""/>
<put name="menu" value="/WEB-INF/jsp/tiles/menu.jsp" />
<put name="body" value="/WEB-INF/jsp/tiles/body.jsp" />
<put name="footer" value="/WEB-INF/jsp/tiles/footer.jsp" />
</definition>
And my web.xml includes the tiles listener, I've got the dependencies from
the blank app plus tiles api and plugin. Also I've added a bunch of commons
jars I use to use.
When I execute the login.action I get this:
16:51:16,171 DEBUG BasicTilesContainer:414 - Dispatching to definition path
'null '
16:51:16,171 ERROR BasicTilesContainer:423 - Error rendering tile
java.lang.NullPointerException
at
org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:82)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:104)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
I've tried tried returning to a jsp and the framework forwards to it
perfectly.
Here are my dependencies added to web-inf lib
443.432 antlr-2.7.6.jar
26.360 asm.jar
282.338 cglib-2.1.3.jar
188.671 commons-beanutils-1.7.0.jar
90.001 commons-chain-1.1.jar
559.366 commons-collections-3.1.jar
94.100 commons-configuration-1.0.jar
107.631 commons-dbcp-1.2.1.jar
143.602 commons-digester-1.8.jar
31.909 commons-fileupload-1.1.1.jar
61.562 commons-io-1.1.jar
245.274 commons-lang-2.3.jar
38.015 commons-logging-1.0.4.jar
42.492 commons-pool-1.2.jar
138.956 commons-validator-1.3.1.jar
211.482 displaytag-1.1.1.jar
313.898 dom4j-1.6.1.jar
802.494 freemarker-2.3.8.jar
2.255.753 hibernate3.jar
6.727 jdbc2_0-stdext.jar
8.674 jta-spec1_0_1.jar
358.085 log4j-1.2.12.jar
246.317 mysql-connector-java-3.0.17-ga-bin.jar
168.081 ognl-2.6.11.jar
65.261 oro-2.0.8.jar
421.601 quartz-1.6.0.jar
2.884.922 spring.jar
2.322.965 struts2-core-2.0.11.1.jar
14.856 struts2-jasperreports-plugin-2.0.9.jar
16.069 struts2-tiles-plugin-2.0.11.1.jar
16.238 tiles-api-2.0.4.jar
125.843 tiles-core-2.0.4.jar
47.329 tiles-jsp-2.0.4.jar
392.124 velocity-1.5.jar
698.567 velocity-dep-1.5.jar
456.100 xwork-2.0.4.jar
any idea??? thanks
--
"Sit tibi terra levis"
http://yayocaturas.blogspot.com/
Re: Struts2 and tiles NullpointerExxception
Posted by Yayo <ed...@gmail.com>.
oks, thanks, I've moved completelly to tiles 2 and now the whole app works,
thank you d^g^b
On Fri, May 2, 2008 at 9:14 AM, Antonio Petrelli <an...@gmail.com>
wrote:
> 2008/5/1 Yayo <ed...@gmail.com>:
> > I simply can't find anything wrong in my config
>
> In fact me neither :-)
> Anyway, can you try updating to Tiles 2.0.5?
> http://tiles.apache.org/download.html
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Sit tibi terra levis"
http://yayocaturas.blogspot.com/
Re: Struts2 and tiles NullpointerExxception
Posted by Antonio Petrelli <an...@gmail.com>.
2008/5/1 Yayo <ed...@gmail.com>:
> I simply can't find anything wrong in my config
In fact me neither :-)
Anyway, can you try updating to Tiles 2.0.5?
http://tiles.apache.org/download.html
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org