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

A

Andy Fish

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
 
A

Andy Fish

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top