Tomcat 5 - Exception invoking method addResourceLink

Discussion in 'Java' started by Christian, Nov 17, 2003.

  1. Christian

    Christian Guest

    Hi! I'm having a problem adding a second resource link to my web app,
    the first one works fine. I'm using Tomcat 5 and db2/400 db. Tomcat
    gives the following exception:

    2003-nov-17 12:29:39 org.apache.commons.modeler.BaseModelMBean invoke
    ALLVARLIG: Exception invoking method addResourceLink
    java.lang.NullPointerException
    at org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:1059)
    at org.apache.catalina.mbeans.NamingResourcesMBean.addResourceLink(NamingResourcesMBean.java:296)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:481)
    at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:209)
    at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke
    .......

    The second resource link is identic to the first, except from the JNDI
    name offcource.

    My server.xml:
    <Resource name="jdbc/SFDS7" scope="Shareable"
    type="javax.sql.DataSource"/>
    <Resource name="jdbc/SFDS4" scope="Shareable"
    type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/SFDS7">
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>"nah...wont tell you that ;)"</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:as400://192.168.254.1/BIO</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.ibm.as400.access.AS400JDBCDriver</value>
    </parameter>
    <parameter>
    <name>databaseName</name>
    <value>BIO</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>chlo</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/SFDS4">
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>"nah...wont tell you that ;)"</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:as400://192.168.254.1/SFBIODTA</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.ibm.as400.access.AS400JDBCDriver</value>
    </parameter>
    <parameter>
    <name>databaseName</name>
    <value>SFBIODTA</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>chlo</value>
    </parameter>
    </ResourceParams>

    Adding a resource link to the datasource SFDS7 works fine but when i
    try to create a link to SFDS4 the above error occurs.
     
    Christian, Nov 17, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. garfield
    Replies:
    3
    Views:
    502
    John C. Bollinger
    Oct 30, 2003
  2. Ray
    Replies:
    1
    Views:
    303
    Michal Dzirba
    Nov 9, 2003
  3. Andy Fish
    Replies:
    7
    Views:
    474
    Roedy Green
    Jun 10, 2004
  4. Faiser
    Replies:
    3
    Views:
    1,527
    Faiser
    Aug 18, 2004
  5. Gabriel

    Exception when invoking web service from asp .net form

    Gabriel, May 3, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    204
    Gabriel
    May 7, 2004
Loading...

Share This Page