Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

dkarr
Due to constraints on my current work, my JAVA_HOME points to a JDK
1.4.2 distro.  When I installed Tomcat 5.5.25, I pointed it to a Java 5
JDK that I have installed.  It appears to be working relatively well.

I wanted to try installing Tomcat 6, to take a look at JSF 1.2.  When I
installed it, I pointed it to the same JDK that I'm using for Tomcat 5.
When I start it, it fails almost immediately.  I believe it's failing
because the Tomcat 5 installation used the same display name for the
service that Tomcat 6 tries to use.  This is ironic, as I have no
intention of using the Windows service, I just used the installed
because it's more convenient than the zip file.

The console output is:

[2008-01-27 17:13:10] [420  prunsrv.c] [error]
The system cannot find the file specified.
[2008-01-27 17:13:10] [1327 prunsrv.c] [error]
Load configuration failed

The "logs" directory only has "jakarta_service_20080127.log", which has:

[2008-01-27 17:01:37] [info] Procrun (2.0.3.0) started
[2008-01-27 17:01:37] [info] Service Tomcat6 name Apache Tomcat
[2008-01-27 17:01:37] [420  service.c] [error] The name is already in
use as either a service name or a service display name. [2008-01-27
17:01:37] [606  prunsrv.c] [error] Failed installing Tomcat6 service
[2008-01-27 17:01:37] [info] Procrun finished.
[2008-01-27 17:01:42] [info] Procrun (2.0.3.0) started
[2008-01-27 17:01:42] [info] Service Tomcat6 name Apache Tomcat
[2008-01-27 17:01:42] [420  service.c] [error] The name is already in
use as either a service name or a service display name. [2008-01-27
17:01:42] [606  prunsrv.c] [error] Failed installing Tomcat6 service
[2008-01-27 17:01:42] [info] Procrun finished.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

Caldarale, Charles R
> From: Karr, David [mailto:[hidden email]]
> Subject: Problems installing Tomcat 6 along existing Tomcat
> 5, and JAVA_HOME points to 1.4.2
>
> This is ironic, as I have no intention of using the
> Windows service, I just used the installed
> because it's more convenient than the zip file.

??? How are you starting Tomcat, if you used the .exe download?  It can
only be used to run Tomcat as a service, unless you conjure up your own
startup/shutdown scripts.

You really do need to download the .zip versions, since they come with
the proper scripts, and only install Tomcat as a service if you run the
appropriate script.  If you do choose to run the service installation
script, you may then specify whatever display name you want for the
service.

 - 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 start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

dkarr
Ok, so I redownloaded both Tomcat 5 and Tomcat 6.  Tomcat 5 was working
before, even though I had installed it from the service installer (and
never using it as a service).  After reinstalling it from the zip, it is
still working just fine.  When I tried to run "tomcat6.exe" from the
Tomcat6 zip file, it failed exactly the same way the service installer
did:

[2008-01-27 19:51:03] [420  prunsrv.c] [error]
The system cannot find the file specified.
[2008-01-27 19:51:03] [1327 prunsrv.c] [error]
Load configuration failed

There are NO log files in the "logs" directory.

When I try to run "startup.bat", it also appears to fail pretty quickly,
but doing this makes it clear it's trying to use my JDK 1.4.2 JAVA_HOME,
so perhaps that's why "tomcat6.exe" failed.

So, how do I configure Tomcat 6 (and Tomcat 5, I guess) to use an
alternative JVM besides JAVA_HOME?

> -----Original Message-----
> From: Caldarale, Charles R [mailto:[hidden email]]
> Sent: Sunday, January 27, 2008 5:29 PM
> To: Tomcat Users List
> Subject: RE: Problems installing Tomcat 6 along existing
> Tomcat 5, and JAVA_HOME points to 1.4.2
>
> > From: Karr, David [mailto:[hidden email]]
> > Subject: Problems installing Tomcat 6 along existing Tomcat 5, and
> > JAVA_HOME points to 1.4.2
> >
> > This is ironic, as I have no intention of using the Windows
> service, I
> > just used the installed because it's more convenient than the zip
> > file.
>
> ??? How are you starting Tomcat, if you used the .exe
> download?  It can only be used to run Tomcat as a service,
> unless you conjure up your own startup/shutdown scripts.
>
> You really do need to download the .zip versions, since they
> come with the proper scripts, and only install Tomcat as a
> service if you run the appropriate script.  If you do choose
> to run the service installation script, you may then specify
> whatever display name you want for the service.
>
>  - 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 start a new topic, e-mail: [hidden email] To
> unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

db.getConnection() working but db.getConnection("username","password") not working for JNDI Connection

Amitava Chakraborty
Hi ALL,

I am using

 java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511
(SR2))

IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32
j9vmwi3223-2006050
4 (JIT enabled)
J9VM - 20060501_06428_lHdSMR
JIT  - 20060428_1800_r8
GC   - 20060501_AA)
JCL  - 20060511a

Tomcat 5.5.21

DataBase : Informix V 11.10   Informix JDBC Driver 3.10 JC1

During connecting through JNDI datasource , db.getConnection() is working
perfectly. But db.getConnection("myusername", "myPassword") is not working.
It is saying

java.lang.UnsupportedOperationException: Not supported by BasicDataSource

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:899)

But I checked the
 http://java.sun.com/j2se/1.5.0
/docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)

where it is saying getconnection method with username and password is
supported. I am using javax.sql.DataSource. I donot want to use my username
and password in the context.xml or server.xml for security issue. Please
help me how can I do it.

Thanks
Amitava


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: db.getConnection() working but db.getConnection("username","password") not working for JNDI Connection

David Smith-2
But if you take a look at the javadocs for BasicDataSource in
Commons-DBCP, you'll find the DBCP implementation of the DataSource
interface does not support the getConnection( user, password ) method.

http://commons.apache.org/dbcp/apidocs/index.html

--David

Amitava Chakraborty wrote:

> Hi ALL,
>
> I am using
>
>  java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511
> (SR2))
>
> IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32
> j9vmwi3223-2006050
> 4 (JIT enabled)
> J9VM - 20060501_06428_lHdSMR
> JIT  - 20060428_1800_r8
> GC   - 20060501_AA)
> JCL  - 20060511a
>
> Tomcat 5.5.21
>
> DataBase : Informix V 11.10   Informix JDBC Driver 3.10 JC1
>
> During connecting through JNDI datasource , db.getConnection() is working
> perfectly. But db.getConnection("myusername", "myPassword") is not working.
> It is saying
>
> java.lang.UnsupportedOperationException: Not supported by BasicDataSource
>
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:899)
>
> But I checked the
>  http://java.sun.com/j2se/1.5.0
> /docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)
>
> where it is saying getconnection method with username and password is
> supported. I am using javax.sql.DataSource. I donot want to use my username
> and password in the context.xml or server.xml for security issue. Please
> help me how can I do it.
>
> Thanks
> Amitava
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [hidden email]
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>  


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

Caldarale, Charles R
In reply to this post by dkarr
> From: Karr, David [mailto:[hidden email]]
> Subject: RE: Problems installing Tomcat 6 along existing
> Tomcat 5, and JAVA_HOME points to 1.4.2
>
> When I tried to run "tomcat6.exe" from the Tomcat6 zip file

Why are you trying to run tomcat6.exe?  That's for use *only* when
Tomcat is installed as a service, which you claim you don't want.

> So, how do I configure Tomcat 6 (and Tomcat 5, I guess) to use an
> alternative JVM besides JAVA_HOME?

You can't.  The whole point of JAVA_HOME (or JRE_HOME) is to tell Tomcat
where to find the desired JVM installation.  Fix your environment
variable.

 - 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 start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: db.getConnection() working but db.getConnection("username","password") notworking for JNDI Connection

Caldarale, Charles R
In reply to this post by Amitava Chakraborty
> From: Amitava Chakraborty [mailto:[hidden email]]
> Subject: db.getConnection() working but
> db.getConnection("username","password") notworking for JNDI Connection
>
> I am using javax.sql.DataSource.

No, you're using the connections pooling logic, which wrappers
javax.sql.DataSource.  If you're going to use container-managed
connection pooling, the container must be aware of the database
credentials, not the webapp.

> I donot want to use my username and password in the context.xml
> or server.xml for security issue.

A misplaced concern.  If your Tomcat and webapp configuration files
aren't secure, then you have many other problems to worry about than
just database access.

 - 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 start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

dkarr
In reply to this post by Caldarale, Charles R
> -----Original Message-----
> From: Caldarale, Charles R [mailto:[hidden email]]
> Sent: Monday, January 28, 2008 4:56 AM
> To: Tomcat Users List
> Subject: RE: Problems installing Tomcat 6 along existing
> Tomcat 5, and JAVA_HOME points to 1.4.2
>
> > From: Karr, David [mailto:[hidden email]]
> > Subject: RE: Problems installing Tomcat 6 along existing
> Tomcat 5, and
> > JAVA_HOME points to 1.4.2
> >
> > When I tried to run "tomcat6.exe" from the Tomcat6 zip file
>
> Why are you trying to run tomcat6.exe?  That's for use *only*
> when Tomcat is installed as a service, which you claim you don't want.
>
> > So, how do I configure Tomcat 6 (and Tomcat 5, I guess) to use an
> > alternative JVM besides JAVA_HOME?
>
> You can't.  The whole point of JAVA_HOME (or JRE_HOME) is to
> tell Tomcat where to find the desired JVM installation.  Fix
> your environment variable.

I cannot.  This is just research.  My current work requires JDK 1.4.2.
I find it hard to believe Tomcat is unable to be configured to allow
this.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

Peter Crowther
> From: Karr, David [mailto:[hidden email]]
> > From: Caldarale, Charles R [mailto:[hidden email]]
> > You can't.  The whole point of JAVA_HOME (or JRE_HOME) is to
> > tell Tomcat where to find the desired JVM installation.  Fix
> > your environment variable.
>
> I cannot.  This is just research.  My current work requires JDK 1.4.2.
> I find it hard to believe Tomcat is unable to be configured to allow
> this.

You have the non-service version of Tomcat, since you don't want the service version.  Therefore it's started from a script (shell script or batch file).  You can do what you want within that script.  Therefore you can set JAVA_HOME at the top of that script to a suitable JDK for Tomcat.  Therefore you can do this just for Tomcat, without affecting your current work.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

David Smith-2
In reply to this post by dkarr
You could edit the startup/shutdown scripts to locally define a
JAVA_HOME or JRE_HOME environment variable for the tomcat instance
only.  It's not pretty, but it works :-).

--David

Karr, David wrote:

>>-----Original Message-----
>>From: Caldarale, Charles R [mailto:[hidden email]]
>>Sent: Monday, January 28, 2008 4:56 AM
>>To: Tomcat Users List
>>Subject: RE: Problems installing Tomcat 6 along existing
>>Tomcat 5, and JAVA_HOME points to 1.4.2
>>
>>    
>>
>>>From: Karr, David [mailto:[hidden email]]
>>>Subject: RE: Problems installing Tomcat 6 along existing
>>>      
>>>
>>Tomcat 5, and
>>    
>>
>>>JAVA_HOME points to 1.4.2
>>>
>>>When I tried to run "tomcat6.exe" from the Tomcat6 zip file
>>>      
>>>
>>Why are you trying to run tomcat6.exe?  That's for use *only*
>>when Tomcat is installed as a service, which you claim you don't want.
>>
>>    
>>
>>>So, how do I configure Tomcat 6 (and Tomcat 5, I guess) to use an
>>>alternative JVM besides JAVA_HOME?
>>>      
>>>
>>You can't.  The whole point of JAVA_HOME (or JRE_HOME) is to
>>tell Tomcat where to find the desired JVM installation.  Fix
>>your environment variable.
>>    
>>
>
>I cannot.  This is just research.  My current work requires JDK 1.4.2.
>I find it hard to believe Tomcat is unable to be configured to allow
>this.
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: [hidden email]
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problems installing Tomcat 6 along existing Tomcat 5, and JAVA_HOME points to 1.4.2

dkarr
That worked fine, thanks. I had assumed it would be that simple, but the
response I was getting here made me think it was more complicated than
that.

> -----Original Message-----
> From: David Smith [mailto:[hidden email]]
> Sent: Monday, January 28, 2008 7:07 AM
> To: Tomcat Users List
> Subject: Re: Problems installing Tomcat 6 along existing
> Tomcat 5, and JAVA_HOME points to 1.4.2
>
> You could edit the startup/shutdown scripts to locally define
> a JAVA_HOME or JRE_HOME environment variable for the tomcat
> instance only.  It's not pretty, but it works :-).
>
> --David
>
> Karr, David wrote:
>
> >>-----Original Message-----
> >>From: Caldarale, Charles R [mailto:[hidden email]]
> >>Sent: Monday, January 28, 2008 4:56 AM
> >>To: Tomcat Users List
> >>Subject: RE: Problems installing Tomcat 6 along existing
> Tomcat 5, and
> >>JAVA_HOME points to 1.4.2
> >>
> >>    
> >>
> >>>From: Karr, David [mailto:[hidden email]]
> >>>Subject: RE: Problems installing Tomcat 6 along existing
> >>>      
> >>>
> >>Tomcat 5, and
> >>    
> >>
> >>>JAVA_HOME points to 1.4.2
> >>>
> >>>When I tried to run "tomcat6.exe" from the Tomcat6 zip file
> >>>      
> >>>
> >>Why are you trying to run tomcat6.exe?  That's for use *only* when
> >>Tomcat is installed as a service, which you claim you don't want.
> >>
> >>    
> >>
> >>>So, how do I configure Tomcat 6 (and Tomcat 5, I guess) to use an
> >>>alternative JVM besides JAVA_HOME?
> >>>      
> >>>
> >>You can't.  The whole point of JAVA_HOME (or JRE_HOME) is to tell
> >>Tomcat where to find the desired JVM installation.  Fix your
> >>environment variable.
> >>    
> >>
> >
> >I cannot.  This is just research.  My current work requires
> JDK 1.4.2.
> >I find it hard to believe Tomcat is unable to be configured to allow
> >this.
> >
> >---------------------------------------------------------------------
> >To start a new topic, e-mail: [hidden email] To
> unsubscribe,
> >e-mail: [hidden email]
> >For additional commands, e-mail: [hidden email]
> >
> >  
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [hidden email] To
> unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]