Java API nextElement error

Hey guys,

What do you think caused this error:

Error: 500
Location: /examples/yacht.jsp
Internal Servlet Error:

javax.servlet.ServletException: com.docuverse.dom.BasicText
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002fyacht_0002ejspyacht_jsp_22._jspService(_0002fyacht_0002ejspyacht_jsp_22.java:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.ClassCastException: com.docuverse.dom.BasicText
at com.softwareag.tamino.api.dom.TaminoResult.nextElement(TaminoResult.java:678)
at _0002fyacht_0002ejspyacht_jsp_22._jspService(_0002fyacht_0002ejspyacht_jsp_22.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484


Im justing trying to read the yacht xml document inside tamino. Im running tamino 2.3.1.7 on linux and using apache and tomcat to run my jsp files. Thanks. :confused:
yacht.jsp (824 Bytes)

I think this is the same as SAGSIS Request Number 361914. The problem is caused by an API query with no filter running against Tamino 2.3.1 with whitespace in the xml documents.
You can bypass it by inserting a filter that has no effect, such as:

code:
TaminoResult ta = tamino.query(“yacht[@ino:id>=‘0’]”);


I tested this with your jsp code and it works fine.

I also tested removing the whitespace (in my case, carriage returns) from the source xml and that works with your original query too.

[This message was edited by Bill Leeney on 13 Nov 2001 at 14:36.]

Many thanks its working now!! :wink: