Passthru Servlet w/ Tomcat

I’m trying to get the passthru servlet working w/ Tomcat, and am not having much luck. I’ve tried following the documentation, but the only docs I’ve found explain how to do it using Apache Jserv. I’ve looked at the forum, and found some useful stuff, but I’m having difficulty putting it all together.

I’m running on a Unix system: Tamino 3.1.1.1, Tomcat 4.0.1. (I know I need help w/ the files under tomcat that I need to modify - server.xml and web.xml, but I don’t know what else it entails.) Tamino is running on port 8070, and Tomcat is running on port 8090.

We wanted to demo this next week (July 9 or 10), but I’m really stuck.

Following is the most detailed list of what’s working and what’s not that I can come up with:

Any help would be greatly appreciated - thanks.


these work:
http://jefferson.village.virginia.edu:8070/tamino/cindy/whitman?_xql=//div1

http://jefferson.village.virginia.edu:8070/tamino/cindy/stylesheets?_xql=xsl:stylesheet


but this doesn’t work:
http://jefferson.village.virginia.edu:8070/tamino/cindy/whitman?_xql/stylesheets/test.xsl=//div1

gives this error:
The system cannot locate the object specified. Error processing resource ‘http://jefferson.village.virginia.edu:8070/tamino/cindy/stylesheets/test.xsl’.


this works:
http://jefferson.village.virginia.edu:8090/tamino/servlet/com.softwareag.tamino.API.servlet.TaminoTest


this doesn’t work:
http://jefferson.village.virginia.edu:8070/tamino/servlet/com.softwareag.tamino.API.servlet.TaminoFilter/tamino/cindy/whitman?_xql=//div1

gives the error:
Tamino database unknown: servlet

this doesn’t work:
http://jefferson.village.virginia.edu:8090/tamino/servlet/com.softwareag.tamino.API.servlet.TaminoFilter/tamino/cindy/whitman?_xql=//div1

gives the error:
javax.servlet.ServletException: Cannot allocate servlet instance for path /tamino/servlet/com.softwareag.tamino.API.servlet.TaminoFilter/tamino/cindy/whitman
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:415)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
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(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.NoClassDefFoundError: com/jclark/xsl/sax/Destination
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:820)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
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(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)

The passthru servlet works by concatenating parts of the URL you supply to build a Tamino data query, and to build the location of a stylesheet. The result of the query is processed by the stylesheet and the result is presented to the client.

A typical passthru URL looks like this:

http://machinename/servlet/styler/tamino/mydb/mycollection?_xql=
mydoctype&_xslsrc=myxsldoctype/mystylesheet.xsl

The first part of the URL invokes the servlet using alias “styler” to represent com.softwareag.tamino.API.servlet.TaminoFilter.

The servlet then reads the rest of the URL as data :

tamino/mydb/mycollection?_xql=
mydoctype&_xslsrc=myxsldoctype/mystylesheet.xsl

It concatenates the first part with the machine name part of the original URL to give a complete Tamino query URL:

http://machinename/tamino/mydb/mycollection?_xql=mydoctype

and a complete stylesheet location:

http://machinename/tamino/mydb/mycollection/myxsldoctype/mystylesheet.xsl

In your case, this concatenation can’t work because the servlet runs on port 8090 but Tamino listens only (via Apache) on port 8070. So your Tamino request never hits Tamino, it hits Tomcat, who misinterprets it as a servlet name.

The standard (jserv) implementation maps servlet requests directly from Apache to Jserv so that no separate ports are needed. I think you need to do the same by installing MOD_JK so that servlet requests are passed directly by Apache to Tomcat and all URLS are directed at Apache’s port.

For more on mod_jk see: Mod_jk help page

Alternatively you could opt for the jserv solution in the short-term.

Apache Jserv would work from a different port?

Yes - but the default jserv installation installs a link to apache so the port difference is completely transparent. Tomcat is designed to be used stand-alone - jserv isn’t.

There is some useful info on integrating Tomcat and Apache, for various versions and platforms, at: Galatea’s FlashGuides site

HTH