portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Joseph" <gjos...@kiala.com>
Subject RE: setTemplate using JSPAction (or even GenericMVCPortlet/PortletAction now)
Date Mon, 08 Sep 2003 17:02:03 GMT
I am now using the GenericMVCPortlet, with an additional parameter in my
local-portlets.xreg (viewtype=Jsp), but still no success: when i examine what
is going on in the setTemplate method, i see usage of the getTemplateContext
method from the TemplateInfo object of my rundata. If I look in templateInfo,
i can see 3 "tempKeys", namely "VelocityActionContext", "VELOCITY_CONTEXT"
and "00layout_template00", the 1st one being an instance of
GenericActionContext, but with no available keys(this is where the
nullpointerexception is thrown i think), the 2nd being an instance of
VelocityContext, with a number of keys, but none of them being "template",
and the last one being a string("/default.jsp")

I really don't know what to do. I expect I'm not the only one using multiple
views on the same portlet right!?

Thanks for any help.

greg

-----Original Message-----
From: Gregory Joseph 
Sent: vendredi 5 septembre 2003 18:28
To: Jetspeed Users List
Subject: RE: setTemplate using JSPAction


Maybe this should be forwarded to the dev-ml. 
Anyway, I included the complete stacktrace below if that can help.

-----Original Message-----
From: Gregory Joseph 
Sent: vendredi 5 septembre 2003 17:52
To: Jetspeed Users List
Subject: setTemplate using JSPAction


Hi list,

In my action class extending jspAction, i try to use the setTemplate method,
but it doesn't work. I throws a NullPointerException somewhere when trying to
retrieve a "VelocityPortletContext" (how surprising when working with a
JSPPortlet) Besides, I had to catch this exception myself, otherwise it
wasn't appearing anywhere in the logs, not even a single error message...

I found this had been fixed a while ago:
http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg07770.html
Bug when looking on the cvs view, i see there's been some refactoring
afterwards, so i think the issue might have re-appeared.

Can someone confirm and/or propose a solution?

my code simply looks like:

//.....blahblah do stuff
setTemplate(rundata, "mypage.jsp");

But then the portlet still displays the original template (the one set in the
xreg file).
(I also tried without the .jsp extension, but result is exactly the same)


---------------------------------------------------------------------
java.lang.NullPointerException
        at
org.apache.jetspeed.modules.actions.portlets.PortletAction.getPortlet(Portlet
Action.java:208)
        at
org.apache.jetspeed.modules.actions.portlets.PortletAction.setTemplate(Portle
tAction.java:169)
        at
com.company.web.actions.SearchAction.doSearch(SearchAction.java:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.fireEvent(Por
tletActionEvent.java:215)
        at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.executeEvents
(PortletActionEvent.java:176)
        at
org.apache.jetspeed.modules.actions.portlets.GenericMVCAction.perform(Generic
MVCAction.java:148)
        at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
        at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
        at org.apache.turbine.modules.Page.build(Page.java:90)
        at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
        at org.apache.turbine.Turbine.doGet(Turbine.java:563)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
        at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnec
tion(Http11Protocol.java:392)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java
:619)
        at java.lang.Thread.run(Thread.java:536)

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Mime
View raw message