Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > "unable to locate a login configuration" running tomcat as a service

Reply
Thread Tools

"unable to locate a login configuration" running tomcat as a service

 
 
Andy Fish
Guest
Posts: n/a
 
      12-03-2003
Hi,

My servlet (running on Win2000) uses a login config file specified in
%JAVA_HOME%/jre/lib/security/java.security:

login.config.url.1=file:/C:/Program Files/yadda yadda.../mylogin.cfg

I am using Tomcat 4.1. and Java 1.4.2. Everything works fine when I run
tomcat in a command window, but when I try to use the tomcat service, I get

java.lang.SecurityException: Unable to locate a login configuration

as soon as I try to do a JAAS authentication. I guess there must be
something different in the environment, but I've checked the environment
variables, and I'm running it as the same user (local administrator account)

Any ideas?

Andy


 
Reply With Quote
 
 
 
 
Andy Fish
Guest
Posts: n/a
 
      12-03-2003
Found it !!!

Looks like when you install the SDK you get 2 different installations of the
JRE in different places. I'd installed the SDK under c:\j2sdk1_4_2_02 and
set JAVA_HOME to be c:\j2sdk1_4_2_0

however, in the registry enties for the service
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servi ces\Apache Tomcat
4.1\Parameters) I found

JVM Library = C:\Program Files\Java\j2re1.4.2_02\bin\client\jvm.dll

so it looks like the service is not using my JAVA_HOME variable - Presumably
it's inferring JAVA_HOME from the location of the JVM DLL. Copying the
java.security file to C:\Program Files\Java\j2re1.4.2_02\lib\security causes
it to be picked up OK

Andy

"Andy Fish" <(E-Mail Removed)> wrote in message
news:9qizb.18232$(E-Mail Removed)...
> Hi,
>
> My servlet (running on Win2000) uses a login config file specified in
> %JAVA_HOME%/jre/lib/security/java.security:
>
> login.config.url.1=file:/C:/Program Files/yadda yadda.../mylogin.cfg
>
> I am using Tomcat 4.1. and Java 1.4.2. Everything works fine when I run
> tomcat in a command window, but when I try to use the tomcat service, I

get
>
> java.lang.SecurityException: Unable to locate a login configuration
>
> as soon as I try to do a JAAS authentication. I guess there must be
> something different in the environment, but I've checked the environment
> variables, and I'm running it as the same user (local administrator

account)
>
> Any ideas?
>
> Andy
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best service to locate foxyever Software 0 03-15-2011 05:56 PM
tomcat bin/catalina.sh stop and tomcat is still running gavino Java 0 10-29-2006 12:06 AM
Tomcat question - running tomcat webapp from root Sean Berry Java 3 12-19-2005 07:19 PM
Problem with Tomcat Service when Tomcat Installation pathname has double byte characters Rakesh Pandit Java 0 07-12-2005 06:25 AM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM



Advertisments