Menu

#153 JDBC Library list property not working with Tomcat DataSourc

JDBC
closed
None
5
2005-06-13
2005-01-21
Anonymous
No

The JDBC library list property does not seem to work when using Tomcat's DataSource feature. It always defaults to the AS400's job default library list.

The same JDBC connection URL used in a standalone application (no Tomcat involved) seems to handle the library list property correctly. I still can't determine if this is really a Tomcat issue or a JDBC driver issue.

JTOpen version 4.6
AS400 version v5r2
JDK version 1.5
Tomcat 5.5.4

My Tomcat Context:

<Context debug="0" privileged="true">

<Resource name="jdbc/as400" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
maxActive="20"
maxIdle="10"
maxWait="-1"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
driverClassName="com.ibm.as400.access.AS400JDBCDriver"
url="jdbc:as400://hostname;naming=system;libraries=,pgmdbt,caelib;errors=full"
username="userid"
password="password"/>

</Context>

Discussion

  • John Eberhard

    John Eberhard - 2005-01-25
    • assigned_to: nobody --> coover-oss
     
  • Kim Button

    Kim Button - 2005-01-25

    JTOpen doesn't use have a url property for its. Have you tried specifying the &quot;libraries&quot; property when setting up your context?

     
  • Nobody/Anonymous

    The &quot;libraries&quot; property IS being set in the url of the Context. Please see the &lt;Context&gt; example include in bug submisstion.

    This property is begin ignored when using contexts in Tomcat. This is the reason for this bug report.

     
  • Kim Button

    Kim Button - 2005-01-27

    My suggestion is to add a libraries property by itself to the context, not as part of the url. Are the other properties working such as naming=system?

    For example:

    &lt;Context debug=&quot;0&quot; privileged=&quot;true&quot;&gt;

    &lt;Resource name=&quot;jdbc/as400&quot; auth=&quot;Container&quot;
    type=&quot;javax.sql.DataSource&quot;
    factory=&quot;org.apache.commons.dbcp.BasicDataSourceFactory&quot;
    maxActive=&quot;20&quot;
    maxIdle=&quot;10&quot;
    maxWait=&quot;-1&quot;
    removeAbandoned=&quot;true&quot;
    removeAbandonedTimeout=&quot;60&quot;
    logAbandoned=&quot;true&quot;
    driverClassName=&quot;com.ibm.as400.access.AS400JDBCDriver&quot;
    url=&quot;jdbc:as400://hostname;naming=system;libraries=,pgmdbt,caelib;errors=full&quot;
    username=&quot;userid&quot;
    password=&quot;password&quot;
    libraries=&quot;,pgmdbt,caelib&quot;/&gt;

    &lt;/Context&gt;

     
  • Nobody/Anonymous

    Putting the libraries property by itself in the context doesn't work either.

    The naming=system property works.

    The default-schema does not work either.

     
  • Kim Button

    Kim Button - 2005-05-10

    Logged In: YES
    user_id=1215462

    Using the following context.xml, JTOpen 4.7, AS400 V5R2,
    JDK 1.5 and Tomcat 5.5.4 I am not having any problems with
    the libraries property. Note that I amusing a different
    resource factory than you. As Tomcat 5.5.4 couldn't find the
    one you were using. Did you include a jar file somewhere for
    it?

    context.xml file
    <!-- The contents of this file will be loaded for each web
    application -->
    <Context debug="0" privileged="true">

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-
    INF/web.xml</WatchedResource>
    <WatchedResource>META-
    INF/context.xml</WatchedResource>

    <!-- Uncomment this to disable session
    persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <Resource name="jdbc/as400" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFact
    ory"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"
    removeAbandoned="true"
    removeAbandonedTimeout="60"
    logAbandoned="true"
    driverClassName="com.ibm.as400.access.AS400JDBCDriver"
    url="jdbc:as400://xxxxxx;naming=system;libraries=,button;err
    ors=full;trace=true"
    username="xxxxxxx"
    password="xxxxxxxxx"/>

    </Context>

     
  • Kim Button

    Kim Button - 2005-06-13
    • status: open --> closed
     
  • Kim Button

    Kim Button - 2005-06-13

    Logged In: YES
    user_id=1215462

    Closing this JTOpen bug since we have not received any
    follow-up information and cannot reproduce. Our policy is
    to wait 30 days for follow-up information.

     

Log in to post a comment.

Auth0 Logo