You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Turner, John" <JT...@AAS.com> on 2002/06/27 17:06:01 UTC

RE: Connection to Oracle database doesn't work when Tomcat is a s ervice

When the service runs, it does not run under the same permission authority
as it does when you execute startup.bat.  I'm not familiar with Oracle
authentication, but it sounds like the user that the service runs under
(normally System) doesn't have permission to make the connection.

John Turner
jturner@NOSPAM.aas.com


-----Original Message-----
From: Luciano Belotto [mailto:luciano@traxsoftware.com]
Sent: Thursday, June 27, 2002 11:02 AM
To: 'Tomcat Users List'
Cc: 'Ramon Lewis'
Subject: Connection to Oracle database doesn't work when Tomcat is a
service


I'm new to this list and to using Tomcat. Request help with this:

I setup TomCat 4 with my IIS 5.0 using the instructions on
http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html

For the most part everything works fine. My webpage traxusers.com still
works with IIS (iis runs the html) and TomCat runs the jsp pages I want.

the problem lies in running a jsp that connects to the database, but
only when I run Tomcat as a service.

If I run TomCat from the startup.bat, everything seems to go fine.

But when i have it running only as a service (setup with the
jk_nt_service.exe), the JSP pages themselves work fine, but the
connection to the database returns this error: java.sql.SQLException:
ORA-12640: Authentication adapter initialization failed  

Can anyone suggest/help on this, what should I look for

-Luciano


----------------------------------------------------------------------------
--



--
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: Connection to Oracle database doesn't work when Tomcat is a service

Posted by fva <ee...@maxiq.ro>.
User SYSTEM is not allowed (normally) to make network connections to the
outside world out of its own initiative.
This is my suggestion:

Create another user for the Tomcat service.
Make it a plain one.
Logon interactively and test Tomcat from command line.
Grant any additional privileges needed until Tomcat runs fnie from command
line and DB connection is OK.
You might have to add some elements to the path.
Add the "Run as a batch job" right (or something like that) to the user.
Edit Tomcat service properties and make it run under that user authority
(instead of default SYSTEM).

I guess that this should be the (approximate) path to solve your problem.

HTH,
Florin

----- Original Message -----
From: "Luciano Belotto" <lu...@traxsoftware.com>
To: "'Tomcat Users List'" <to...@jakarta.apache.org>
Sent: Thursday, June 27, 2002 07:34
Subject: RE: Connection to Oracle database doesn't work when Tomcat is a
service


> I see. Is there anyone who knows how this should be setup (Oracle
> authentication for System)? Or has had to set this up in order for
> Tomcat to run as a service and connect to database? maybe this questions
> is more appropriate in an Oracle forum
>
> -Luciano
>
> >
> > When the service runs, it does not run under the same
> > permission authority as it does when you execute startup.bat.
> >  I'm not familiar with Oracle authentication, but it sounds
> > like the user that the service runs under (normally System)
> > doesn't have permission to make the connection.
> >
> > John Turner
> > jturner@NOSPAM.aas.com
> >
> >
> > -----Original Message-----
> > From: Luciano Belotto [mailto:luciano@traxsoftware.com]
> > Sent: Thursday, June 27, 2002 11:02 AM
> > To: 'Tomcat Users List'
> > Cc: 'Ramon Lewis'
> > Subject: Connection to Oracle database doesn't work when
> > Tomcat is a service
> >
> >
> > I'm new to this list and to using Tomcat. Request help with this:
> >
> > I setup TomCat 4 with my IIS 5.0 using the instructions on
> http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html
>
> For the most part everything works fine. My webpage traxusers.com still
> works with IIS (iis runs the html) and TomCat runs the jsp pages I want.
>
> the problem lies in running a jsp that connects to the database, but
> only when I run Tomcat as a service.
>
> If I run TomCat from the startup.bat, everything seems to go fine.
>
> But when i have it running only as a service (setup with the
> jk_nt_service.exe), the JSP pages themselves work fine, but the
> connection to the database returns this error: java.sql.SQLException:
> ORA-12640: Authentication adapter initialization failed
>
> Can anyone suggest/help on this, what should I look for
>
> -Luciano
>
>
> ------------------------------------------------------------------------
> ----
> --
>
>
>
> --
> 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: IIS & Tomcat works on examples directory, but not on mine

Posted by Luciano Belotto <lu...@traxsoftware.com>.
Yes, if I goto http://trax_citrix:8080/Ramon/ and then
http://trax_citrix:8080/Ramon/test.jsp it processes it is a JSP
correctly. So I'm missing something in the IIS Redirector setup?


I believe all I did in the IIS setup was two things:
1) Setup a virtual directory called Jakarta and pointed it to the
directory C:\tomcat4\bin\native, which has that dll file

2) setup the ISAP filter in the Master Properties/WWW Service to point
to C:\tomcat4\bin\native\isapi_redirect.dll

thanks in advance for your help,

-Luciano

> -----Original Message-----
> From: Andrew Conrad [mailto:andrewconrad@msn.com]
> Sent: Thursday, June 27, 2002 5:55 PM
> To: 'Tomcat Users List'; luciano@traxsoftware.com
> Subject: RE: IIS & Tomcat works on examples directory, but not on mine
> 
> 
> Can you get them by going to http://localhost:8080/Ramon/ ?
> 
> If you can, it's a problem with your IIS Redirector setup,
> and if you can't it's a problem with your Tomcat Setup.  That 
> should be your first test.
> 
> Let me know
> 
> -Andrew
> 
> -----Original Message-----
> From: Luciano Belotto [mailto:luciano@traxsoftware.com]
> Sent: Thursday, June 27, 2002 5:45 PM
> To: 'Tomcat Users List'
> Subject: IIS & Tomcat works on examples directory, but not on mine
> 
> I've got IIS working on Tomcat good... Everything in the
> \examples directory (and subfolders) works great. But I 
> create a folder C:\Inetpub\wwwroot\users\Ramon, but the jsp 
> files under there are simply interpreted as regular html/txt 
> files. Can someone point me in the right direction
> 
> Here's the snipped of my server.xml file:
> - <!--  Tomcat Manager Context   -->
>   <Context path="/manager" docBase="manager" debug="0"
> privileged="true" />
> - <!--  Tomcat Manager Context for Ramon   -->
>   <Context path="/Ramon" docBase="C:\Inetpub\wwwroot\users\Ramon"
> debug="0" reloadable="true" crossContext="true" />
> - <!--  Tomcat Examples Context   -->
> - <Context path="/examples" docBase="examples" debug="0" 
> reloadable="true" crossContext="true">
>   <Logger className="org.apache.catalina.logger.FileLogger"
> 
> 
> 
> Here's my uriworkermap.properties file:
> #
> # Default worker to be used through our mappings
> #
> default.worker=ajp13
> 
> #
> # Sites to be redirected to Tomcat
> #
> *.jsp=$(default.worker)
> /examples=$(default.worker)
> /examples/*=$(default.worker)
> /Ramon=$(default.worker)
> /Ramon/*=$(default.worker)
> 
> 
> 
> 
> 
> -Luciano
> 
> 
> --------------------------------------------------------------
> ----------
> ------
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-> unsubscribe@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: IIS & Tomcat works on examples directory, but not on mine

Posted by Andrew Conrad <an...@msn.com>.
Can you get them by going to http://localhost:8080/Ramon/ ?

If you can, it's a problem with your IIS Redirector setup, and if you
can't it's a problem with your Tomcat Setup.  That should be your first
test.

Let me know

-Andrew

-----Original Message-----
From: Luciano Belotto [mailto:luciano@traxsoftware.com] 
Sent: Thursday, June 27, 2002 5:45 PM
To: 'Tomcat Users List'
Subject: IIS & Tomcat works on examples directory, but not on mine

I've got IIS working on Tomcat good... Everything in the \examples
directory (and subfolders) works great. But I create a folder
C:\Inetpub\wwwroot\users\Ramon, but the jsp files under there are simply
interpreted as regular html/txt files. Can someone point me in the right
direction

Here's the snipped of my server.xml file:
- <!--  Tomcat Manager Context   -->
  <Context path="/manager" docBase="manager" debug="0" privileged="true"
/>
- <!--  Tomcat Manager Context for Ramon   -->
  <Context path="/Ramon" docBase="C:\Inetpub\wwwroot\users\Ramon"
debug="0" reloadable="true" crossContext="true" />
- <!--  Tomcat Examples Context   -->
- <Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
  <Logger className="org.apache.catalina.logger.FileLogger"



Here's my uriworkermap.properties file:
#
# Default worker to be used through our mappings
#
default.worker=ajp13

#
# Sites to be redirected to Tomcat
#
*.jsp=$(default.worker)
/examples=$(default.worker)
/examples/*=$(default.worker)
/Ramon=$(default.worker)
/Ramon/*=$(default.worker)





-Luciano


------------------------------------------------------------------------
------



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


IIS & Tomcat works on examples directory, but not on mine

Posted by Luciano Belotto <lu...@traxsoftware.com>.
I've got IIS working on Tomcat good... Everything in the \examples
directory (and subfolders) works great. But I create a folder
C:\Inetpub\wwwroot\users\Ramon, but the jsp files under there are simply
interpreted as regular html/txt files. Can someone point me in the right
direction

Here's the snipped of my server.xml file:
- <!--  Tomcat Manager Context   --> 
  <Context path="/manager" docBase="manager" debug="0" privileged="true"
/> 
- <!--  Tomcat Manager Context for Ramon   --> 
  <Context path="/Ramon" docBase="C:\Inetpub\wwwroot\users\Ramon"
debug="0" reloadable="true" crossContext="true" /> 
- <!--  Tomcat Examples Context   --> 
- <Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
  <Logger className="org.apache.catalina.logger.FileLogger" 



Here's my uriworkermap.properties file:
#
# Default worker to be used through our mappings
#
default.worker=ajp13

#
# Sites to be redirected to Tomcat
#
*.jsp=$(default.worker)
/examples=$(default.worker)
/examples/*=$(default.worker)
/Ramon=$(default.worker)
/Ramon/*=$(default.worker)





-Luciano


------------------------------------------------------------------------------



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Connection to Oracle database doesn't work when Tomcat is a service

Posted by Luciano Belotto <lu...@traxsoftware.com>.
i tried (looked into) this first (since it was easiest)... and it
worked! I'll have an account just for the JK_NT_service.exe to use, and
it'll run under that.

thanks everyone,

-Luciano

 
> Here's how to tell if its your security priveldges.  Just 
> open up your Tomcat service in Service Manager and change the 
> permissions from Local System Account to your account and 
> password.  If your DB connections start to work, then you 
> know you have a security issue.  You will probably just have 
> to create a global account that Oracle recognizes.
> 
> -Andrew
> 
> 
> 
> -----Original Message-----
> From: Luciano Belotto [mailto:luciano@traxsoftware.com] 
> Sent: Thursday, June 27, 2002 12:34 PM
> To: 'Tomcat Users List'
> Subject: RE: Connection to Oracle database doesn't work when 
> Tomcat is a service
> 
> I see. Is there anyone who knows how this should be setup 
> (Oracle authentication for System)? Or has had to set this up 
> in order for Tomcat to run as a service and connect to 
> database? maybe this questions is more appropriate in an Oracle forum
> 
> -Luciano
> 
> >
> > When the service runs, it does not run under the same permission 
> > authority as it does when you execute startup.bat.  I'm not 
> familiar 
> > with Oracle authentication, but it sounds like the user that the 
> > service runs under (normally System) doesn't have 
> permission to make 
> > the connection.
> >
> > John Turner
> > jturner@NOSPAM.aas.com
> >
> >
> > -----Original Message-----
> > From: Luciano Belotto [mailto:luciano@traxsoftware.com]
> > Sent: Thursday, June 27, 2002 11:02 AM
> > To: 'Tomcat Users List'
> > Cc: 'Ramon Lewis'
> > Subject: Connection to Oracle database doesn't work when 
> Tomcat is a 
> > service
> >
> >
> > I'm new to this list and to using Tomcat. Request help with this:
> >
> > I setup TomCat 4 with my IIS 5.0 using the instructions on
> http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html
> 
> For the most part everything works fine. My webpage 
> traxusers.com still works with IIS (iis runs the html) and 
> TomCat runs the jsp pages I want.
> 
> the problem lies in running a jsp that connects to the 
> database, but only when I run Tomcat as a service.
> 
> If I run TomCat from the startup.bat, everything seems to go fine.
> 
> But when i have it running only as a service (setup with the 
> jk_nt_service.exe), the JSP pages themselves work fine, but 
> the connection to the database returns this error: 
> java.sql.SQLException:
> ORA-12640: Authentication adapter initialization failed
> 
> Can anyone suggest/help on this, what should I look for
> 
> -Luciano
> 
> 
> --------------------------------------------------------------
> ----------
> ----
> --
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 
> --------------------------------------------------------------
> ----------
> ------
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> unsubscribe@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: Connection to Oracle database doesn't work when Tomcat is a service

Posted by Andrew Conrad <an...@msn.com>.
Here's how to tell if its your security priveldges.  Just open up your
Tomcat service in Service Manager and change the permissions from Local
System Account to your account and password.  If your DB connections
start to work, then you know you have a security issue.  You will
probably just have to create a global account that Oracle recognizes.

-Andrew



-----Original Message-----
From: Luciano Belotto [mailto:luciano@traxsoftware.com] 
Sent: Thursday, June 27, 2002 12:34 PM
To: 'Tomcat Users List'
Subject: RE: Connection to Oracle database doesn't work when Tomcat is a
service

I see. Is there anyone who knows how this should be setup (Oracle
authentication for System)? Or has had to set this up in order for
Tomcat to run as a service and connect to database? maybe this questions
is more appropriate in an Oracle forum

-Luciano

>
> When the service runs, it does not run under the same
> permission authority as it does when you execute startup.bat.
>  I'm not familiar with Oracle authentication, but it sounds
> like the user that the service runs under (normally System)
> doesn't have permission to make the connection.
>
> John Turner
> jturner@NOSPAM.aas.com
>
>
> -----Original Message-----
> From: Luciano Belotto [mailto:luciano@traxsoftware.com]
> Sent: Thursday, June 27, 2002 11:02 AM
> To: 'Tomcat Users List'
> Cc: 'Ramon Lewis'
> Subject: Connection to Oracle database doesn't work when
> Tomcat is a service
>
>
> I'm new to this list and to using Tomcat. Request help with this:
>
> I setup TomCat 4 with my IIS 5.0 using the instructions on
http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html

For the most part everything works fine. My webpage traxusers.com still
works with IIS (iis runs the html) and TomCat runs the jsp pages I want.

the problem lies in running a jsp that connects to the database, but
only when I run Tomcat as a service.

If I run TomCat from the startup.bat, everything seems to go fine.

But when i have it running only as a service (setup with the
jk_nt_service.exe), the JSP pages themselves work fine, but the
connection to the database returns this error: java.sql.SQLException:
ORA-12640: Authentication adapter initialization failed

Can anyone suggest/help on this, what should I look for

-Luciano


------------------------------------------------------------------------
----
--



--
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: Connection to Oracle database doesn't work when Tomcat is a service

Posted by Luciano Belotto <lu...@traxsoftware.com>.
I see. Is there anyone who knows how this should be setup (Oracle
authentication for System)? Or has had to set this up in order for
Tomcat to run as a service and connect to database? maybe this questions
is more appropriate in an Oracle forum

-Luciano

> 
> When the service runs, it does not run under the same 
> permission authority as it does when you execute startup.bat. 
>  I'm not familiar with Oracle authentication, but it sounds 
> like the user that the service runs under (normally System) 
> doesn't have permission to make the connection.
> 
> John Turner
> jturner@NOSPAM.aas.com
> 
> 
> -----Original Message-----
> From: Luciano Belotto [mailto:luciano@traxsoftware.com]
> Sent: Thursday, June 27, 2002 11:02 AM
> To: 'Tomcat Users List'
> Cc: 'Ramon Lewis'
> Subject: Connection to Oracle database doesn't work when 
> Tomcat is a service
> 
> 
> I'm new to this list and to using Tomcat. Request help with this:
> 
> I setup TomCat 4 with my IIS 5.0 using the instructions on 
http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html

For the most part everything works fine. My webpage traxusers.com still
works with IIS (iis runs the html) and TomCat runs the jsp pages I want.

the problem lies in running a jsp that connects to the database, but
only when I run Tomcat as a service.

If I run TomCat from the startup.bat, everything seems to go fine.

But when i have it running only as a service (setup with the
jk_nt_service.exe), the JSP pages themselves work fine, but the
connection to the database returns this error: java.sql.SQLException:
ORA-12640: Authentication adapter initialization failed  

Can anyone suggest/help on this, what should I look for

-Luciano


------------------------------------------------------------------------
----
--



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