IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Running servlet in Tomcat with Tamino

    Posted Tue August 13, 2002 07:43 AM

    I compiled and run examples of Tamino API (e.g. XMLGreeting), all of them are ok.
    Now I modify XMLGreeting.java to servlet version XMLGreetingServlet.java, there are always errors occurred when I attempt to run it!

    I traced XMLGreetingServlet.java, found that error ocuurred when reaching this line
    “TXMLObject xmlObject = TXMLObject.newInstance( TDOMObjectModel.getInstance() );” in the source.

    I attach the source file, hope anyone can help solving! Thanks

    PS:
    1. Tomcat is running on Port:8080
    2. Apache + Tamino 3.1.1.4 is running on Port:80
    test.java (3.62 KB)


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: Running servlet in Tomcat with Tamino

    Posted Tue August 13, 2002 10:14 AM

    Hi,

    I compiled your servlet and tried to run it, but I got a http error because the servlet had no get() method (I tried to invoke it by direct URL in a browser: http://localhost:8080/testapp/servlet/test)

    So I added a simple get method (that just invokes the post method with the same arguments) and it works (modified code attached).

    I also added some writes to “out” so you can see in your browser response where the problem happens in future.

    If this doesn’t help, please give us more information on what error you get, and what jar files you have in your servlet’s classpath (tomcat_home/webapps/appname/web-inf/lib).
    test.java (3.93 KB)


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: Running servlet in Tomcat with Tamino

    Posted Tue August 13, 2002 08:25 PM

    Thanks for help! But unfortunately there are still errors.

    Because I call this servlet in html through “POST” method,
    I did not write doGet() function.

    Browser shows 500 error as attached file.

    My %CLASSPATH% looks like this:
    .;
    C:\Software AG\xts.jar;
    C:\Software AG\saglic.jar;
    C:\Software AG\sagxds.jar;
    D:\Tomcat\common\lib\servlet.jar;
    D:\Tamino\lib\jdom.jar;
    D:\Tamino\lib\log4j-core.jar;
    D:\Tamino\lib\TaminoAPI4J.jar;
    D:\Tamino\lib\xerces.jar


    no this directory “tomcat_home/webapps/appname/web-inf/lib”
    only “tomcat_home/webapps/appname/web-inf/classes”
    and only test.class in this directory
    error500.htm (6.48 KB)


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 4.  RE: Running servlet in Tomcat with Tamino

    Posted Wed August 14, 2002 10:06 AM

    The root cause of your 500 error is “NoClassDefFoundError: com/softwareag/tamino/db/API/objectModel/dom/TDOMObjectModel”

    As I understand it, your system classpath, %CLASSPATH%, is not relevant to Tomcat. He has his own classpath. This is set by setclasspath.bat if you’re running Tomcat normally, or in wrapper.properties if you’re using jk_nt_service to start Tomcat as a service.

    Each application also has a separate classpath which is built at run time from the contents of tomcat_home/webapps/appname/web-inf/lib (for jar files)
    and
    tomcat_home/webapps/appname/web-inf/classes for class hierarchies.

    The easiest answer: If you don’t have a tomcat_home/webapps/appname/web-inf/lib directory, just create one and put the TaminoAPI4J jar files into it.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management