Problem with using the new API in a servlet

Hi,

I’m trying to use the new API in a servlet environment. I’ve managed to get a clean compile.

Then I try to run it and I get this error
java.lang.NoSuchMethodError
at com.softwareag.tamino.db.API.response.dom.TDOMInputStreamInterpreter.setMessageContentItem(TDOMInputStreamInterpreter.java:131)
at com.softwareag.tamino.db.API.response.dom.TDOMInputStreamInterpreter.setResponseInfoContent(TDOMInputStreamInterpreter.java:115)
at com.softwareag.tamino.db.API.response.dom.TDOMInputStreamInterpreter.doInterpret(TDOMInputStreamInterpreter.java:87)
at com.softwareag.tamino.db.API.response.TInputStreamInterpreter.interpret(TInputStreamInterpreter.java:52)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.doBuild(TResponseBuilderImpl.java:81)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.buildForXML(TResponseBuilderImpl.java:60)
at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.query(TXMLObjectAccessorImpl.java:228)
at at2.PatientQuery2.readTamino(PatientQuery2.java:274)
at at2.PatientQuery2.performTask(PatientQuery2.java:174)
at at2.PatientQuery2.doGet(PatientQuery2.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:500)
at org.apache.tomcat.core.Handler.service(Handler.java:223)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:911)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:824)
at org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(Ajp12Interceptor.java:195)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:438)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:505)
at java.lang.Thread.run(Thread.java:484)

I’ve imported the jar files into my IDE (VisualAge) and checked it, and it does have the method that the error says it can not find.

I run Apache with Tomcat 3.3

What am I doing wrong? Any help would be appreciated.

Amir.

Hi Amir,

are you sure that all jar files that come with the API are available in your servlet environment at run time?

Christian.

is a list of the jar file I installed:

jdbc2_0-stdext.jar
jdom.jar
jta-spec1_0_1.jar
log4j-core.jar
TaminoAPI4J.jar
WL61SAXBuilderBug.jar
xerces.jar

Does this look right?

The list is Ok.

Did you make sure that those jar files are also available at run time in the servlet environment?

Not only at development time in Visual Age!

Christian.

Please check out the thread “New API and Servlets Problem” in this forum. It might solve your problem…

Regards, Christian.

quote:
Originally posted by Christian Gengenbach:
Please check out the thread "New API and Servlets Problem" in this forum. It might solve your problem...

Regards, Christian.


Christian,

I checked that post but I still could not find the problem.

I scanned all the jar files in tomcat\lib and tomcat\common and looked for TDOMInputStreamInterpreter. There is only one instance of this class and that is in TaminoAPI4J.jar.

So this tells me that the correct version of this class is being executed by Tomcat. And yes I do have all the jars in my classpath, otherwise I would've gotten ClassDefNotFound.

Anyhow, I've read somewhere that cursoring with the new API only works with Transactions. I'm not sure what this means exactly, maybe something to do with the LocalTransaction class? At the moment I'm not using any transaction classes, all I'm using is the TConnection class. Could this be the problem? Any thoughts on this?

Christian,

Any news on this?

Sorry, no. Also people are on vacation.

Anybody out there, who could help?

Do you by any chance have access to the source code for TDOMInputStreamInterpreter class?

If so, could you check to see if the setMessageContentItemmethod actually exists or not?

I would’ve done it myself but I don’t have the source =/

Amir.

It does indeed exist in my copy of the source. As far as I can tell this hasn’t changed since the end of July.