Hi Chris,
Thanks for helping.
I have tried to type "startup.bat" in DOS under $CATALINA_HOME/bin, the
window quickly closed itself again. I also tried to type "catalina run",
and saw the exception, but it does not look helpful too.
C:\Tomcat 4.1\bin>catalina run
Using CATALINA_BASE: ..
Using CATALINA_HOME: ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME: C:\j2sdk1.4.2_15
Sep 1, 2009 10:13:39 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
Catalina.start: LifecycleException: Context startup failed due to previous
erro
rs
LifecycleException: Context startup failed due to previous errors
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
578)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:214
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Stopping service Tomcat-Standalone
Catalina.stop: LifecycleException: Coyote connector has not been started
LifecycleException: Coyote connector has not been started
at
org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1
296)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:49
9)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2178
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:494)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
I am running it immediatly starting up my PC. How do we know what the
previous error is? I did remember I had such exception before, but I just
can never trigger the same error again.
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause:
java.lang.NullPointerException
at COM.ibm.db2.jdbc.app.DB2Driver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
I post the datasource configuration in the server.xml again:
<Context docBase="myApp" path="/myApp" reloadable="true" debug="1" >
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="procurement_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/test_DS" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/test_DS">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>40</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
(10 seconds). An Exception is thrown if this timeout is exceeded.
Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- DB username and password for dB connections -->
<parameter>
<name>username</name>
<value>testuser</value>
</parameter>
<parameter>
<name>password</name>
<value>hello</value>
</parameter>
<!-- Class name for JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>COM.ibm.db2.jdbc.app.DB2Driver</value>
</parameter>
<!-- The JDBC connection url for connecting to your DB -->
<parameter>
<name>url</name>
<value>jdbc:db2:oscahe</value>
</parameter>
</ResourceParams>
</Context>
Thanks again.
Jamez.
On Mon, Aug 31, 2009 at 10:38 PM, Christopher Schultz <
[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jamez,
>
> On 8/30/2009 11:40 PM, jamez smith wrote:
> > The strange thing I have is Tomcat 4.1 works when I set docBase tag to
> > local, myApp's working directory. docBase = "C:\myAppWokingDir", but it
> is
> > not working when I set docBase = "myApp". There is no error, just when
> I
> > run startup.bat, the DOS window quickly close itself before I can see any
> > exceptions.
>
> There's probably an error occurring in there. Instead of running
> startup.bat from Start | Run... or double-clicking it, start yourself a
> CMD window and type startup.bat from there: you'll be able to see the
> output. Post whatever errors are shown there if you still need help.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqb4HgACgkQ9CaO5/Lv0PBlIwCcDgBVraR5y53WFVIHdH2xmMFt
> MaMAoIrTRRzLmxkvPu0xkfpzwkRd5274
> =3pmb
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>