6 Replies Latest reply on Aug 10, 2005 2:39 AM by hakim55

    has anyone managed to run the program in the top entry of ja

    hakim55

      hi all colleagues

      if you could every managed to run the jaas.howto by the author Scott.Stark.
      the entry on top.

      please kindly send me the zipped file.

      I have worked so hard to run but in vain.

      must be slight error.

      email : alhakim55 at yahoo.com

      thanks alot

        • 1. Re: has anyone managed to run the program in the top entry o
          niwhsa

          ITs more for reference. What problem are you facing excatly?

          • 2. Re: has anyone managed to run the program in the top entry o
            hakim55

            thanks a lot for reply.

            the program has not been downloaded with tree file structure but as flat folder so what is to keep in which dir.

            I have tried a variety of options so let me know anyone that runs the program. that is why I wanted zipped to me.

            it compiles, deploys successfully but it asks for proper configuration which is not clear to me.

            thanks a lot again

            • 3. Re: has anyone managed to run the program in the top entry o
              niwhsa

              please provide the o/p or stack trace etc etc

              • 4. Re: has anyone managed to run the program in the top entry o
                hakim55


                first of all : tell me if this is the right file structrue


                META-INF
                ³ application.xml
                ³ jboss.xml
                ³ ejb-jar.xml
                ³
                session
                ³ PrivateSessionBean.java
                ³ PublicSessionBean.java
                ³ Session.java
                ³ SessionHome.java
                ³ JaasLoginFilter.java
                ³
                properties
                ³ roles.properties
                ³ users.properties
                ³ example2.properties
                ³ example1.properties
                ³
                client
                ³ SessionClient.java
                ³ BuildDatabase.java
                ³
                conf
                server_auth.conf
                server_auth.xml

                second is the error is in the client only server is fine so far :

                H:\06_05_05\My_Teaching\Programming\Java_Group\EIB\Security\Using_JBoss\Ex_3 Not
                done org_Test\EJB>set CLASSPATH=build;D:\Java_Group\jboss-4.0.0\client\concurre
                nt.jar;D:\Java_Group\jboss-4.0.0\client\jboss-j2ee.jar;D:\Java_Group\jboss-4.0.0
                \client\jbossall-client.jar;D:\Java_Group\jboss-4.0.0\client\jnet.jar;

                H:\06_05_05\My_Teaching\Programming\Java_Group\EIB\Security\Using_JBoss\Ex_3 Not
                done org_Test\EJB>java org.jboss.docs.jaas.howto.SessionClient EchoUser bismih
                i example
                +++ Running SessionClient with username=EchoUser, password=bismihi, example=exam
                ple
                Exception in thread "main" java.lang.SecurityException: Unable to locate a login
                configuration
                at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
                orAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
                onstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
                at java.lang.Class.newInstance0(Class.java:306)
                at java.lang.Class.newInstance(Class.java:259)
                at javax.security.auth.login.Configuration$3.run(Configuration.java:221)

                at java.security.AccessController.doPrivileged(Native Method)
                at javax.security.auth.login.Configuration.getConfiguration(Configuratio
                n.java:215)
                at javax.security.auth.login.LoginContext$1.run(LoginContext.java:170)
                at java.security.AccessController.doPrivileged(Native Method)
                at javax.security.auth.login.LoginContext.init(LoginContext.java:167)
                at javax.security.auth.login.LoginContext.(LoginContext.java:404)
                at org.jboss.docs.jaas.howto.SessionClient.main(SessionClient.java:69)
                Caused by: java.io.IOException: Unable to locate a login configuration
                at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
                at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:95)
                ... 14 more:

                • 5. Re: has anyone managed to run the program in the top entry o
                  niwhsa

                  Seems like you dont ahve a auth.conf file for your client application. Try providing the system property -D while calling java as follows.


                  -Djava.security.auth.login.config=${full_path_to_auth.conf}


                  There is a more detailed thread on this available in the same forum.

                  http://www.jboss.com/index.html?module=bb&op=viewtopic&t=66605



                  • 6. Re: has anyone managed to run the program in the top entry o
                    hakim55

                    thanks but I think I have the right path for the config.
                    the error now is example1 and example2 are not found.

                    clearly jboss has no example1 at all in the example so even when using example2 as a parameter it says not found?

                    thanks really a lot but I seem to have reached to the final state of the running.


                    the arror is in the client file