Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat 5 - Exception invoking method addResourceLink

Reply
Thread Tools

Tomcat 5 - Exception invoking method addResourceLink

 
 
Christian
Guest
Posts: n/a
 
      11-17-2003
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.createObject Name(MBeanUtils.java:1059)
at org.apache.catalina.mbeans.NamingResourcesMBean.ad dResourceLink(NamingResourcesMBean.java:296)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.modeler.BaseModelMBean.invoke(B aseModelMBean.java:481)
at mx4j.server.interceptor.InvokerMBeanServerIntercep tor.invoke(InvokerMBeanServerInterceptor.java:209)
at mx4j.server.interceptor.DefaultMBeanServerIntercep tor.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.MemoryUserDatabas eFactory</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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is an exception specification needed if the method throws and catchesits own exception? elcapitan666@gmail.com C++ 2 11-27-2007 04:01 AM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
method for Exception base class to raise the exception in an expression? Bengt Richter Python 0 07-07-2005 05:07 PM
Exception when invoking web service from asp .net form Gabriel ASP .Net Web Services 3 05-07-2004 09:37 AM



Advertisments