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
Expand all | Collapse all

Classpath and ManagedConnectionPools.xml

  • 1.  Classpath and ManagedConnectionPools.xml

    Posted Fri February 08, 2002 10:14 PM

    I have tested the TConnectionPoolManager successfully with JUnit by making sure my classpath included ManagedConnectionPools.xml . However, when I place ManagedConnectionPools.xml in my webapp’s WEB-INF/lib directory on Tomcat 4.0.1, and attempt to run my web application, I get the following error:

    com.softwareag.tamino.db.API.common.TPreconditionViolation: ManagedConnectionPools.xml could not be located within the classpath! TConnectionPoolManager not usable!

    the structure under my webapps directory in tomcat is:

    wem/
    css/
    images/
    js/
    META-INF/
    pages/
    WEB-INF/
    web.xml
    classes/mypackage names and classes
    lib/
    required app jars and
    ManagedConnectionPools.xml

    The last I knew anything in the WEB-INF/lib directory is included in your classpath by Tomcat.
    Apache_Tomcat-4_0_1_-_Error_report.htm (4.19 KB)


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


  • 2.  RE: Classpath and ManagedConnectionPools.xml

    Posted Thu February 14, 2002 02:17 PM

    If you change Tomcat’s classpath (in catalina.bat) to include a convenient directory such as D:\Resources and you put ManagedConnectionPools.xml into that directory, it will work.

    [This message was edited by Bill Leeney on 14 Feb 2002 at 14:41.]


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


  • 3.  RE: Classpath and ManagedConnectionPools.xml

    Posted Fri February 22, 2002 08:38 AM

    Hi,

    this morning I read your message about the TConnectionPool. I want to use it as well with Tomcat 3.2.xxx (I think). Could you send me some code examples how you use it in your java application?

    Thanks,
    Harald

    quote:
    Originally posted by Scudman:
    I have tested the TConnectionPoolManager successfully with JUnit by making sure my classpath included ManagedConnectionPools.xml . However, when I place ManagedConnectionPools.xml in my webapp’s WEB-INF/lib directory on Tomcat 4.0.1, and attempt to run my web application, I get the following error:

    com.softwareag.tamino.db.API.common.TPreconditionViolation: ManagedConnectionPools.xml could not be located within the classpath! TConnectionPoolManager not usable!

    the structure under my webapps directory in tomcat is:

    wem/
    css/
    images/
    js/
    META-INF/
    pages/
    WEB-INF/
    web.xml
    classes/mypackage names and classes
    lib/
    required app jars and
    ManagedConnectionPools.xml

    The last I knew anything in the WEB-INF/lib directory is included in your classpath by Tomcat.



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


  • 4.  RE: Classpath and ManagedConnectionPools.xml

    Posted Fri February 22, 2002 08:43 AM


  • 5.  RE: Classpath and ManagedConnectionPools.xml

    Posted Mon March 18, 2002 06:10 PM

    I have tried to add the path to the windows environment CLASSPATH (the folder where ManagedConnectionPools.xml is located) and that works fine if I start tomcat (v. 3.2.3) from its bat-file. But when I start tomcat as a windows service (and changed wrapper.properties) that solution doesn?t work. Any suggestions?

    quote:
    Originally posted by Bill Leeney:
    If you change Tomcat’s classpath (in catalina.bat) to include a convenient directory such as D:\Resources and you put ManagedConnectionPools.xml into that directory, it will work.

    [This message was edited by Bill Leeney on 14 Feb 2002 at 14:41.]



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


  • 6.  RE: Classpath and ManagedConnectionPools.xml

    Posted Tue March 26, 2002 07:53 PM

    I try to run the example of Bill Leeney
    but I have the following error.
    I have the ManagedConnectionPools.xml
    on the classpath and the database is runnig correctly
    Any suggest?
    Thank and regards.

    Esteban
    --------------------------------------------------
    Exception in thread “main” Nested Exception (com.softwareag.tamino.db.API.connec
    tion.TServerNotAvailableException) stacktrace:

    Nested Exception (com.softwareag.tamino.db.API.invocation.TInvocationException)
    stacktrace:

    Nested Exception (java.lang.reflect.InvocationTargetException) stacktrace:

    […]

    [This message was edited by Esteban Jos


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


  • 7.  RE: Classpath and ManagedConnectionPools.xml

    Posted Wed March 27, 2002 09:07 AM

    What exactly have you coded in your element?


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


  • 8.  RE: Classpath and ManagedConnectionPools.xml

    Posted Wed March 27, 2002 11:13 AM

    It seems an example for Tomcat and jsp might be useful. To install this example:

    1) Create a new directory in \webapps called connpool and unzip Connpool.zip into it. Check: You should now have directory called \webapps\connpool containing Test.jsp and a further directory called Web-Inf. Web-Inf should contain web.xml and a directory, lib, complete with all needed jar files.

    2) Unzip Resources.zip into . Check: You should now have a directory called resources under and it should contain ManagedConnectionPools.xml. Modify this file to match your database URI.

    3) Modify Test.jsp in \webapps\connpool and set the values of:
    String DATABASE_COLLECTION = “CSG”;
    String DATABASE_DOCTYPE = “resreq”;
    String POOL_NAME = “TestPool”;
    to match your required values.

    4) Configure Tomcat.
    If you run Tomcat from catalina.bat, you need to put the resources directory in classpath by adding the following line to setclasspath.bat in tomcat’s bin directory:
    after:
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar
    add:
    set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\resources;

    If you run Tomcat as a service, you need to change file wrapper.properties in directory \conf\jk\ (assuming you are using jk_nt_service):
    after:
    wrapper.class_path=$(wrapper.java_home)\lib\tools.jar
    add:
    wrapper.class_path=$(wrapper.tomcat_home)\resources

    Now start Tomcat and run the example using a URL like http://localhost:8080/connpool/Test.jsp.

    This all works for me - hope it works for you!


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


  • 9.  RE: Classpath and ManagedConnectionPools.xml

    Posted Wed March 27, 2002 11:15 AM


  • 10.  RE: Classpath and ManagedConnectionPools.xml

    Posted Wed March 27, 2002 02:13 PM

    Hi Bill,
    I find that your example didn’t work because I had not put the log4j-core.jar on the classpath.
    Thank you very much!!!


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