You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Hemingway <db...@kooee.com.au> on 2003/01/06 03:45:08 UTC
Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Hi,
Sorry if this has been addressed before on this list but I have not seen it. I have followed the instructions in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html.
I can get the setup to work 100% under win32 but using the same settings under linux I get:
java.sql.SQLException: Cannot load JDBC driver class 'null'
I have seen this problem raised in many places but no one has seemed to know the correct answer.
My configuration is as follows:
Linux - Red Hat 7.3
Apache 1.3.27
Tomcat 4.1.12 LE
Oracle 9i
Pool 1.0
DBCP 1.0
Collections 2.0
common/lib/commons-collections.jar
common/lib/commons-dbcp.jar
common/lib/commons-pool.jar
common/lib/classes12.jar (with the javax.sql removed)
server.xml:
<Context path="/lawonline" docBase="lawonline" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_lawonline_log." suffix=".txt"
timestamp="true"/>
<Ejb name="ejb/EmplRecord" type="Entity"
home="com.wombat.empl.EmployeeRecordHome"
remote="com.wombat.empl.EmployeeRecord"/>
<Resource name="jdbc/myoracle" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
</parameter>
<parameter>
<name>username</name>
<value>lawonline</value>
</parameter>
<parameter>
<name>password</name>
<value>Le12No06</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>
<Environment name="maxExemptions" type="java.lang.Integer"
value="15"/>
<Parameter name="context.param.name" value="context.param.value"
override="false"/>
<Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/EmployeeAppDb">
<parameter><name>username</name><value>sa</value></parameter>
<parameter><name>password</name><value></value></parameter>
<parameter><name>driverClassName</name>
<value>org.hsql.jdbcDriver</value></parameter>
<parameter><name>url</name>
<value>jdbc:HypersonicSQL:database</value></parameter>
</ResourceParams>
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink name="linkToGlobalResource"
global="simpleValue"
type="java.lang.Integer"/>
</Context>
web.xml:
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
The ejb and jdbc/EmployeeAppDb was there as default when I started, should it be removed seeing as it isn't being used?
I have been at this for weeks now. Any help would be very much appreciated. Thank you
regards,
David Hemingway
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by David Hemingway <db...@kooee.com.au>.
I am using j2se1.4.1 (jdk1.4)
----- Original Message -----
From: "Paul Carpenter" <pe...@yt.catv.ne.jp>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, January 06, 2003 11:03 PM
Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
> Hi Again
>
> I've just spotted something really dumb....but perhaps the answer (so
> dumb it had better not be the answer).
>
> I checked the Tomcat 4 docs, and is says that you need JDK 1.2 or
> higher to use this version of the product - I can't find anything
> different in the JNDI docs either.
>
> Now I just checked my machine, and I'm running JDK 1.3.1. However,
> checking the API documents on the Sun site, 1.3.1 has no javax.sql.*
> package implemented - it doesn't appear until JDK 1.4. Which may
> explain the 'null' me thinks?
>
> I notice that you didn't specify which JDK you were running in your
> build, and none of the threads in the archive seem to stress this. I'm
> quite surprised that the java source compiles in this case, but could
> this be the simple reason? Or is this package hidden in one of the .jar
> file somewhere in common/lib?
>
> Thanks
> Paul
>
>
> On Monday, January 6, 2003, at 08:10 PM, Paul Carpenter wrote:
>
> > Hi Dave
> >
> > This is exactly what I see on my OSX setup - sorry, I can't help you
> > with a fix at present, but please keep me posted of your progress if
> > 4.1.18 works I may try an install here (currently running 4.1.12, as
> > you are, which was the latest build from the MAC website).
> >
> > FYI I tried the suggestion from Iran Marcius (thread: Still can't get
> > JNDI Datasource) which was to and an extra bit to the <Context ....
> >
> > i.e. naming="true"
> >
> > But alas, no luck.
> >
> >
> > Thanks
> > Paul
> >
> > On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
> >
> >> There was nothing meaningful in the logs no. Just the stack trace
> >> leading up
> >> to that exception. I have not tried 4.1.18 yet. I may have to give
> >> that a
> >> go. Thanks
> >>
> >> Dave
> >>
> >> ----- Original Message -----
> >> From: "Craig R. McClanahan" <cr...@apache.org>
> >> To: "Tomcat Users List" <to...@jakarta.apache.org>
> >> Sent: Monday, January 06, 2003 2:41 PM
> >> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
> >>
> >>
> >>>
> >>>
> >>> On Mon, 6 Jan 2003, David Hemingway wrote:
> >>>
> >>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
> >>>> From: David Hemingway <db...@kooee.com.au>
> >>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> >>>> To: tomcat-user@jakarta.apache.org
> >>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
> >>>>
> >>>> Hi,
> >>>>
> >>>> Sorry if this has been addressed before on this list but I have not
> >>>> seen
> >> it. I have followed the instructions in
> >> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
> >> examples-how
> >> to.html.
> >>>>
> >>>> I can get the setup to work 100% under win32 but using the same
> >>>> settings
> >> under linux I get:
> >>>>
> >>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
> >>>>
> >>>> I have seen this problem raised in many places but no one has
> >>>> seemed to
> >> know the correct answer.
> >>>>
> >>>
> >>> Have you examined the log files (in $CATALINA_HOME/logs) to see if
> >>> there
> >>> are any interesting (or at least useful :-) error messages?
> >>>
> >>> Have you tried the most recent production quality release (4.1.18)?
> >>> I
> >>> know there have been some bugfixes in the included commons-dbcp code
> >>> that
> >>> might make a difference.
> >>>
> >>> Craig
> >>>
> >>>
> >>>> My configuration is as follows:
> >>>>
> >>>> Linux - Red Hat 7.3
> >>>> Apache 1.3.27
> >>>> Tomcat 4.1.12 LE
> >>>> Oracle 9i
> >>>> Pool 1.0
> >>>> DBCP 1.0
> >>>> Collections 2.0
> >>>>
> >>>> common/lib/commons-collections.jar
> >>>> common/lib/commons-dbcp.jar
> >>>> common/lib/commons-pool.jar
> >>>> common/lib/classes12.jar (with the javax.sql removed)
> >>>>
> >>>> server.xml:
> >>>>
> >>>>
> >>>> <Context path="/lawonline" docBase="lawonline" debug="0"
> >>>> reloadable="true" crossContext="true">
> >>>> <Logger className="org.apache.catalina.logger.FileLogger"
> >>>> prefix="localhost_lawonline_log." suffix=".txt"
> >>>> timestamp="true"/>
> >>>> <Ejb name="ejb/EmplRecord" type="Entity"
> >>>> home="com.wombat.empl.EmployeeRecordHome"
> >>>> remote="com.wombat.empl.EmployeeRecord"/>
> >>>>
> >>>> <Resource name="jdbc/myoracle" auth="Container"
> >>>> type="javax.sql.DataSource"/>
> >>>>
> >>>> <ResourceParams name="jdbc/myoracle">
> >>>> <parameter>
> >>>> <name>factory</name>
> >>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>driverClassName</name>
> >>>> <value>oracle.jdbc.driver.OracleDriver</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>url</name>
> >>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>username</name>
> >>>> <value>lawonline</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>password</name>
> >>>> <value>Le12No06</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>maxActive</name>
> >>>> <value>10</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>maxIdle</name>
> >>>> <value>10</value>
> >>>> </parameter>
> >>>> <parameter>
> >>>> <name>maxWait</name>
> >>>> <value>-1</value>
> >>>> </parameter>
> >>>> </ResourceParams>
> >>>>
> >>>> <Environment name="maxExemptions" type="java.lang.Integer"
> >>>> value="15"/>
> >>>> <Parameter name="context.param.name"
> >> value="context.param.value"
> >>>> override="false"/>
> >>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
> >>>> type="javax.sql.DataSource"/>
> >>>> <ResourceParams name="jdbc/EmployeeAppDb">
> >>>>
> >> <parameter><name>username</name><value>sa</value></parameter>
> >>>>
> >>>> <parameter><name>password</name><value></value></parameter>
> >>>> <parameter><name>driverClassName</name>
> >>>> <value>org.hsql.jdbcDriver</value></parameter>
> >>>> <parameter><name>url</name>
> >>>> <value>jdbc:HypersonicSQL:database</value></parameter>
> >>>> </ResourceParams>
> >>>> <Resource name="mail/Session" auth="Container"
> >>>> type="javax.mail.Session"/>
> >>>> <ResourceParams name="mail/Session">
> >>>> <parameter>
> >>>> <name>mail.smtp.host</name>
> >>>> <value>localhost</value>
> >>>> </parameter>
> >>>> </ResourceParams>
> >>>> <ResourceLink name="linkToGlobalResource"
> >>>> global="simpleValue"
> >>>> type="java.lang.Integer"/>
> >>>> </Context>
> >>>>
> >>>>
> >>>> web.xml:
> >>>>
> >>>> <resource-ref>
> >>>> <description>DB Connection</description>
> >>>> <res-ref-name>jdbc/myoracle</res-ref-name>
> >>>> <res-type>javax.sql.DataSource</res-type>
> >>>> <res-auth>Container</res-auth>
> >>>> </resource-ref>
> >>>>
> >>>>
> >>>> The ejb and jdbc/EmployeeAppDb was there as default when I started,
> >> should it be removed seeing as it isn't being used?
> >>>> I have been at this for weeks now. Any help would be very much
> >> appreciated. Thank you
> >>>>
> >>>> regards,
> >>>> David Hemingway
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> To unsubscribe, e-mail:
> >> <ma...@jakarta.apache.org>
> >>> For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> >>>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >> <ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by Paul Carpenter <pe...@yt.catv.ne.jp>.
For the list
...here's a snippet of an off-line post between myself and Manav
(tahnks, Manav). His servlet (plus a tweak) may help someone identify
what's happening:
Thanks
paul
<snippety snip ------>
Manav
So, I tweaked the code you gave me a little by adding:
try {
out.println("list() on full Context : ");
NamingEnumeration enum =
ctx.list("java:/comp/env/jdbc/DBmultileague");
while (enum.hasMoreElements()) {
out.print("Binding : ");
out.println(enum.nextElement().toString());
}
out.println("listBindings() on full Context : ");
enum =
ctx.listBindings("java:/comp/env/jdbc/DBmultileague");
while (enum.hasMoreElements()) {
out.print("Binding : ");
out.println(enum.nextElement().toString());
}
} catch (NamingException e) {
out.println("JNDI lookup failed : " + e);
}
and the result :
Simple lookup test :
dbName : org.apache.commons.dbcp.BasicDataSource@474f20
list() on /comp/env Context :
Binding : jdbc: org.apache.naming.NamingContext
listBindings() on /comp/env Context :
Binding : jdbc:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@1bdd4e
list() on full Context :
JNDI lookup failed : javax.naming.NamingException: Name is not bound to
a Context
so, what could be the reason for the full context not being retrieved?
Any ideas?
</snippety snip>
On Tuesday, January 7, 2003, at 09:00 PM, Paul Carpenter wrote:
> Just checked and double checked, check the contents of my jar file in
> common/lib, and all seems in order?
>
> This is a pesky problem that gets posted often tothe list - can no one
> figure it out? Very frustrating?
>
> I can connect using forClass etc and direct jdbc calls to the Sybase
> driver, but the driver doesn't seem to load through the JNDI setup -
> could I be missing some jar files (other than jndi.jar) maybe? Are
> there any other jndi/naming libraries? Here's the content of my
> common/lib:
> activation.jar jndi.jar
> ant.jar jta.jar
> commons-collections.jar mail.jar
> commons-dbcp.jar
> mysql-connector-java-2.0.14-bin.jar
> commons-logging-api.jar naming-common.jar
> commons-pool.jar naming-factory.jar
> jTDS2.jar naming-resources.jar
> jasper-compiler.jar servlet.jar
> jasper-runtime.jar turbine-2.1.jar
> jconn2.jar velocity-1.2-dev.jar
> jdbc2_0-stdext.jar
>
>
> Thanks
> Paul
>
>
> On Tuesday, January 7, 2003, at 10:01 AM, Peng Tuck Kwok wrote:
>
>> Paul Carpenter wrote:
>> ....
>>> Now I just checked my machine, and I'm running JDK 1.3.1. However,
>>> checking the API documents on the Sun site, 1.3.1 has no javax.sql.*
>>> package implemented - it doesn't appear until JDK 1.4. Which may
>>> explain the 'null' me thinks?
>> The javax.sql package is optional for jdk 1.3.1, and remains
>> available as a seperate package for users of that jdk. You just
>> download the jar file to use it. Tomcat ships with the jar file (at
>> least it did with 4.x afaik). The 'null' error you get is actually
>> related to the fact that it can't find the driver you specified.
>> Maybe you could double check your configuration, jsp & servlet code
>> to see if you mistyped anything ?
>>
>>
>>> I notice that you didn't specify which JDK you were running in your
>>> build, and none of the threads in the archive seem to stress this.
>>> I'm quite surprised that the java source compiles in this case, but
>>> could this be the simple reason? Or is this package hidden in one
>>> of the .jar file somewhere in common/lib?
>>> Thanks
>>> Paul
>>> On Monday, January 6, 2003, at 08:10 PM, Paul Carpenter wrote:
>>>> Hi Dave
>>>>
>>>> This is exactly what I see on my OSX setup - sorry, I can't help
>>>> you with a fix at present, but please keep me posted of your
>>>> progress if 4.1.18 works I may try an install here (currently
>>>> running 4.1.12, as you are, which was the latest build from the
>>>> MAC website).
>>>>
>>>> FYI I tried the suggestion from Iran Marcius (thread: Still can't
>>>> get JNDI Datasource) which was to and an extra bit to the <Context
>>>> ....
>>>>
>>>> i.e. naming="true"
>>>>
>>>> But alas, no luck.
>>>>
>>>>
>>>> Thanks
>>>> Paul
>>>>
>>>> On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
>>>>
>>>>> There was nothing meaningful in the logs no. Just the stack trace
>>>>> leading up
>>>>> to that exception. I have not tried 4.1.18 yet. I may have to give
>>>>> that a
>>>>> go. Thanks
>>>>>
>>>>> Dave
>>>>>
>>>>> ----- Original Message -----
>>>>> From: "Craig R. McClanahan" <cr...@apache.org>
>>>>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>>>>> Sent: Monday, January 06, 2003 2:41 PM
>>>>> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, 6 Jan 2003, David Hemingway wrote:
>>>>>>
>>>>>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
>>>>>>> From: David Hemingway <db...@kooee.com.au>
>>>>>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>>>>> To: tomcat-user@jakarta.apache.org
>>>>>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Sorry if this has been addressed before on this list but I have
>>>>>>> not seen
>>>>>
>>>>> it. I have followed the instructions in
>>>>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
>>>>> examples-how
>>>>> to.html.
>>>>>
>>>>>>>
>>>>>>> I can get the setup to work 100% under win32 but using the same
>>>>>>> settings
>>>>>
>>>>> under linux I get:
>>>>>
>>>>>>>
>>>>>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
>>>>>>>
>>>>>>> I have seen this problem raised in many places but no one has
>>>>>>> seemed to
>>>>>
>>>>> know the correct answer.
>>>>>
>>>>>>>
>>>>>>
>>>>>> Have you examined the log files (in $CATALINA_HOME/logs) to see
>>>>>> if there
>>>>>> are any interesting (or at least useful :-) error messages?
>>>>>>
>>>>>> Have you tried the most recent production quality release
>>>>>> (4.1.18)? I
>>>>>> know there have been some bugfixes in the included commons-dbcp
>>>>>> code that
>>>>>> might make a difference.
>>>>>>
>>>>>> Craig
>>>>>>
>>>>>>
>>>>>>> My configuration is as follows:
>>>>>>>
>>>>>>> Linux - Red Hat 7.3
>>>>>>> Apache 1.3.27
>>>>>>> Tomcat 4.1.12 LE
>>>>>>> Oracle 9i
>>>>>>> Pool 1.0
>>>>>>> DBCP 1.0
>>>>>>> Collections 2.0
>>>>>>>
>>>>>>> common/lib/commons-collections.jar
>>>>>>> common/lib/commons-dbcp.jar
>>>>>>> common/lib/commons-pool.jar
>>>>>>> common/lib/classes12.jar (with the javax.sql removed)
>>>>>>>
>>>>>>> server.xml:
>>>>>>>
>>>>>>>
>>>>>>> <Context path="/lawonline" docBase="lawonline" debug="0"
>>>>>>> reloadable="true" crossContext="true">
>>>>>>> <Logger
>>>>>>> className="org.apache.catalina.logger.FileLogger"
>>>>>>> prefix="localhost_lawonline_log."
>>>>>>> suffix=".txt"
>>>>>>> timestamp="true"/>
>>>>>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>>>>>> home="com.wombat.empl.EmployeeRecordHome"
>>>>>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>>>>>
>>>>>>> <Resource name="jdbc/myoracle" auth="Container"
>>>>>>> type="javax.sql.DataSource"/>
>>>>>>>
>>>>>>> <ResourceParams name="jdbc/myoracle">
>>>>>>> <parameter>
>>>>>>> <name>factory</name>
>>>>>>>
>>>>>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>driverClassName</name>
>>>>>>> <value>oracle.jdbc.driver.OracleDriver</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>url</name>
>>>>>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>username</name>
>>>>>>> <value>lawonline</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>password</name>
>>>>>>> <value>Le12No06</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>maxActive</name>
>>>>>>> <value>10</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>maxIdle</name>
>>>>>>> <value>10</value>
>>>>>>> </parameter>
>>>>>>> <parameter>
>>>>>>> <name>maxWait</name>
>>>>>>> <value>-1</value>
>>>>>>> </parameter>
>>>>>>> </ResourceParams>
>>>>>>>
>>>>>>> <Environment name="maxExemptions" type="java.lang.Integer"
>>>>>>> value="15"/>
>>>>>>> <Parameter name="context.param.name"
>>>>>
>>>>> value="context.param.value"
>>>>>
>>>>>>> override="false"/>
>>>>>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>>>>>>> type="javax.sql.DataSource"/>
>>>>>>> <ResourceParams name="jdbc/EmployeeAppDb">
>>>>>>>
>>>>> <parameter><name>username</name><value>sa</value></parameter>
>>>>>
>>>>>>>
>>>>>>> <parameter><name>password</name><value></value></parameter>
>>>>>>> <parameter><name>driverClassName</name>
>>>>>>> <value>org.hsql.jdbcDriver</value></parameter>
>>>>>>> <parameter><name>url</name>
>>>>>>>
>>>>>>> <value>jdbc:HypersonicSQL:database</value></parameter>
>>>>>>> </ResourceParams>
>>>>>>> <Resource name="mail/Session" auth="Container"
>>>>>>> type="javax.mail.Session"/>
>>>>>>> <ResourceParams name="mail/Session">
>>>>>>> <parameter>
>>>>>>> <name>mail.smtp.host</name>
>>>>>>> <value>localhost</value>
>>>>>>> </parameter>
>>>>>>> </ResourceParams>
>>>>>>> <ResourceLink name="linkToGlobalResource"
>>>>>>> global="simpleValue"
>>>>>>> type="java.lang.Integer"/>
>>>>>>> </Context>
>>>>>>>
>>>>>>>
>>>>>>> web.xml:
>>>>>>>
>>>>>>> <resource-ref>
>>>>>>> <description>DB Connection</description>
>>>>>>> <res-ref-name>jdbc/myoracle</res-ref-name>
>>>>>>> <res-type>javax.sql.DataSource</res-type>
>>>>>>> <res-auth>Container</res-auth>
>>>>>>> </resource-ref>
>>>>>>>
>>>>>>>
>>>>>>> The ejb and jdbc/EmployeeAppDb was there as default when I
>>>>>>> started,
>>>>>
>>>>> should it be removed seeing as it isn't being used?
>>>>>
>>>>>>> I have been at this for weeks now. Any help would be very much
>>>>>
>>>>> appreciated. Thank you
>>>>>
>>>>>>>
>>>>>>> regards,
>>>>>>> David Hemingway
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> To unsubscribe, e-mail:
>>>>>
>>>>> <ma...@jakarta.apache.org>
>>>>>
>>>>>> For additional commands, e-mail:
>>>>>
>>>>> <ma...@jakarta.apache.org>
>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> To unsubscribe, e-mail:
>>>>> <ma...@jakarta.apache.org>
>>>>> For additional commands, e-mail:
>>>>> <ma...@jakarta.apache.org>
>>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by Paul Carpenter <pe...@yt.catv.ne.jp>.
Just checked and double checked, check the contents of my jar file in
common/lib, and all seems in order?
This is a pesky problem that gets posted often tothe list - can no one
figure it out? Very frustrating?
I can connect using forClass etc and direct jdbc calls to the Sybase
driver, but the driver doesn't seem to load through the JNDI setup -
could I be missing some jar files (other than jndi.jar) maybe? Are
there any other jndi/naming libraries? Here's the content of my
common/lib:
activation.jar jndi.jar
ant.jar jta.jar
commons-collections.jar mail.jar
commons-dbcp.jar
mysql-connector-java-2.0.14-bin.jar
commons-logging-api.jar naming-common.jar
commons-pool.jar naming-factory.jar
jTDS2.jar naming-resources.jar
jasper-compiler.jar servlet.jar
jasper-runtime.jar turbine-2.1.jar
jconn2.jar velocity-1.2-dev.jar
jdbc2_0-stdext.jar
Thanks
Paul
On Tuesday, January 7, 2003, at 10:01 AM, Peng Tuck Kwok wrote:
> Paul Carpenter wrote:
> ....
>> Now I just checked my machine, and I'm running JDK 1.3.1. However,
>> checking the API documents on the Sun site, 1.3.1 has no javax.sql.*
>> package implemented - it doesn't appear until JDK 1.4. Which may
>> explain the 'null' me thinks?
> The javax.sql package is optional for jdk 1.3.1, and remains available
> as a seperate package for users of that jdk. You just download the jar
> file to use it. Tomcat ships with the jar file (at least it did with
> 4.x afaik). The 'null' error you get is actually related to the fact
> that it can't find the driver you specified. Maybe you could double
> check your configuration, jsp & servlet code to see if you mistyped
> anything ?
>
>
>> I notice that you didn't specify which JDK you were running in your
>> build, and none of the threads in the archive seem to stress this.
>> I'm quite surprised that the java source compiles in this case, but
>> could this be the simple reason? Or is this package hidden in one of
>> the .jar file somewhere in common/lib?
>> Thanks
>> Paul
>> On Monday, January 6, 2003, at 08:10 PM, Paul Carpenter wrote:
>>> Hi Dave
>>>
>>> This is exactly what I see on my OSX setup - sorry, I can't help
>>> you with a fix at present, but please keep me posted of your
>>> progress if 4.1.18 works I may try an install here (currently
>>> running 4.1.12, as you are, which was the latest build from the MAC
>>> website).
>>>
>>> FYI I tried the suggestion from Iran Marcius (thread: Still can't
>>> get JNDI Datasource) which was to and an extra bit to the <Context
>>> ....
>>>
>>> i.e. naming="true"
>>>
>>> But alas, no luck.
>>>
>>>
>>> Thanks
>>> Paul
>>>
>>> On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
>>>
>>>> There was nothing meaningful in the logs no. Just the stack trace
>>>> leading up
>>>> to that exception. I have not tried 4.1.18 yet. I may have to give
>>>> that a
>>>> go. Thanks
>>>>
>>>> Dave
>>>>
>>>> ----- Original Message -----
>>>> From: "Craig R. McClanahan" <cr...@apache.org>
>>>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>>>> Sent: Monday, January 06, 2003 2:41 PM
>>>> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>
>>>>
>>>>>
>>>>>
>>>>> On Mon, 6 Jan 2003, David Hemingway wrote:
>>>>>
>>>>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
>>>>>> From: David Hemingway <db...@kooee.com.au>
>>>>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>>>> To: tomcat-user@jakarta.apache.org
>>>>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Sorry if this has been addressed before on this list but I have
>>>>>> not seen
>>>>
>>>> it. I have followed the instructions in
>>>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
>>>> examples-how
>>>> to.html.
>>>>
>>>>>>
>>>>>> I can get the setup to work 100% under win32 but using the same
>>>>>> settings
>>>>
>>>> under linux I get:
>>>>
>>>>>>
>>>>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
>>>>>>
>>>>>> I have seen this problem raised in many places but no one has
>>>>>> seemed to
>>>>
>>>> know the correct answer.
>>>>
>>>>>>
>>>>>
>>>>> Have you examined the log files (in $CATALINA_HOME/logs) to see if
>>>>> there
>>>>> are any interesting (or at least useful :-) error messages?
>>>>>
>>>>> Have you tried the most recent production quality release
>>>>> (4.1.18)? I
>>>>> know there have been some bugfixes in the included commons-dbcp
>>>>> code that
>>>>> might make a difference.
>>>>>
>>>>> Craig
>>>>>
>>>>>
>>>>>> My configuration is as follows:
>>>>>>
>>>>>> Linux - Red Hat 7.3
>>>>>> Apache 1.3.27
>>>>>> Tomcat 4.1.12 LE
>>>>>> Oracle 9i
>>>>>> Pool 1.0
>>>>>> DBCP 1.0
>>>>>> Collections 2.0
>>>>>>
>>>>>> common/lib/commons-collections.jar
>>>>>> common/lib/commons-dbcp.jar
>>>>>> common/lib/commons-pool.jar
>>>>>> common/lib/classes12.jar (with the javax.sql removed)
>>>>>>
>>>>>> server.xml:
>>>>>>
>>>>>>
>>>>>> <Context path="/lawonline" docBase="lawonline" debug="0"
>>>>>> reloadable="true" crossContext="true">
>>>>>> <Logger
>>>>>> className="org.apache.catalina.logger.FileLogger"
>>>>>> prefix="localhost_lawonline_log."
>>>>>> suffix=".txt"
>>>>>> timestamp="true"/>
>>>>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>>>>> home="com.wombat.empl.EmployeeRecordHome"
>>>>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>>>>
>>>>>> <Resource name="jdbc/myoracle" auth="Container"
>>>>>> type="javax.sql.DataSource"/>
>>>>>>
>>>>>> <ResourceParams name="jdbc/myoracle">
>>>>>> <parameter>
>>>>>> <name>factory</name>
>>>>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>driverClassName</name>
>>>>>> <value>oracle.jdbc.driver.OracleDriver</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>url</name>
>>>>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>username</name>
>>>>>> <value>lawonline</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>password</name>
>>>>>> <value>Le12No06</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>maxActive</name>
>>>>>> <value>10</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>maxIdle</name>
>>>>>> <value>10</value>
>>>>>> </parameter>
>>>>>> <parameter>
>>>>>> <name>maxWait</name>
>>>>>> <value>-1</value>
>>>>>> </parameter>
>>>>>> </ResourceParams>
>>>>>>
>>>>>> <Environment name="maxExemptions" type="java.lang.Integer"
>>>>>> value="15"/>
>>>>>> <Parameter name="context.param.name"
>>>>
>>>> value="context.param.value"
>>>>
>>>>>> override="false"/>
>>>>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>>>>>> type="javax.sql.DataSource"/>
>>>>>> <ResourceParams name="jdbc/EmployeeAppDb">
>>>>>>
>>>> <parameter><name>username</name><value>sa</value></parameter>
>>>>
>>>>>>
>>>>>> <parameter><name>password</name><value></value></parameter>
>>>>>> <parameter><name>driverClassName</name>
>>>>>> <value>org.hsql.jdbcDriver</value></parameter>
>>>>>> <parameter><name>url</name>
>>>>>>
>>>>>> <value>jdbc:HypersonicSQL:database</value></parameter>
>>>>>> </ResourceParams>
>>>>>> <Resource name="mail/Session" auth="Container"
>>>>>> type="javax.mail.Session"/>
>>>>>> <ResourceParams name="mail/Session">
>>>>>> <parameter>
>>>>>> <name>mail.smtp.host</name>
>>>>>> <value>localhost</value>
>>>>>> </parameter>
>>>>>> </ResourceParams>
>>>>>> <ResourceLink name="linkToGlobalResource"
>>>>>> global="simpleValue"
>>>>>> type="java.lang.Integer"/>
>>>>>> </Context>
>>>>>>
>>>>>>
>>>>>> web.xml:
>>>>>>
>>>>>> <resource-ref>
>>>>>> <description>DB Connection</description>
>>>>>> <res-ref-name>jdbc/myoracle</res-ref-name>
>>>>>> <res-type>javax.sql.DataSource</res-type>
>>>>>> <res-auth>Container</res-auth>
>>>>>> </resource-ref>
>>>>>>
>>>>>>
>>>>>> The ejb and jdbc/EmployeeAppDb was there as default when I
>>>>>> started,
>>>>
>>>> should it be removed seeing as it isn't being used?
>>>>
>>>>>> I have been at this for weeks now. Any help would be very much
>>>>
>>>> appreciated. Thank you
>>>>
>>>>>>
>>>>>> regards,
>>>>>> David Hemingway
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> To unsubscribe, e-mail:
>>>>
>>>> <ma...@jakarta.apache.org>
>>>>
>>>>> For additional commands, e-mail:
>>>>
>>>> <ma...@jakarta.apache.org>
>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by Peng Tuck Kwok <pe...@makmal.net>.
Paul Carpenter wrote:
....
>
> Now I just checked my machine, and I'm running JDK 1.3.1. However,
> checking the API documents on the Sun site, 1.3.1 has no javax.sql.*
> package implemented - it doesn't appear until JDK 1.4. Which may
> explain the 'null' me thinks?
The javax.sql package is optional for jdk 1.3.1, and remains available
as a seperate package for users of that jdk. You just download the jar
file to use it. Tomcat ships with the jar file (at least it did with 4.x
afaik). The 'null' error you get is actually related to the fact that it
can't find the driver you specified. Maybe you could double check your
configuration, jsp & servlet code to see if you mistyped anything ?
>
> I notice that you didn't specify which JDK you were running in your
> build, and none of the threads in the archive seem to stress this. I'm
> quite surprised that the java source compiles in this case, but could
> this be the simple reason? Or is this package hidden in one of the .jar
> file somewhere in common/lib?
>
> Thanks
> Paul
>
>
> On Monday, January 6, 2003, at 08:10 PM, Paul Carpenter wrote:
>
>> Hi Dave
>>
>> This is exactly what I see on my OSX setup - sorry, I can't help you
>> with a fix at present, but please keep me posted of your progress if
>> 4.1.18 works I may try an install here (currently running 4.1.12, as
>> you are, which was the latest build from the MAC website).
>>
>> FYI I tried the suggestion from Iran Marcius (thread: Still can't get
>> JNDI Datasource) which was to and an extra bit to the <Context ....
>>
>> i.e. naming="true"
>>
>> But alas, no luck.
>>
>>
>> Thanks
>> Paul
>>
>> On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
>>
>>> There was nothing meaningful in the logs no. Just the stack trace
>>> leading up
>>> to that exception. I have not tried 4.1.18 yet. I may have to give
>>> that a
>>> go. Thanks
>>>
>>> Dave
>>>
>>> ----- Original Message -----
>>> From: "Craig R. McClanahan" <cr...@apache.org>
>>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>>> Sent: Monday, January 06, 2003 2:41 PM
>>> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>
>>>
>>>>
>>>>
>>>> On Mon, 6 Jan 2003, David Hemingway wrote:
>>>>
>>>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
>>>>> From: David Hemingway <db...@kooee.com.au>
>>>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>>> To: tomcat-user@jakarta.apache.org
>>>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>>
>>>>> Hi,
>>>>>
>>>>> Sorry if this has been addressed before on this list but I have
>>>>> not seen
>>>
>>> it. I have followed the instructions in
>>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
>>> examples-how
>>> to.html.
>>>
>>>>>
>>>>> I can get the setup to work 100% under win32 but using the same
>>>>> settings
>>>
>>> under linux I get:
>>>
>>>>>
>>>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
>>>>>
>>>>> I have seen this problem raised in many places but no one has
>>>>> seemed to
>>>
>>> know the correct answer.
>>>
>>>>>
>>>>
>>>> Have you examined the log files (in $CATALINA_HOME/logs) to see if
>>>> there
>>>> are any interesting (or at least useful :-) error messages?
>>>>
>>>> Have you tried the most recent production quality release (4.1.18)? I
>>>> know there have been some bugfixes in the included commons-dbcp
>>>> code that
>>>> might make a difference.
>>>>
>>>> Craig
>>>>
>>>>
>>>>> My configuration is as follows:
>>>>>
>>>>> Linux - Red Hat 7.3
>>>>> Apache 1.3.27
>>>>> Tomcat 4.1.12 LE
>>>>> Oracle 9i
>>>>> Pool 1.0
>>>>> DBCP 1.0
>>>>> Collections 2.0
>>>>>
>>>>> common/lib/commons-collections.jar
>>>>> common/lib/commons-dbcp.jar
>>>>> common/lib/commons-pool.jar
>>>>> common/lib/classes12.jar (with the javax.sql removed)
>>>>>
>>>>> server.xml:
>>>>>
>>>>>
>>>>> <Context path="/lawonline" docBase="lawonline" debug="0"
>>>>> reloadable="true" crossContext="true">
>>>>> <Logger className="org.apache.catalina.logger.FileLogger"
>>>>> prefix="localhost_lawonline_log." suffix=".txt"
>>>>> timestamp="true"/>
>>>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>>>> home="com.wombat.empl.EmployeeRecordHome"
>>>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>>>
>>>>> <Resource name="jdbc/myoracle" auth="Container"
>>>>> type="javax.sql.DataSource"/>
>>>>>
>>>>> <ResourceParams name="jdbc/myoracle">
>>>>> <parameter>
>>>>> <name>factory</name>
>>>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>driverClassName</name>
>>>>> <value>oracle.jdbc.driver.OracleDriver</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>url</name>
>>>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>username</name>
>>>>> <value>lawonline</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>password</name>
>>>>> <value>Le12No06</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>maxActive</name>
>>>>> <value>10</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>maxIdle</name>
>>>>> <value>10</value>
>>>>> </parameter>
>>>>> <parameter>
>>>>> <name>maxWait</name>
>>>>> <value>-1</value>
>>>>> </parameter>
>>>>> </ResourceParams>
>>>>>
>>>>> <Environment name="maxExemptions" type="java.lang.Integer"
>>>>> value="15"/>
>>>>> <Parameter name="context.param.name"
>>>
>>> value="context.param.value"
>>>
>>>>> override="false"/>
>>>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>>>>> type="javax.sql.DataSource"/>
>>>>> <ResourceParams name="jdbc/EmployeeAppDb">
>>>>>
>>> <parameter><name>username</name><value>sa</value></parameter>
>>>
>>>>>
>>>>> <parameter><name>password</name><value></value></parameter>
>>>>> <parameter><name>driverClassName</name>
>>>>> <value>org.hsql.jdbcDriver</value></parameter>
>>>>> <parameter><name>url</name>
>>>>> <value>jdbc:HypersonicSQL:database</value></parameter>
>>>>> </ResourceParams>
>>>>> <Resource name="mail/Session" auth="Container"
>>>>> type="javax.mail.Session"/>
>>>>> <ResourceParams name="mail/Session">
>>>>> <parameter>
>>>>> <name>mail.smtp.host</name>
>>>>> <value>localhost</value>
>>>>> </parameter>
>>>>> </ResourceParams>
>>>>> <ResourceLink name="linkToGlobalResource"
>>>>> global="simpleValue"
>>>>> type="java.lang.Integer"/>
>>>>> </Context>
>>>>>
>>>>>
>>>>> web.xml:
>>>>>
>>>>> <resource-ref>
>>>>> <description>DB Connection</description>
>>>>> <res-ref-name>jdbc/myoracle</res-ref-name>
>>>>> <res-type>javax.sql.DataSource</res-type>
>>>>> <res-auth>Container</res-auth>
>>>>> </resource-ref>
>>>>>
>>>>>
>>>>> The ejb and jdbc/EmployeeAppDb was there as default when I started,
>>>
>>> should it be removed seeing as it isn't being used?
>>>
>>>>> I have been at this for weeks now. Any help would be very much
>>>
>>> appreciated. Thank you
>>>
>>>>>
>>>>> regards,
>>>>> David Hemingway
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
>>>
>>> <ma...@jakarta.apache.org>
>>>
>>>> For additional commands, e-mail:
>>>
>>> <ma...@jakarta.apache.org>
>>>
>>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by Paul Carpenter <pe...@yt.catv.ne.jp>.
Hi Again
I've just spotted something really dumb....but perhaps the answer (so
dumb it had better not be the answer).
I checked the Tomcat 4 docs, and is says that you need JDK 1.2 or
higher to use this version of the product - I can't find anything
different in the JNDI docs either.
Now I just checked my machine, and I'm running JDK 1.3.1. However,
checking the API documents on the Sun site, 1.3.1 has no javax.sql.*
package implemented - it doesn't appear until JDK 1.4. Which may
explain the 'null' me thinks?
I notice that you didn't specify which JDK you were running in your
build, and none of the threads in the archive seem to stress this. I'm
quite surprised that the java source compiles in this case, but could
this be the simple reason? Or is this package hidden in one of the .jar
file somewhere in common/lib?
Thanks
Paul
On Monday, January 6, 2003, at 08:10 PM, Paul Carpenter wrote:
> Hi Dave
>
> This is exactly what I see on my OSX setup - sorry, I can't help you
> with a fix at present, but please keep me posted of your progress if
> 4.1.18 works I may try an install here (currently running 4.1.12, as
> you are, which was the latest build from the MAC website).
>
> FYI I tried the suggestion from Iran Marcius (thread: Still can't get
> JNDI Datasource) which was to and an extra bit to the <Context ....
>
> i.e. naming="true"
>
> But alas, no luck.
>
>
> Thanks
> Paul
>
> On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
>
>> There was nothing meaningful in the logs no. Just the stack trace
>> leading up
>> to that exception. I have not tried 4.1.18 yet. I may have to give
>> that a
>> go. Thanks
>>
>> Dave
>>
>> ----- Original Message -----
>> From: "Craig R. McClanahan" <cr...@apache.org>
>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>> Sent: Monday, January 06, 2003 2:41 PM
>> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>
>>
>>>
>>>
>>> On Mon, 6 Jan 2003, David Hemingway wrote:
>>>
>>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
>>>> From: David Hemingway <db...@kooee.com.au>
>>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>> To: tomcat-user@jakarta.apache.org
>>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>>
>>>> Hi,
>>>>
>>>> Sorry if this has been addressed before on this list but I have not
>>>> seen
>> it. I have followed the instructions in
>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
>> examples-how
>> to.html.
>>>>
>>>> I can get the setup to work 100% under win32 but using the same
>>>> settings
>> under linux I get:
>>>>
>>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
>>>>
>>>> I have seen this problem raised in many places but no one has
>>>> seemed to
>> know the correct answer.
>>>>
>>>
>>> Have you examined the log files (in $CATALINA_HOME/logs) to see if
>>> there
>>> are any interesting (or at least useful :-) error messages?
>>>
>>> Have you tried the most recent production quality release (4.1.18)?
>>> I
>>> know there have been some bugfixes in the included commons-dbcp code
>>> that
>>> might make a difference.
>>>
>>> Craig
>>>
>>>
>>>> My configuration is as follows:
>>>>
>>>> Linux - Red Hat 7.3
>>>> Apache 1.3.27
>>>> Tomcat 4.1.12 LE
>>>> Oracle 9i
>>>> Pool 1.0
>>>> DBCP 1.0
>>>> Collections 2.0
>>>>
>>>> common/lib/commons-collections.jar
>>>> common/lib/commons-dbcp.jar
>>>> common/lib/commons-pool.jar
>>>> common/lib/classes12.jar (with the javax.sql removed)
>>>>
>>>> server.xml:
>>>>
>>>>
>>>> <Context path="/lawonline" docBase="lawonline" debug="0"
>>>> reloadable="true" crossContext="true">
>>>> <Logger className="org.apache.catalina.logger.FileLogger"
>>>> prefix="localhost_lawonline_log." suffix=".txt"
>>>> timestamp="true"/>
>>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>>> home="com.wombat.empl.EmployeeRecordHome"
>>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>>
>>>> <Resource name="jdbc/myoracle" auth="Container"
>>>> type="javax.sql.DataSource"/>
>>>>
>>>> <ResourceParams name="jdbc/myoracle">
>>>> <parameter>
>>>> <name>factory</name>
>>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>driverClassName</name>
>>>> <value>oracle.jdbc.driver.OracleDriver</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>url</name>
>>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>username</name>
>>>> <value>lawonline</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>password</name>
>>>> <value>Le12No06</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>maxActive</name>
>>>> <value>10</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>maxIdle</name>
>>>> <value>10</value>
>>>> </parameter>
>>>> <parameter>
>>>> <name>maxWait</name>
>>>> <value>-1</value>
>>>> </parameter>
>>>> </ResourceParams>
>>>>
>>>> <Environment name="maxExemptions" type="java.lang.Integer"
>>>> value="15"/>
>>>> <Parameter name="context.param.name"
>> value="context.param.value"
>>>> override="false"/>
>>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>>>> type="javax.sql.DataSource"/>
>>>> <ResourceParams name="jdbc/EmployeeAppDb">
>>>>
>> <parameter><name>username</name><value>sa</value></parameter>
>>>>
>>>> <parameter><name>password</name><value></value></parameter>
>>>> <parameter><name>driverClassName</name>
>>>> <value>org.hsql.jdbcDriver</value></parameter>
>>>> <parameter><name>url</name>
>>>> <value>jdbc:HypersonicSQL:database</value></parameter>
>>>> </ResourceParams>
>>>> <Resource name="mail/Session" auth="Container"
>>>> type="javax.mail.Session"/>
>>>> <ResourceParams name="mail/Session">
>>>> <parameter>
>>>> <name>mail.smtp.host</name>
>>>> <value>localhost</value>
>>>> </parameter>
>>>> </ResourceParams>
>>>> <ResourceLink name="linkToGlobalResource"
>>>> global="simpleValue"
>>>> type="java.lang.Integer"/>
>>>> </Context>
>>>>
>>>>
>>>> web.xml:
>>>>
>>>> <resource-ref>
>>>> <description>DB Connection</description>
>>>> <res-ref-name>jdbc/myoracle</res-ref-name>
>>>> <res-type>javax.sql.DataSource</res-type>
>>>> <res-auth>Container</res-auth>
>>>> </resource-ref>
>>>>
>>>>
>>>> The ejb and jdbc/EmployeeAppDb was there as default when I started,
>> should it be removed seeing as it isn't being used?
>>>> I have been at this for weeks now. Any help would be very much
>> appreciated. Thank you
>>>>
>>>> regards,
>>>> David Hemingway
>>>>
>>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by Paul Carpenter <pe...@yt.catv.ne.jp>.
Hi Dave
This is exactly what I see on my OSX setup - sorry, I can't help you
with a fix at present, but please keep me posted of your progress if
4.1.18 works I may try an install here (currently running 4.1.12, as
you are, which was the latest build from the MAC website).
FYI I tried the suggestion from Iran Marcius (thread: Still can't get
JNDI Datasource) which was to and an extra bit to the <Context ....
i.e. naming="true"
But alas, no luck.
Thanks
Paul
On Monday, January 6, 2003, at 01:06 PM, David Hemingway wrote:
> There was nothing meaningful in the logs no. Just the stack trace
> leading up
> to that exception. I have not tried 4.1.18 yet. I may have to give
> that a
> go. Thanks
>
> Dave
>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, January 06, 2003 2:41 PM
> Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>
>
>>
>>
>> On Mon, 6 Jan 2003, David Hemingway wrote:
>>
>>> Date: Mon, 6 Jan 2003 13:45:08 +1100
>>> From: David Hemingway <db...@kooee.com.au>
>>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>> To: tomcat-user@jakarta.apache.org
>>> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>>>
>>> Hi,
>>>
>>> Sorry if this has been addressed before on this list but I have not
>>> seen
> it. I have followed the instructions in
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
> examples-how
> to.html.
>>>
>>> I can get the setup to work 100% under win32 but using the same
>>> settings
> under linux I get:
>>>
>>> java.sql.SQLException: Cannot load JDBC driver class 'null'
>>>
>>> I have seen this problem raised in many places but no one has seemed
>>> to
> know the correct answer.
>>>
>>
>> Have you examined the log files (in $CATALINA_HOME/logs) to see if
>> there
>> are any interesting (or at least useful :-) error messages?
>>
>> Have you tried the most recent production quality release (4.1.18)? I
>> know there have been some bugfixes in the included commons-dbcp code
>> that
>> might make a difference.
>>
>> Craig
>>
>>
>>> My configuration is as follows:
>>>
>>> Linux - Red Hat 7.3
>>> Apache 1.3.27
>>> Tomcat 4.1.12 LE
>>> Oracle 9i
>>> Pool 1.0
>>> DBCP 1.0
>>> Collections 2.0
>>>
>>> common/lib/commons-collections.jar
>>> common/lib/commons-dbcp.jar
>>> common/lib/commons-pool.jar
>>> common/lib/classes12.jar (with the javax.sql removed)
>>>
>>> server.xml:
>>>
>>>
>>> <Context path="/lawonline" docBase="lawonline" debug="0"
>>> reloadable="true" crossContext="true">
>>> <Logger className="org.apache.catalina.logger.FileLogger"
>>> prefix="localhost_lawonline_log." suffix=".txt"
>>> timestamp="true"/>
>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>> home="com.wombat.empl.EmployeeRecordHome"
>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>
>>> <Resource name="jdbc/myoracle" auth="Container"
>>> type="javax.sql.DataSource"/>
>>>
>>> <ResourceParams name="jdbc/myoracle">
>>> <parameter>
>>> <name>factory</name>
>>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>> </parameter>
>>> <parameter>
>>> <name>driverClassName</name>
>>> <value>oracle.jdbc.driver.OracleDriver</value>
>>> </parameter>
>>> <parameter>
>>> <name>url</name>
>>> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>>> </parameter>
>>> <parameter>
>>> <name>username</name>
>>> <value>lawonline</value>
>>> </parameter>
>>> <parameter>
>>> <name>password</name>
>>> <value>Le12No06</value>
>>> </parameter>
>>> <parameter>
>>> <name>maxActive</name>
>>> <value>10</value>
>>> </parameter>
>>> <parameter>
>>> <name>maxIdle</name>
>>> <value>10</value>
>>> </parameter>
>>> <parameter>
>>> <name>maxWait</name>
>>> <value>-1</value>
>>> </parameter>
>>> </ResourceParams>
>>>
>>> <Environment name="maxExemptions" type="java.lang.Integer"
>>> value="15"/>
>>> <Parameter name="context.param.name"
> value="context.param.value"
>>> override="false"/>
>>> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>>> type="javax.sql.DataSource"/>
>>> <ResourceParams name="jdbc/EmployeeAppDb">
>>>
> <parameter><name>username</name><value>sa</value></parameter>
>>>
>>> <parameter><name>password</name><value></value></parameter>
>>> <parameter><name>driverClassName</name>
>>> <value>org.hsql.jdbcDriver</value></parameter>
>>> <parameter><name>url</name>
>>> <value>jdbc:HypersonicSQL:database</value></parameter>
>>> </ResourceParams>
>>> <Resource name="mail/Session" auth="Container"
>>> type="javax.mail.Session"/>
>>> <ResourceParams name="mail/Session">
>>> <parameter>
>>> <name>mail.smtp.host</name>
>>> <value>localhost</value>
>>> </parameter>
>>> </ResourceParams>
>>> <ResourceLink name="linkToGlobalResource"
>>> global="simpleValue"
>>> type="java.lang.Integer"/>
>>> </Context>
>>>
>>>
>>> web.xml:
>>>
>>> <resource-ref>
>>> <description>DB Connection</description>
>>> <res-ref-name>jdbc/myoracle</res-ref-name>
>>> <res-type>javax.sql.DataSource</res-type>
>>> <res-auth>Container</res-auth>
>>> </resource-ref>
>>>
>>>
>>> The ejb and jdbc/EmployeeAppDb was there as default when I started,
> should it be removed seeing as it isn't being used?
>>> I have been at this for weeks now. Any help would be very much
> appreciated. Thank you
>>>
>>> regards,
>>> David Hemingway
>>>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by David Hemingway <db...@kooee.com.au>.
There was nothing meaningful in the logs no. Just the stack trace leading up
to that exception. I have not tried 4.1.18 yet. I may have to give that a
go. Thanks
Dave
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, January 06, 2003 2:41 PM
Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>
>
> On Mon, 6 Jan 2003, David Hemingway wrote:
>
> > Date: Mon, 6 Jan 2003 13:45:08 +1100
> > From: David Hemingway <db...@kooee.com.au>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: tomcat-user@jakarta.apache.org
> > Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
> >
> > Hi,
> >
> > Sorry if this has been addressed before on this list but I have not seen
it. I have followed the instructions in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html.
> >
> > I can get the setup to work 100% under win32 but using the same settings
under linux I get:
> >
> > java.sql.SQLException: Cannot load JDBC driver class 'null'
> >
> > I have seen this problem raised in many places but no one has seemed to
know the correct answer.
> >
>
> Have you examined the log files (in $CATALINA_HOME/logs) to see if there
> are any interesting (or at least useful :-) error messages?
>
> Have you tried the most recent production quality release (4.1.18)? I
> know there have been some bugfixes in the included commons-dbcp code that
> might make a difference.
>
> Craig
>
>
> > My configuration is as follows:
> >
> > Linux - Red Hat 7.3
> > Apache 1.3.27
> > Tomcat 4.1.12 LE
> > Oracle 9i
> > Pool 1.0
> > DBCP 1.0
> > Collections 2.0
> >
> > common/lib/commons-collections.jar
> > common/lib/commons-dbcp.jar
> > common/lib/commons-pool.jar
> > common/lib/classes12.jar (with the javax.sql removed)
> >
> > server.xml:
> >
> >
> > <Context path="/lawonline" docBase="lawonline" debug="0"
> > reloadable="true" crossContext="true">
> > <Logger className="org.apache.catalina.logger.FileLogger"
> > prefix="localhost_lawonline_log." suffix=".txt"
> > timestamp="true"/>
> > <Ejb name="ejb/EmplRecord" type="Entity"
> > home="com.wombat.empl.EmployeeRecordHome"
> > remote="com.wombat.empl.EmployeeRecord"/>
> >
> > <Resource name="jdbc/myoracle" auth="Container"
> > type="javax.sql.DataSource"/>
> >
> > <ResourceParams name="jdbc/myoracle">
> > <parameter>
> > <name>factory</name>
> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> > </parameter>
> > <parameter>
> > <name>driverClassName</name>
> > <value>oracle.jdbc.driver.OracleDriver</value>
> > </parameter>
> > <parameter>
> > <name>url</name>
> > <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
> > </parameter>
> > <parameter>
> > <name>username</name>
> > <value>lawonline</value>
> > </parameter>
> > <parameter>
> > <name>password</name>
> > <value>Le12No06</value>
> > </parameter>
> > <parameter>
> > <name>maxActive</name>
> > <value>10</value>
> > </parameter>
> > <parameter>
> > <name>maxIdle</name>
> > <value>10</value>
> > </parameter>
> > <parameter>
> > <name>maxWait</name>
> > <value>-1</value>
> > </parameter>
> > </ResourceParams>
> >
> > <Environment name="maxExemptions" type="java.lang.Integer"
> > value="15"/>
> > <Parameter name="context.param.name"
value="context.param.value"
> > override="false"/>
> > <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
> > type="javax.sql.DataSource"/>
> > <ResourceParams name="jdbc/EmployeeAppDb">
> >
<parameter><name>username</name><value>sa</value></parameter>
> > <parameter><name>password</name><value></value></parameter>
> > <parameter><name>driverClassName</name>
> > <value>org.hsql.jdbcDriver</value></parameter>
> > <parameter><name>url</name>
> > <value>jdbc:HypersonicSQL:database</value></parameter>
> > </ResourceParams>
> > <Resource name="mail/Session" auth="Container"
> > type="javax.mail.Session"/>
> > <ResourceParams name="mail/Session">
> > <parameter>
> > <name>mail.smtp.host</name>
> > <value>localhost</value>
> > </parameter>
> > </ResourceParams>
> > <ResourceLink name="linkToGlobalResource"
> > global="simpleValue"
> > type="java.lang.Integer"/>
> > </Context>
> >
> >
> > web.xml:
> >
> > <resource-ref>
> > <description>DB Connection</description>
> > <res-ref-name>jdbc/myoracle</res-ref-name>
> > <res-type>javax.sql.DataSource</res-type>
> > <res-auth>Container</res-auth>
> > </resource-ref>
> >
> >
> > The ejb and jdbc/EmployeeAppDb was there as default when I started,
should it be removed seeing as it isn't being used?
> > I have been at this for weeks now. Any help would be very much
appreciated. Thank you
> >
> > regards,
> > David Hemingway
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by David Hemingway <db...@kooee.com.au>.
I tried 4.1.18 this morning. Still get the identical error :-(
Dave
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, January 06, 2003 2:41 PM
Subject: Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>
>
> On Mon, 6 Jan 2003, David Hemingway wrote:
>
> > Date: Mon, 6 Jan 2003 13:45:08 +1100
> > From: David Hemingway <db...@kooee.com.au>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: tomcat-user@jakarta.apache.org
> > Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
> >
> > Hi,
> >
> > Sorry if this has been addressed before on this list but I have not seen
it. I have followed the instructions in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html.
> >
> > I can get the setup to work 100% under win32 but using the same settings
under linux I get:
> >
> > java.sql.SQLException: Cannot load JDBC driver class 'null'
> >
> > I have seen this problem raised in many places but no one has seemed to
know the correct answer.
> >
>
> Have you examined the log files (in $CATALINA_HOME/logs) to see if there
> are any interesting (or at least useful :-) error messages?
>
> Have you tried the most recent production quality release (4.1.18)? I
> know there have been some bugfixes in the included commons-dbcp code that
> might make a difference.
>
> Craig
>
>
> > My configuration is as follows:
> >
> > Linux - Red Hat 7.3
> > Apache 1.3.27
> > Tomcat 4.1.12 LE
> > Oracle 9i
> > Pool 1.0
> > DBCP 1.0
> > Collections 2.0
> >
> > common/lib/commons-collections.jar
> > common/lib/commons-dbcp.jar
> > common/lib/commons-pool.jar
> > common/lib/classes12.jar (with the javax.sql removed)
> >
> > server.xml:
> >
> >
> > <Context path="/lawonline" docBase="lawonline" debug="0"
> > reloadable="true" crossContext="true">
> > <Logger className="org.apache.catalina.logger.FileLogger"
> > prefix="localhost_lawonline_log." suffix=".txt"
> > timestamp="true"/>
> > <Ejb name="ejb/EmplRecord" type="Entity"
> > home="com.wombat.empl.EmployeeRecordHome"
> > remote="com.wombat.empl.EmployeeRecord"/>
> >
> > <Resource name="jdbc/myoracle" auth="Container"
> > type="javax.sql.DataSource"/>
> >
> > <ResourceParams name="jdbc/myoracle">
> > <parameter>
> > <name>factory</name>
> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> > </parameter>
> > <parameter>
> > <name>driverClassName</name>
> > <value>oracle.jdbc.driver.OracleDriver</value>
> > </parameter>
> > <parameter>
> > <name>url</name>
> > <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
> > </parameter>
> > <parameter>
> > <name>username</name>
> > <value>lawonline</value>
> > </parameter>
> > <parameter>
> > <name>password</name>
> > <value>Le12No06</value>
> > </parameter>
> > <parameter>
> > <name>maxActive</name>
> > <value>10</value>
> > </parameter>
> > <parameter>
> > <name>maxIdle</name>
> > <value>10</value>
> > </parameter>
> > <parameter>
> > <name>maxWait</name>
> > <value>-1</value>
> > </parameter>
> > </ResourceParams>
> >
> > <Environment name="maxExemptions" type="java.lang.Integer"
> > value="15"/>
> > <Parameter name="context.param.name"
value="context.param.value"
> > override="false"/>
> > <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
> > type="javax.sql.DataSource"/>
> > <ResourceParams name="jdbc/EmployeeAppDb">
> >
<parameter><name>username</name><value>sa</value></parameter>
> > <parameter><name>password</name><value></value></parameter>
> > <parameter><name>driverClassName</name>
> > <value>org.hsql.jdbcDriver</value></parameter>
> > <parameter><name>url</name>
> > <value>jdbc:HypersonicSQL:database</value></parameter>
> > </ResourceParams>
> > <Resource name="mail/Session" auth="Container"
> > type="javax.mail.Session"/>
> > <ResourceParams name="mail/Session">
> > <parameter>
> > <name>mail.smtp.host</name>
> > <value>localhost</value>
> > </parameter>
> > </ResourceParams>
> > <ResourceLink name="linkToGlobalResource"
> > global="simpleValue"
> > type="java.lang.Integer"/>
> > </Context>
> >
> >
> > web.xml:
> >
> > <resource-ref>
> > <description>DB Connection</description>
> > <res-ref-name>jdbc/myoracle</res-ref-name>
> > <res-type>javax.sql.DataSource</res-type>
> > <res-auth>Container</res-auth>
> > </resource-ref>
> >
> >
> > The ejb and jdbc/EmployeeAppDb was there as default when I started,
should it be removed seeing as it isn't being used?
> > I have been at this for weeks now. Any help would be very much
appreciated. Thank you
> >
> > regards,
> > David Hemingway
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 6 Jan 2003, David Hemingway wrote:
> Date: Mon, 6 Jan 2003 13:45:08 +1100
> From: David Hemingway <db...@kooee.com.au>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>
> Hi,
>
> Sorry if this has been addressed before on this list but I have not seen it. I have followed the instructions in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html.
>
> I can get the setup to work 100% under win32 but using the same settings under linux I get:
>
> java.sql.SQLException: Cannot load JDBC driver class 'null'
>
> I have seen this problem raised in many places but no one has seemed to know the correct answer.
>
Have you examined the log files (in $CATALINA_HOME/logs) to see if there
are any interesting (or at least useful :-) error messages?
Have you tried the most recent production quality release (4.1.18)? I
know there have been some bugfixes in the included commons-dbcp code that
might make a difference.
Craig
> My configuration is as follows:
>
> Linux - Red Hat 7.3
> Apache 1.3.27
> Tomcat 4.1.12 LE
> Oracle 9i
> Pool 1.0
> DBCP 1.0
> Collections 2.0
>
> common/lib/commons-collections.jar
> common/lib/commons-dbcp.jar
> common/lib/commons-pool.jar
> common/lib/classes12.jar (with the javax.sql removed)
>
> server.xml:
>
>
> <Context path="/lawonline" docBase="lawonline" debug="0"
> reloadable="true" crossContext="true">
> <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="localhost_lawonline_log." suffix=".txt"
> timestamp="true"/>
> <Ejb name="ejb/EmplRecord" type="Entity"
> home="com.wombat.empl.EmployeeRecordHome"
> remote="com.wombat.empl.EmployeeRecord"/>
>
> <Resource name="jdbc/myoracle" auth="Container"
> type="javax.sql.DataSource"/>
>
> <ResourceParams name="jdbc/myoracle">
> <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>oracle.jdbc.driver.OracleDriver</value>
> </parameter>
> <parameter>
> <name>url</name>
> <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
> </parameter>
> <parameter>
> <name>username</name>
> <value>lawonline</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>Le12No06</value>
> </parameter>
> <parameter>
> <name>maxActive</name>
> <value>10</value>
> </parameter>
> <parameter>
> <name>maxIdle</name>
> <value>10</value>
> </parameter>
> <parameter>
> <name>maxWait</name>
> <value>-1</value>
> </parameter>
> </ResourceParams>
>
> <Environment name="maxExemptions" type="java.lang.Integer"
> value="15"/>
> <Parameter name="context.param.name" value="context.param.value"
> override="false"/>
> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
> type="javax.sql.DataSource"/>
> <ResourceParams name="jdbc/EmployeeAppDb">
> <parameter><name>username</name><value>sa</value></parameter>
> <parameter><name>password</name><value></value></parameter>
> <parameter><name>driverClassName</name>
> <value>org.hsql.jdbcDriver</value></parameter>
> <parameter><name>url</name>
> <value>jdbc:HypersonicSQL:database</value></parameter>
> </ResourceParams>
> <Resource name="mail/Session" auth="Container"
> type="javax.mail.Session"/>
> <ResourceParams name="mail/Session">
> <parameter>
> <name>mail.smtp.host</name>
> <value>localhost</value>
> </parameter>
> </ResourceParams>
> <ResourceLink name="linkToGlobalResource"
> global="simpleValue"
> type="java.lang.Integer"/>
> </Context>
>
>
> web.xml:
>
> <resource-ref>
> <description>DB Connection</description>
> <res-ref-name>jdbc/myoracle</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
>
> The ejb and jdbc/EmployeeAppDb was there as default when I started, should it be removed seeing as it isn't being used?
> I have been at this for weeks now. Any help would be very much appreciated. Thank you
>
> regards,
> David Hemingway
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>