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

Discussion in 'Java' started by Andy Fish, Dec 3, 2003.

  1. Andy Fish

    Andy Fish Guest

    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
     
    Andy Fish, Dec 3, 2003
    #1
    1. Advertising

  2. Andy Fish

    Andy Fish Guest

    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

    "Andy Fish" <> wrote in message
    news:9qizb.18232$...
    > 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
    >
    >
     
    Andy Fish, Dec 3, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hiranya Samarasekera

    running tomcat as a service in redhat linux

    Hiranya Samarasekera, Aug 20, 2003, in forum: Java
    Replies:
    0
    Views:
    550
    Hiranya Samarasekera
    Aug 20, 2003
  2. hocho888
    Replies:
    1
    Views:
    650
  3. Rakesh Pandit
    Replies:
    0
    Views:
    506
    Rakesh Pandit
    Jul 12, 2005
  4. Sean Berry
    Replies:
    3
    Views:
    4,557
    Tim Terry
    Dec 19, 2005
  5. gavino
    Replies:
    0
    Views:
    1,297
    gavino
    Oct 29, 2006
Loading...

Share This Page