1.5.2 - velocity error in PipelineSreen_<CustomPipeline>_add.vm

43 views
Skip to first unread message

Kate

unread,
Jul 29, 2011, 2:00:41 PM7/29/11
to xnat_discussion
Hi Mohana,

I've just installed a new instance of 1.5.2, and I'm running into some
issues when I try to add a custom pipeline with custom add and launch
screens. Namely, when I attempt to add the pipeline to a project, I
get a number of velocity errors due to the fact that $newpipeline is
not defined in the context. e.g., " RHS of #set statement is null.
Context will not be modified. screens/
PipelineScreen_StdBuildNunda_add.vm [line 114, column 1]". Line 114
reads: #set ($schemaType = $newpipeline.getSchemaElementName()). This
same pipeline screen used to work in 1.4.

If I add a pipeline without a custom screen, however, this issue
doesn't arise. So, in PipelineScreen_add_project_pipeline.vm,
$newpipeline is defined in the context.

I see that PipelineScreen_add_project_pipeline.java defines
$newpipeline, but I guess I'm unclear as to how this screen class is
called for a custom screen, so I'm not sure where to look for
hiccups.

Any thoughts?
(Log data follows)
Thanks!
Kate


Looking at the logs, I get an error in the turbine.log when I go to
the projects display page (XDATScreen_report_xnat_projectData.vm):
2011-07-29 11:37:21,345 [http-8080-5] ERROR
org.apache.turbine.services.velocity.TurbineVelocityService - Class
java.util.ArrayList.get threw Exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
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:597)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:
260)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:
207)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:
357)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:
135)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:
271)
at org.apache.velocity.Template.merge(Template.java:296)
at
org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:492)
at
org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:461)
at
org.apache.turbine.services.velocity.TurbineVelocityService.executeRequest(TurbineVelocityService.java:
415)
at
org.apache.turbine.services.velocity.TurbineVelocityService.handleRequest(TurbineVelocityService.java:
281)
at
org.apache.turbine.services.velocity.TurbineVelocity.handleRequest(TurbineVelocity.java:
71)
at
org.apache.turbine.modules.screens.VelocityScreen.buildTemplate(VelocityScreen.java:
119)
at
org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:
101)
at org.apache.turbine.modules.Screen.build(Screen.java:57)
at
org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:104)
at
org.apache.turbine.modules.layouts.VelocityOnlyLayout.doBuild(VelocityOnlyLayout.java:
92)
at org.apache.turbine.modules.Layout.build(Layout.java:53)
at
org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:98)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:
146)
at org.apache.turbine.modules.Page.build(Page.java:53)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:
98)
at org.apache.turbine.Turbine.doGet(Turbine.java:751)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
433)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
845)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


And I have some other velocity errors (staring right at login,
projects display page, administer pipelines, and then, when adding the
custom pipeline):
2011-07-29 11:36:43,194 [main] ERROR velocity - VM #xdatSearchForm:
error : too few arguments to macro. Wanted 2 got 0
2011-07-29 11:36:43,225 [main] ERROR velocity - VM #displayFileSystem:
error : too few arguments to macro. Wanted 1 got 0
2011-07-29 11:36:45,103 [http-8080-1] ERROR velocity - Left side
($data.getSession().getAttribute("user").getUsername()) of '=='
operation has null value. If a reference, it may not be in the
context. Operation not possible. navigations//NoMenuTop.vm [line 9,
column 76]
2011-07-29 11:37:21,402 [http-8080-5] ERROR velocity - RHS of #set
statement is null. Context will not be modified. /screens/
xnat_projectData/xnat_projectData_actions_box.vm [line 28, column 1]
2011-07-29 11:37:21,495 [http-8080-5] ERROR velocity - Left side
($om.getItem().getGenericSchemaElement().getPrimaryElements().indexOf("xnat:experimentData"))
of '!=' operation has null value. Operation not possible. navigations//
Breadcrumb.vm [line 177, column 102]
2011-07-29 11:39:33,148 [http-8080-5] ERROR velocity - Left side
($currentPage) of addition operation has null value. Operation not
possible. screens/XDATScreen_manage_pipeline.vm [line 8, column 36]
2011-07-29 11:39:33,149 [http-8080-5] ERROR velocity - RHS of #set
statement is null. Context will not be modified. screens/
XDATScreen_manage_pipeline.vm [line 8, column 1]
2011-07-29 11:41:33,726 [http-8080-1] ERROR velocity - Left side
($currentPage) of addition operation has null value. Operation not
possible. screens/XDATScreen_manage_pipeline.vm [line 8, column 36]
2011-07-29 11:41:33,726 [http-8080-1] ERROR velocity - RHS of #set
statement is null. Context will not be modified. screens/
XDATScreen_manage_pipeline.vm [line 8, column 1]
2011-07-29 11:41:42,786 [http-8080-1] ERROR velocity - RHS of #set
statement is null. Context will not be modified. /screens/
xnat_projectData/xnat_projectData_actions_box.vm [line 28, column 1]
2011-07-29 11:41:42,838 [http-8080-1] ERROR velocity - Left side
($om.getItem().getGenericSchemaElement().getPrimaryElements().indexOf("xnat:experimentData"))
of '!=' operation has null value. Operation not possible. navigations//
Breadcrumb.vm [line 177, column 102]
2011-07-29 11:42:11,691 [http-8080-1] ERROR velocity - RHS of #set
statement is null. Context will not be modified. screens/
PipelineScreen_FSL_SEG_add.vm [line 114, column 1]
2011-07-29 11:42:11,691 [http-8080-1] ERROR velocity - RHS of #set
statement is null. Context will not be modified. screens/
PipelineScreen_FSL_SEG_add.vm [line 123, column 1]
2011-07-29 11:42:11,691 [http-8080-1] ERROR velocity - Left side
($parameters.size()) of '>' operation has null value. Operation not
possible. screens/PipelineScreen_FSL_SEG_add.vm [line 126, column 26]

No errors in xdat.log.

Kate

unread,
Aug 11, 2011, 3:47:59 PM8/11/11
to xnat_discussion
For now, I decided to customize
PipelineScreen_add_project_pipeline.vm, which works well.
Reply all
Reply to author
Forward
0 new messages