I have a complex query with multiple dynamic joins:
for
$thema in input()/thema
let
$student := input()/student,
$mitarbeiter := input()/mitarbeiter,
$bearbeiter := $student[ matrikelnummer = $thema/bearbeiter_ref ],
$gebiet := input()/kategorie[ tf:getInoId(.) = $thema/gebiet_ref ],
$anleger := $mitarbeiter[ tf:getInoId(.) = $thema/anleger_ref ],
$hauptbetreuer := $mitarbeiter[ tf:getInoId(.) = $thema/betreuerliste/betreuer_ref[1] ]
return
element thema
{
attribute id
{
tf:getInoId($thema)
},
$thema/*,
$thema/@*,
element bearbeiter
{
$bearbeiter/*,
$bearbeiter/@*,
$thema/bearbeiter_ref/@*
},
element gebiet
{
$gebiet/*,
$gebiet/@*
},
element anleger
{
$anleger/*,
$anleger/@*,
$thema/anleger_ref/@*
},
element hauptbetreuer
{
$hauptbetreuer/*,
$hauptbetreuer/@*,
$thema/betreuerliste/betreuer_ref[1]/@*
}
}</pre><BR><BR>The TII shows correctly all 22 entries, the xapp:browse lists all entries limited by pagesize. Every action tag results in a<BR><pre class="ip-ubbcode-code-pre">
XException: id = 999
java.lang.NullPointerException
at com.softwareag.xtools.xapplication.businessdocument.XQueryBusinessDocumentPage.findDocument(XQueryBusinessDocumentPage.java:223)
The browsenavigation creates the right links, but a klick just reloads the page, without showing the next page.
If i try a lesser weight xquery the actiontag is followed by the normal needed output at the referenced page.
Any suggestions?
Is there a much simplier way to build the resultset with the needed information?
Why the functionality of the browse-tag is not the usual one?
regards,
Bastian Gorke.
–
X-Application Version: 4.1.1
Tamino Version : 4.1.4.1
Platform : Linux
WebContainer : Tomcat 4.1.18, Struts
JDK Version : 1.4.1_02-b06
Hello,
I checked the source code but I can only guess why the NullPointerException occurs.
Could you post the complete stacktrace, the browse.jsp and the search.jsp?
Zip the text file with the stacktrace and JSP files and attach the zip file to the post because you can attach only one file per post. I will look if I can reproduce your problem on my machine.
Many thanks.
Bye,
Christian.
Hi Christian,
thx for reply. here’s the full stack, but i can only guess the reason for the exception too. IMHO the document couldn’t saved within the xapp-session.
XException: id = 999
java.lang.NullPointerException
at com.softwareag.xtools.xapplication.businessdocument.XQueryBusinessDocumentPage.findDocument(XQueryBusinessDocumentPage.java:223)
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.locateDocument(ModuleTag.java:482)
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.processDocumentLocation(ModuleTag.java:268)
at com.softwareag.xtools.xapplication.jsp.taglib.ModuleTag.doStartTagCore(ModuleTag.java:93)
at com.softwareag.xtools.xapplication.jsp.JspTag.doStartTag(JspTag.java:132)
at org.apache.jsp.Detailansicht_jsp._jspService(Detailansicht_jsp.java:131)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)
attached you find the browse.jsp and the ‘Detailansicht.jsp’ from my example.
For the Detailansicht we got a workaround by requery for the specified ino:id, but it would be easier and surely more ‘tamino-like’ with the x-app features.
regards,
Bastian Gorke.
X-Application Version: 4.1.1
Tamino Version : 4.1.4.1
Platform : Linux
WebContainer : Tomcat 4.1.18, Struts
JDK Version : 1.4.1_02-b06
pages.zip (2.13 KB)
OK, problem spotted. Forgot to query the existence of the document, before requerying the server. i’ve included an surrounding xapp:if to the directcommand.
thx for support.
Regards,
Bastian Gorke
–
X-Application Version: 4.1.1
Tamino Version : 4.1.4.1
Platform : Linux
WebContainer : Tomcat 4.1.18, Struts
JDK Version : 1.4.1_02-b06