[S2] NPE when using struts form tags in sitemesh decorator

2008-07-14 Thread Piero Sartini
The S2 version is 2.1.3-SNAPSHOT. The exact same project was working some time 
ago with 2.1.1-SNAPSHOT. So maybe this is something that got broken in newer 
builds.

The problem seems to be that Freemarker can't get its configuration at this 
point. But ActionContextCleanUp is the first filter in chain, and tags like 
@s.url do work, only the form and input fields do not work.

If I try the exact same form outside the decorator in a normal, decorated 
page, everything works like expected.

Any ideas?

java.lang.NullPointerException
at 
org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(FreemarkerManager.java:159)
at 
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:90)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558)
at org.apache.struts2.components.Submit.end(Submit.java:109)
at 
org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackWriter.java:84)
at freemarker.core.Environment.visit(Environment.java:299)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment.include(Environment.java:1477)
at freemarker.core.Include.accept(Include.java:169)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment.process(Environment.java:188)
at freemarker.template.Template.process(Template.java:237)
at 
org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160)
at 
org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116)
at 
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
...
...
...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] NPE when using struts form tags in sitemesh decorator

2008-07-14 Thread Piero Sartini
Ok, the problem was that since 2.1.3 the filters changed:

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
instead of ActionContextCleanup and
org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
instead of the FilterDispatcher.

Now everything works like expected. I will update the wiki of the sitemesh 
plugin ..

Am Montag, 14. Juli 2008 15:23:16 schrieb Piero Sartini:
 The S2 version is 2.1.3-SNAPSHOT. The exact same project was working some
 time ago with 2.1.1-SNAPSHOT. So maybe this is something that got broken in
 newer builds.

 The problem seems to be that Freemarker can't get its configuration at this
 point. But ActionContextCleanUp is the first filter in chain, and tags like
 @s.url do work, only the form and input fields do not work.

 If I try the exact same form outside the decorator in a normal, decorated
 page, everything works like expected.

 Any ideas?

 java.lang.NullPointerException
 at
 org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(Free
markerManager.java:159) at
 org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTempl
ate(FreemarkerTemplateEngine.java:90) at
 org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558) at
 org.apache.struts2.components.Submit.end(Submit.java:109) at
 org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackW
riter.java:84) at freemarker.core.Environment.visit(Environment.java:299) at
 freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at
 freemarker.core.Environment.visit(Environment.java:208) at
 freemarker.core.MixedContent.accept(MixedContent.java:92) at
 freemarker.core.Environment.visit(Environment.java:208) at
 freemarker.core.Environment.include(Environment.java:1477) at
 freemarker.core.Include.accept(Include.java:169)
   at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.Environment.process(Environment.java:188)
 at freemarker.template.Template.process(Template.java:237)
 at
 org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerP
ageFilter.java:160) at
 org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageF
ilter.java:116) at
 com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java
:62) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java:246) ...
 ...
 ...

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] NPE when using struts form tags in sitemesh decorator

2008-07-14 Thread Musachy Barroso
Don is still working on those changes, you could open a ticket to make
sure everything gets documented.

musachy

On Mon, Jul 14, 2008 at 1:22 PM, Piero Sartini [EMAIL PROTECTED] wrote:
 Ok, the problem was that since 2.1.3 the filters changed:

 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
 instead of ActionContextCleanup and
 org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
 instead of the FilterDispatcher.

 Now everything works like expected. I will update the wiki of the sitemesh
 plugin ..

 Am Montag, 14. Juli 2008 15:23:16 schrieb Piero Sartini:
 The S2 version is 2.1.3-SNAPSHOT. The exact same project was working some
 time ago with 2.1.1-SNAPSHOT. So maybe this is something that got broken in
 newer builds.

 The problem seems to be that Freemarker can't get its configuration at this
 point. But ActionContextCleanUp is the first filter in chain, and tags like
 @s.url do work, only the form and input fields do not work.

 If I try the exact same form outside the decorator in a normal, decorated
 page, everything works like expected.

 Any ideas?

 java.lang.NullPointerException
 at
 org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(Free
markerManager.java:159) at
 org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTempl
ate(FreemarkerTemplateEngine.java:90) at
 org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558) at
 org.apache.struts2.components.Submit.end(Submit.java:109) at
 org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackW
riter.java:84) at freemarker.core.Environment.visit(Environment.java:299) at
 freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at
 freemarker.core.Environment.visit(Environment.java:208) at
 freemarker.core.MixedContent.accept(MixedContent.java:92) at
 freemarker.core.Environment.visit(Environment.java:208) at
 freemarker.core.Environment.include(Environment.java:1477) at
 freemarker.core.Include.accept(Include.java:169)
   at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.Environment.process(Environment.java:188)
 at freemarker.template.Template.process(Template.java:237)
 at
 org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerP
ageFilter.java:160) at
 org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageF
ilter.java:116) at
 com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java
:62) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java:246) ...
 ...
 ...

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] NPE when using struts form tags in sitemesh decorator

2008-07-14 Thread Piero Sartini
I added a warning box with title Struts 2.1.3 to the wiki page of  
struts2-sitemesh-plugin. Hope this is ok... I looked there before searching 
the code, maybe it helps others.

Is there a solution for the version problem in the wiki now? I remember 
there was no way to handle this some time ago. I could help out updating the 
docs if you say me in what way this should be done. (Dont want to make 
changes you have to revert afterwards ;-)

Piero

Am Montag, 14. Juli 2008 20:09:30 schrieb Musachy Barroso:
 Don is still working on those changes, you could open a ticket to make
 sure everything gets documented.

 musachy

 On Mon, Jul 14, 2008 at 1:22 PM, Piero Sartini [EMAIL PROTECTED] 
wrote:
  Ok, the problem was that since 2.1.3 the filters changed:
 
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
  instead of ActionContextCleanup and
  org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
  instead of the FilterDispatcher.
 
  Now everything works like expected. I will update the wiki of the
  sitemesh plugin ..
 
  Am Montag, 14. Juli 2008 15:23:16 schrieb Piero Sartini:
  The S2 version is 2.1.3-SNAPSHOT. The exact same project was working
  some time ago with 2.1.1-SNAPSHOT. So maybe this is something that got
  broken in newer builds.
 
  The problem seems to be that Freemarker can't get its configuration at
  this point. But ActionContextCleanUp is the first filter in chain, and
  tags like @s.url do work, only the form and input fields do not work.
 
  If I try the exact same form outside the decorator in a normal,
  decorated page, everything works like expected.
 
  Any ideas?
 
  java.lang.NullPointerException
  at
  org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(F
 ree markerManager.java:159) at
  org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTe
 mpl ate(FreemarkerTemplateEngine.java:90) at
  org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558) at
  org.apache.struts2.components.Submit.end(Submit.java:109) at
  org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(Callba
 ckW riter.java:84) at
  freemarker.core.Environment.visit(Environment.java:299) at
  freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at
  freemarker.core.Environment.visit(Environment.java:208) at
  freemarker.core.MixedContent.accept(MixedContent.java:92) at
  freemarker.core.Environment.visit(Environment.java:208) at
  freemarker.core.Environment.include(Environment.java:1477) at
  freemarker.core.Include.accept(Include.java:169)
at freemarker.core.Environment.visit(Environment.java:208)
  at freemarker.core.MixedContent.accept(MixedContent.java:92)
  at freemarker.core.Environment.visit(Environment.java:208)
  at freemarker.core.Environment.process(Environment.java:188)
  at freemarker.template.Template.process(Template.java:237)
  at
  org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMark
 erP ageFilter.java:160) at
  org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePa
 geF ilter.java:116) at
  com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j
 ava
 
 :62) at
 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tio nFilterChain.java:246) ...
  ...
  ...
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] NPE when using struts form tags in sitemesh decorator

2008-07-14 Thread Musachy Barroso
 I added a warning box with title Struts 2.1.3 to the wiki page of
 struts2-sitemesh-plugin. Hope this is ok... I looked there before searching
 the code, maybe it helps others.


yes that is perfect, thanks.


 Is there a solution for the version problem in the wiki now? I remember
 there was no way to handle this some time ago. I could help out updating the
 docs if you say me in what way this should be done. (Dont want to make
 changes you have to revert afterwards ;-)

No, there isn't any solution for the version problem ATM.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]