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.  TConnection and Servlets -> TServerNotAvailableException

    Posted Wed June 12, 2002 11:57 AM

    Hi,

    i try to connect my Tamino 3.1.1.1. I wrote a DBHandler, which contanis following lines:

    TConnectionFactory connectionFactory = TConnectionFactory.getInstance();
    try {
    // Obtain the connection to the database
    connection = connectionFactory.newConnection( url );
    } catch (TServerNotAvailableException e) { throw new Exception (e)}

    If I create an instance of my DBHandler from another Class, which is started from the DOS-Prompt with a main-method, there is no Problem. But if I create an instance of my DBHandler from a Servlet I get this Exceptionmessage:
    com.softwareag.tamino.db.API.connection.TServerNotAvailableException
    Server Not Available!
    NestedException:Invocation constructor failed.
    NestedException without message!

    Has anybody any idea about this?

    Thanks for your help, MArtin


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


  • 2.  RE: TConnection and Servlets -> TServerNotAvailableException

    Posted Wed June 12, 2002 01:10 PM

    hi MArtin,

    do you have

    Tamino 3.1.1.4\SDK\TaminoAPI4J\lib\log4j-core.jar in the classpath of the servlet?

    regards,

    andreas f.


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


  • 3.  RE: TConnection and Servlets -> TServerNotAvailableException

    Posted Wed June 12, 2002 02:42 PM



    It is in the global classpath… should be the same, isn’t it?

    MArtin


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


  • 4.  RE: TConnection and Servlets -> TServerNotAvailableException

    Posted Wed June 12, 2002 03:11 PM

    Hi MArtin,

    one way to be sure would be to print the CLASSPATH from your Servlet class. You can accomplish this fairly easily:

       String cp = System.getProperty(“java.class.path”);
       System.out.println("CLASSPATH: " + cp);
    (If you are using more advanced logging - which appears not to be the case - you should print the value of “cp” appropriately. If you use System.out it prints to the Tomcat console, if I remember correctly.)

    Perhaps this is a silly question, but: are you 100% sure that the same value is being used for “url” in the working/not working tests?

    Cheers,
    Trevor.


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


  • 5.  RE: TConnection and Servlets -> TServerNotAvailableException

    Posted Wed June 12, 2002 06:11 PM

    Guys, you are great.

    Andreas you were right. I had not several files in the tomcat classpath. With your help Trever I got it…

    Tsts… I didn’t know, that the Tomcat uses another classpath than the rest of the system.

    Thanks guys,

    MArtin


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