3 Replies Latest reply on Dec 6, 2001 3:06 AM by Erdal

    JAAS Problem

    Erdal Newbie

      Hi,

      I trying the JAAS-Example from JBoss.
      I first downlaod jakarta-ant-1.4. It works fine.
      I second download and installing JBoss-2.4.4_Tomcat-3.2.4-beta on my win2000 machine. So I do all things
      so it described by the Tutorial. It works fine.
      So I try to test the first example:
      c:\jaas>ant example-test0
      I become a Exception like this:
      compile:
      client-test0:
      [java] +++ Running SessionClient with username=scott, password=echoman, exampel=exmple1
      [java]Created LoginContext
      [java] java.lang.ClassNotFoundException: org.apache.log4j.Priority
      [java] at java.net.URLClassLoader$1.run(URLClassLoader.java.200)
      ..... and so on
      The subject what I don't understand is why the ClassLoasder don't find log4j.jar file in lib/ext from JBoss.

      Can someone help me.

      Thanks a lot
      erdkal

        • 1. Re: JAAS Problem
          Scott Stark Master

          You have to include the log4j.jar in the client classpath for 2.4.4. Add log4j to the base.path_23 setting:












          and the example works.

          jaas 560>ant example1-test0
          Buildfile: build.xml

          example1-test0:

          validate:

          fail_if_not_valid:

          init:
          [echo] Using jboss.dist=G:/JBoss-2.4.4_Tomcat-3.2.4-beta/jboss
          [echo] Using classpath=G:\JBoss-2.4.4_Tomcat-3.2.4-beta\jboss\client\jboss-
          j2ee.jar;G:\JBoss-2.4.4_Tomcat-3.2.4-beta\jboss\client\jaas.jar;G:\JBoss-2.4.4_T
          omcat-3.2.4-beta\jboss\client\jbosssx-client.jar;G:\JBoss-2.4.4_Tomcat-3.2.4-bet
          a\jboss\client\jboss-client.jar;G:\JBoss-2.4.4_Tomcat-3.2.4-beta\jboss\client\jn
          p-client.jar;G:\JBoss-2.4.4_Tomcat-3.2.4-beta\jboss\client\log4j.jar;G:\JBoss-2.
          4.4_Tomcat-3.2.4-beta\tomcat\lib\servlet.jar;G:\tmp\jaas\build\classes

          compile:

          client-test0:
          [java] +++ Running SessionClient with username=scott, password=echoman, exa
          mple=example1
          [java] Created LoginContext
          [java] Found StatelessSessionHome
          [java] Created StatelessSession
          [java] Bean.echo('Hello') -> Hello
          [java] Found StatefulSessionHome
          [java] Created StatefulSession
          [java] Bean.noop() called
          [java] Bean.echo('Hello') -> Hello

          BUILD SUCCESSFUL

          Total time: 3 seconds
          jaas 561>

          • 2. Re: JAAS Problem
            Erdal Newbie

            Hi starksm,
            first thanks for your reply.
            What do you mean with "Add log4j to the base.path_23 setting" ?
            Where I must add this settings ?
            Can you describe where I must make changes and addings.

            Please send me second reply.

            erdkal

            • 3. Re: JAAS Problem
              Erdal Newbie

              Hi starksm,
              Thanks a lot. It works. Thank you.
              Can you tell, how you find out that this setting
              must be done, before it works.
              I read the jboss documentation, but don't find this.

              But it works, don't touch a running system.

              erdkal