Re: tomcat 4.1.31 problem

2009-09-04 Thread Mark Thomas
Christopher Schultz wrote:
> Mark,
> 
> On 9/4/2009 12:31 PM, Mark Thomas wrote:
>> Christopher Schultz wrote:
>>> Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting
>>> that he disable autoDeply, in which case using an XML file in webapps
>>> wouldn't help.
>> Sorry missed that. In that case the Context element would have to be in
>> server.xml but you could still have a context specific resource defined
>> in that Context element.
> 
> Oh, really? When autoDeploy="false", Tomcat will still look in webapps
> (or docBase/.. ??) for a [appname].xml and use that for configuration?
> That's cool.

No, that isn't what I meant. What I meant was that you can still define
a per context resource in a Context element inside server.xml.

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 9/4/2009 12:31 PM, Mark Thomas wrote:
> Christopher Schultz wrote:
>> Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting
>> that he disable autoDeply, in which case using an XML file in webapps
>> wouldn't help.
> 
> Sorry missed that. In that case the Context element would have to be in
> server.xml but you could still have a context specific resource defined
> in that Context element.

Oh, really? When autoDeploy="false", Tomcat will still look in webapps
(or docBase/.. ??) for a [appname].xml and use that for configuration?
That's cool.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqhV7wACgkQ9CaO5/Lv0PA7aACeOq0xkWAMo9F6Y0Zp6hQccKaz
udUAnRF7uNmP0sdT5Uz+UnG6BWbvMsY0
=IQ/v
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-04 Thread Mark Thomas
Christopher Schultz wrote:
> Mark,
> 
> On 9/4/2009 11:21 AM, Mark Thomas wrote:
>> Christopher Schultz wrote:
>>> Jamez,
>>>
>>> On 9/3/2009 11:15 PM, jamez smith wrote:
 This is the exception when removing the  element from the
 server.xml:
 [ERROR] [Cannot create JDBC driver of class '' for connect URL
 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC 
 driver
 of class '' for connect URL 'null', cause:
 java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getDriver(DriverManager.java:243)
 at
 org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
 at
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
>>> Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x
>>> uses META-INF/context.xml files, which is a shame, because you can't
>>> define context-specific  elements anywhere. It looks like
>>> you're going to have to have your  in server.xml no matter what.
>> Huh?
> 
>> You put myapp.xml in the webapps directory in Tomcat 4.1.x.
> 
> Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting
> that he disable autoDeply, in which case using an XML file in webapps
> wouldn't help.

Sorry missed that. In that case the Context element would have to be in
server.xml but you could still have a context specific resource defined
in that Context element.

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 9/4/2009 11:21 AM, Mark Thomas wrote:
> Christopher Schultz wrote:
>> Jamez,
>>
>> On 9/3/2009 11:15 PM, jamez smith wrote:
>>> This is the exception when removing the  element from the
>>> server.xml:
>>
>>> [ERROR] [Cannot create JDBC driver of class '' for connect URL
>>> 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
>>> of class '' for connect URL 'null', cause:
>>> java.sql.SQLException: No suitable driver
>>> at java.sql.DriverManager.getDriver(DriverManager.java:243)
>>> at
>>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
>>> at
>>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
>>
>> Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x
>> uses META-INF/context.xml files, which is a shame, because you can't
>> define context-specific  elements anywhere. It looks like
>> you're going to have to have your  in server.xml no matter what.
> 
> Huh?
> 
> You put myapp.xml in the webapps directory in Tomcat 4.1.x.

Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting
that he disable autoDeply, in which case using an XML file in webapps
wouldn't help.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqhOocACgkQ9CaO5/Lv0PC8AQCbBtykno9Vzuij/0OCMXQVBI1R
nlYAmQGORk1qHSRk7bevSaNFmkjw1iOq
=wAnt
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-04 Thread Mark Thomas
Christopher Schultz wrote:
> Jamez,
> 
> On 9/3/2009 11:15 PM, jamez smith wrote:
>> This is the exception when removing the  element from the
>> server.xml:
> 
>> [ERROR] [Cannot create JDBC driver of class '' for connect URL
>> 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
>> of class '' for connect URL 'null', cause:
>> java.sql.SQLException: No suitable driver
>> at java.sql.DriverManager.getDriver(DriverManager.java:243)
>> at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
>> at
>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
> 
> Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x
> uses META-INF/context.xml files, which is a shame, because you can't
> define context-specific  elements anywhere. It looks like
> you're going to have to have your  in server.xml no matter what.

Huh?

You put myapp.xml in the webapps directory in Tomcat 4.1.x.

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jamez,

On 9/3/2009 11:15 PM, jamez smith wrote:
> This is the exception when removing the  element from the
> server.xml:
> 
> [ERROR] [Cannot create JDBC driver of class '' for connect URL
> 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
> of class '' for connect URL 'null', cause:
> java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getDriver(DriverManager.java:243)
> at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
> at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)

Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x
uses META-INF/context.xml files, which is a shame, because you can't
define context-specific  elements anywhere. It looks like
you're going to have to have your  in server.xml no matter what.

So, either keep your webapp in C:\procurement (which you said works,
right?) or turn off autoDeply in your .

> If you need  or  elements inside your , then
> you have two options:
>>
> 1. Set autoDeploy="false" on your 
>>
> This is the error which is same as the JDBC driver error:

The error you posted is really the consequence of another error, not an
actual error in itself. Can you post the real error (probably in
localhost.log or [yourwebappname].log)?

> 2. Keep your 's docBase outside of your 's appBase
>>
>> I changed   same.

I'm sorry... which error? There's a lot going on here.

> I agree with Chuck's and Mark's comments WRT JRE and Tomcat version.
> 
> I am desperate now. Will try Tomcat 5 with JDK1.4 .

Note that your existing server.xml will me worthless if you upgrade.
Start with a fresh server.xml from the distro and merge-in any elements
that you actually need. Don't try to modify your old server.xml to work
in Tomcat 5.

Oh, and move your  into META-INF/context.xml and simplify your
live greatly.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqhI6YACgkQ9CaO5/Lv0PBpAwCcCHbMwhbPuHPJ/GagQ3+bt/LX
I58AoJ+PvyEtc+pZu2zDm8ko55UBywwD
=pLYs
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-03 Thread jamez smith
Hi Chris,


> >>>If you want to deploy "procurement" from your webapps directory, simply
> >>>remove the  element entirely from your server.xml file and
> >>>allow Tomcat to auto-deploy your webapp naturally.
>

This is the exception when removing the  element from the
server.xml:

[ERROR] [Cannot create JDBC driver of class '' for connect URL
'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)


>
> >>>If you need  or  elements inside your , then
> >>>you have two options:
>
> >>>1. Set autoDeploy="false" on your 
>
This is the error which is same as the JDBC driver error:

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
)

>
> >>>2. Keep your 's docBase outside of your 's appBase
>
> I changed   >>>I agree with Chuck's and Mark's comments WRT JRE and Tomcat version.
>

I am desperate now. Will try Tomcat 5 with JDK1.4 .

Thanks,
Jamez.


Re: tomcat 4.1.31 problem

2009-09-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jamez,

On 9/1/2009 10:20 PM, jamez smith wrote:
> 1. "appBase" >  name="localhost" unpackWARs="true">
> 
> 2. working --->  debug="1">
> *C:\\ProcurementProject\\WebContent *is where my application (source code
> etc.) located.
> 
> 3. not-working --->  path="/procurement"  reloadable="true" debug="1">
> *procurement* is the War file I deployed to webapps under Tomcat.

If you have autoDeploy="true" in your  (which you do), and you
also have a  pointing to a directory inside that 's
appBase (which you also do), Tomcat will attempt to deploy the same
application twice, most likely to the same context path, and probably fail.

If you want to deploy "procurement" from your webapps directory, simply
remove the  element entirely from your server.xml file and
allow Tomcat to auto-deploy your webapp naturally.

If you need  or  elements inside your , then
you have two options:

1. Set autoDeploy="false" on your 
or
2. Keep your 's docBase outside of your 's appBase

I agree with Chuck's and Mark's comments WRT JRE and Tomcat version.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqgAGsACgkQ9CaO5/Lv0PAS6wCdF1KKJQ73pK31LScKh4OS+hSb
iNAAnRfsoAiFVImvPgl8g2p2phrartVa
=Hyfw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-03 Thread Mark Thomas
jamez smith wrote:
> Hi Mark,
> 
> Tomcat is only used for local development environment.  In our production,
> we use Websphere application server on AIX.  I am also new to this project
> and was told I can only use Tomcat 4.1 to setup my local development.

So at least use 4.1.40 so you have the latest version.

> I like to clarify that the JVM 1.4 is no longer supported by Sun?

Try downloading it from Sun and see what you get.

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-02 Thread jamez smith
Hi Mark,

Tomcat is only used for local development environment.  In our production,
we use Websphere application server on AIX.  I am also new to this project
and was told I can only use Tomcat 4.1 to setup my local development.

I like to clarify that the JVM 1.4 is no longer supported by Sun?

Thanks,
Jamez.

On Wed, Sep 2, 2009 at 9:52 PM, Mark Thomas  wrote:

> jamez smith wrote:
> >> Good day Chunk,
> >>
> >
>  Have you actually tried compiling under 1.5 or 1.6?  You might be
> >> surprised at how few problems there are.
> >>
> >> I could try to compile under 1.5.  But I dare not to use it in
> production
> >> box, as this project is well controlled by the company.  Every step I do
> >> need to be documented. I have no right to change the fundamental
> framework
> >> or JDK at all. :-(
>
> Here are a few arguments for upgrading the JVM and Tomcat
> - the JVM is no longer supported by Sun
> - the major Tomcat version (4.1.x) is no longer supported by the ASF
> - the minor Tomcat version (4.1.31) has 9 important, 2 moderate and 16
> known, published security vulnerabilities.
>
> If an application is so critical it has to be that tightly controlled, I
> have to wonder why that many security vulnerabilities are not a concern.
>  Can it really be the case that none of them apply in your environment?
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: tomcat 4.1.31 problem

2009-09-02 Thread Mark Thomas
jamez smith wrote:
>> Good day Chunk,
>>
> 
 Have you actually tried compiling under 1.5 or 1.6?  You might be
>> surprised at how few problems there are.
>>
>> I could try to compile under 1.5.  But I dare not to use it in production
>> box, as this project is well controlled by the company.  Every step I do
>> need to be documented. I have no right to change the fundamental framework
>> or JDK at all. :-(

Here are a few arguments for upgrading the JVM and Tomcat
- the JVM is no longer supported by Sun
- the major Tomcat version (4.1.x) is no longer supported by the ASF
- the minor Tomcat version (4.1.31) has 9 important, 2 moderate and 16
known, published security vulnerabilities.

If an application is so critical it has to be that tightly controlled, I
have to wonder why that many security vulnerabilities are not a concern.
 Can it really be the case that none of them apply in your environment?

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-02 Thread jamez smith
> Good day Chunk,
>

> >>Have you actually tried compiling under 1.5 or 1.6?  You might be
> surprised at how few problems there are.
>
> I could try to compile under 1.5.  But I dare not to use it in production
> box, as this project is well controlled by the company.  Every step I do
> need to be documented. I have no right to change the fundamental framework
> or JDK at all. :-(
>
   Jamez.


RE: tomcat 4.1.31 problem

2009-09-02 Thread Caldarale, Charles R
> From: jamez smith [mailto:jamez...@gmail.com]
> Subject: Re: tomcat 4.1.31 problem
> 
> This project was developed since 2002 and has a lot obsolete methods
> even under JDK 1.4.  It won't be able to compile under higer version
> of JDK.

Have you actually tried compiling under 1.5 or 1.6?  You might be surprised at 
how few problems there are.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-01 Thread jamez smith
Hi Chris,

Thanks for your patience with me. :-)


>>What is your "appBase" for your
>> in server.xml? Please re-post the  definition that does
>>work, and the one that does not work (no need to re-post the 
>>within the ).
1. "appBase" > 

2. working ---> 
*C:\\ProcurementProject\\WebContent *is where my application (source code
etc.) located.

3. not-working ---> 
*procurement* is the War file I deployed to webapps under Tomcat.

This is the only difference I have for the working and not-working context
configuration.  The rest of context configuration is the same.


>>1. If this is a legacy application, how much "development" is really
>>occurring?

Not much development to do.  Just some minor changes need to be implemented.

>>Why not run the same environment in both dev and prod?

I guess we don't have Windows version of WAS server. Not really sure.  Maybe
Tomcat is faster?

>> Why can't you run under JDK 1.5 or 1.6? Why not Tomcat 6.0?
This project was developed since 2002 and has a lot obsolete methods even
under JDK 1.4.  It won't be able to compile under higer version of JDK.
Thanks,
Jamez.


Re: tomcat 4.1.31 problem

2009-09-01 Thread jamez smith
Hi Chuck,

Good to know that.  I will definitely try the Tomcat 5 with JDK 1.4.

Thanks,
Jamez.

On Wed, Sep 2, 2009 at 1:18 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: jamez smith [mailto:jamez...@gmail.com]
> > Subject: Re: tomcat 4.1.31 problem
> >
> > This application has to run on JDK 1.4.
>
> Why are you tying both hands behind your back and wearing a blindfold while
> crossing a room full of booby-traps?  1.4 has been a dead end for quite some
> time.
>
> > My colleague told me we have to use Tomcat 4, as Tomcat 5
> > requires JDK 1.5. Is that true?
>
> No, but you must install the JDK 1.4 Compatibility Package to run Tomcat
> 5.5 under a 1.4 JVM.  It's on the same download page as the Tomcat download.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: tomcat 4.1.31 problem

2009-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jamez,

On 9/1/2009 1:10 PM, jamez smith wrote:
>> Sorry  I didn't make this clear. The DOS Window where I type
>> "startup.bat" is not closed and showed below, but the DOS Window it opened
>> is closed itself.
>> C:\Tomcat 4.1\bin>startup.bat
>> Using CATALINA_BASE:   ..
>> Using CATALINA_HOME:   ..
>> Using CATALINA_TMPDIR: ..\temp
>> Using JAVA_HOME:   C:\j2sdk1.4.2_15

You mean the command completed, not that the DOS window closed, right?
When you run "catalina.bat run", all the stdout output should go into
the CMD.EXE window where you ran it.

>> After I run both "startup.bat" or "catalina run", the procurement_log.txt
>> showed the exception: (in the server.xml, myApp = procurement, I used myApp
>> to represent the real project name, hope it won't confuse you.)
> 
>> 2009-09-02 00:25:51 StandardContext[/procurement]: Starting
>> 2009-09-02 00:25:51 StandardContext[/procurement]: Processing start(),
>> current available=false
>> 2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default
>> Resources
>> 2009-09-02 00:25:51 StandardContext[/procurement]: Resources start failed:
>> java.lang.IllegalArgumentException: Document base ..\webapps\procurement
>> does not exist or is not a readable directory


This sounds like a good place to start. What is your "appBase" for your
 in server.xml? Please re-post the  definition that does
work, and the one that does not work (no need to re-post the 
within the ).

>> I am rechecking and rechecking [the JNDI configuration]. I found 
>> in common/lib directory there are one db2java.jar and one COM
>> folder, basically it is the unzipped version of that db2java.jar.
>> Not sure why the COM folder is there. But I try to remove the COM
>> folder, the error is still there.

The COM folder will be igonred; only .jar files will be used from within
that directory.

Forget about the database driver: I think that was a distraction from
the real error (shown above).

>> Yes, IBM driver really starts with COM all in caps.

Ok.

>> I just so confused why I set
>> docBase as local, Tomcat is working?

Can you explain further what you mean when you say "set docBase as
local" versus whatever else you set it to? Again, post the working AND
non-working configurations.

>>> Finally, I wonder if upgrading to a newer level of Tomcat is an option.
>>
>> This application has to run on JDK 1.4.

Ugh. Why?

>> My colleague told me we have to use
>> Tomcat 4, as Tomcat 5 requires JDK 1.5. Is that true?

As Chuck says, Tomcat 5.5 can run on JDK 1.4 if you install the
compatibility package (which is easy).

>> I am more than happy
>> to switch to higher version of Tomcat.  Basically I only use Tomcat on local
>> for development, and we are using Websphere application server in
>> production.

That raises a few other questions:

1. If this is a legacy application, how much "development" is really
occurring?

2. Why not run the same environment in both dev and prod?

3. Why can't you run under JDK 1.5 or 1.6? Why not Tomcat 6.0?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqdYiUACgkQ9CaO5/Lv0PB1WwCgmTE94U3JOZD8Jfw+LyyMW63y
oegAn0ZOtl7SS5nqiVgb7QcfBeq2NyLp
=zG88
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: tomcat 4.1.31 problem

2009-09-01 Thread Caldarale, Charles R
> From: jamez smith [mailto:jamez...@gmail.com]
> Subject: Re: tomcat 4.1.31 problem
> 
> This application has to run on JDK 1.4.

Why are you tying both hands behind your back and wearing a blindfold while 
crossing a room full of booby-traps?  1.4 has been a dead end for quite some 
time.

> My colleague told me we have to use Tomcat 4, as Tomcat 5 
> requires JDK 1.5. Is that true?

No, but you must install the JDK 1.4 Compatibility Package to run Tomcat 5.5 
under a 1.4 JVM.  It's on the same download page as the Tomcat download.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-09-01 Thread jamez smith
On Tue, Sep 1, 2009 at 11:26 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jamez,
>
> On 8/31/2009 10:27 PM, jamez smith wrote:
>
> >>Really? When you run startup.bat from the command-line, is EXITS
> >>CMD.EXE? That is very surprising.
>

Sorry  I didn't make this clear. The DOS Window where I type
"startup.bat" is not closed and showed below, but the DOS Window it opened
is closed itself.
C:\Tomcat 4.1\bin>startup.bat
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   C:\j2sdk1.4.2_15

>
>
> >>Try looking in the file logs/procurement_log.[datestamp].txt
>
After I run both "startup.bat" or "catalina run", the procurement_log.txt
showed the exception: (in the server.xml, myApp = procurement, I used myApp
to represent the real project name, hope it won't confuse you.)

2009-09-02 00:25:51 StandardContext[/procurement]: Starting
2009-09-02 00:25:51 StandardContext[/procurement]: Processing start(),
current available=false
2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default
Resources
2009-09-02 00:25:51 StandardContext[/procurement]: Resources start failed:
java.lang.IllegalArgumentException: Document base ..\webapps\procurement
does not exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:146)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3285)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3415)
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:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

2009-09-02 00:25:51 StandardContext[/procurement]: Configuring
non-privileged default Loader
2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default
Manager
2009-09-02 00:25:51 StandardContext[/procurement]: Processing standard
container startup
2009-09-02 00:25:51 StandardContext[/procurement]: Context startup failed
due to previous errors
2009-09-02 00:25:51 StandardContext[/procurement]: Exception during cleanup
after start failed
LifecycleException:  Container StandardContext[/procurement] has not been
started
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3600)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3573)
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:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)


>
> > 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)
>
> >>Amusingly enough, there's a thread occurring concurrently with this one
> >>on the list on this exact issue. Basically: check and re-check all your
> >> parameters, make sure your datasource name is consistent, and
> 

Re: tomcat 4.1.31 problem

2009-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jamez,

On 8/31/2009 10:27 PM, jamez smith wrote:
> I have tried to type "startup.bat" in DOS under $CATALINA_HOME/bin, the
> window quickly closed itself again.

Really? When you run startup.bat from the command-line, is EXITS
CMD.EXE? That is very surprising.

> I also tried to type "catalina run",
> and saw the exception, but it does not look helpful too.

If it's this exception, then it is helpful:

> Catalina.start: LifecycleException:  Context startup failed due to previous
> errors

If there's anything before that in catalina.out, then it will be helpful
to see it. From what you posted, it looks like the error will be shown
in a different log file: one for a particular webapp.

> I am running it immediately 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.

Try looking in the file logs/procurement_log.[datestamp].txt

> 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)

Amusingly enough, there's a thread occurring concurrently with this one
on the list on this exact issue. Basically: check and re-check all your
 parameters, make sure your datasource name is consistent, and
only put your MySQL driver JAR file in one place: in the server's
library directory (common/lib on TC 4.1 IIRC).

> I post the datasource configuration in the server.xml again:
> 
> 
>prefix="procurement_log." suffix=".txt"  timestamp="true"/>

It wouldn't hurt to turn up debug to something like "99". I've never
seen good documentation on what that attribute is supposed to do,
unfortunately.

>   type="javax.sql.DataSource"/>
>  
>  
>  
> driverClassName
>COM.ibm.db2.jdbc.app.DB2Driver
>  
> 
>  
>  
>url
>jdbc:db2:oscahe
>  
>


The two above parameters are the ones you ought to double- and
triple-check: does the IBM driver really start with COM all in caps? I
suspect that it should be "com.ibm.db2.jabc.app.DB2Driver" instead of
that you have. Case does matter. Also, is the URL you have above the
correct URL for DB2? Does anything need to be set up in a separate file
to resolve "oscahe" (and is that spelled right? "oscache", maybe?)? I
remember Oracle's non-type-IV JDBC drivers needed a separate file to
configure the driver.

The last thing I'd ask about your webapp is what the code looks like
that is trying to grab a connection from the connection pool. Is it your
own code? If so, post that. If you are using something like Hibernate,
an O-R mapper, or some other DB framework, post the configuration for
/that/ so we can see what the expected DataSource JNDI name is.

Finally, I wonder if upgrading to a newer level of Tomcat is an option.
I see it's a legacy application, but the servlet API hasn't changed that
dramatically over the years (other than adding features and
tightening-down the specification of older ones). You might find that
your webapp runs perfectly fine on Tomcat 6.0, and will receive better
support from just about everyone. TC 4.1 just got its last update ever,
and it's basically dead.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqdPScACgkQ9CaO5/Lv0PDSqgCeL5A1lOEn1+MQtxwz1kXYfrzl
IfEAn2Aq9tS22XgOgvxqiwkRujlWXnn8
=X00F
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 4.1.31 problem

2009-08-31 Thread jamez smith
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:





 


 
 
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
 
 
 
   maxActive
   40
 

 
 
   maxIdle
   10
 

 
 
   maxWait
   1
 

 
 
  username
  testuser
 
 
  password
  hello
 

 
 
driverClassName
   COM.ibm.db2.jdbc.app.DB2Driver
 

 
 
   url
   jdbc:db2:oscahe
 
   
  
Thanks again.
Jamez.
On Mon, Aug 31, 2009 at 10:38 PM, Christopher Schultz <
ch...@christopherschultz.net> 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/

Re: tomcat 4.1.31 problem

2009-08-31 Thread Christopher Schultz
-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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org