Thanks Raja05

Thank you for putting me on the right path.  By using currentThread() I was 
able to resolve my immediate problem.

Maybe you can answer another question that I have with this deployment.  As I 
described above I have the Duke's Bank with 1 EBJ project and 2 web app 
projects.  I have added a new web project that is why there are 2 web apps and 
not one.  My intention is to call an EJB from my new web app in the EJB 
project.  I used the Duke's Bank web app project as a model.  The main 
difference Duke's Bank web project and my web app project is that I want to 
have a back end java class call an EJB with generating any JSP code.  So the 
problem that I'm running into is that when the call to the EJB is made JBoss 
can not locate the users.properties file.  Now I have placed the 
users.properties  file in the WEB-INF/classes dir of my web app, and still the 
same problem.  Also, I do not have code in my web app that authenticates the 
user (do I absolutely need it?), and I also tried to make the  
org.jboss.security.ClientLoginModule optional in the config files.  Is there 
any easy way to allow the web module not be authenticated before calling the 
EJBs? If authentication is required how is it done? Can it be done with config 
files, or is it done with java code, or both?

Any suggestions?  Below is a JBoss error message:

09:34:58,796 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role 
files
java.io.IOException: No properties file: users.properties or defaults: 
defaultUsers.properties found
        at org.jboss.security.auth.spi.Util.loadProperties(Util.java:249)
        at 
org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:164)
        at 
org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:111)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
        at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
        at 
org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:483)
        at 
org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:425)
        at 
org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:251)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:180)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:106)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
        at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:127)
        at 
org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
        at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
        at 
org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
        at org.jboss.ejb.Container.invoke(Container.java:894)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at 
org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
        at 
org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
        at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
        at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
        at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
        at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
        at $Proxy79.create(Unknown Source)
        at com.itgp.bank.DataModel.getAccounts(DataModel.java:152)


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3897396#3897396

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3897396


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to