Hi all,
  I am running JAAS based security model with JBoss.
 
 I use SecurityAssociation.getPrincipal() to get the principal object, it works find until I re-deploy my project

The following is my code and error message

Code:
        Principal principal = SecurityAssociation.getPrincipal();
        String name = principal.getName();

Error message:
 
java.lang.NullPointerException: [Service]       at
com.bridgewatersystems.netprofile.middleware.OrganizationEntity.<init>(OrganizationEntity.java:56)
[Service]       at comm.bridgewatersystems.netprofile.middleware.ServiceBean.getRootOrganization(ServiceBean.java:350)
[Service]       at java.lang.reflect.Method.invoke(Native Method)
[Service]       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472)
[Service]       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
[Service]       at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[Service]       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:458)
[Service]       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[Service]       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
[Service]       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[Service]       at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
[Service]       at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
[Service]       at java.lang.reflect.Method.invoke(Native Method)
[Service]       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[Service]       at sun.rmi.transport.Transport$1.run(Transport.java:142)
[Service]       at java.security.AccessController.doPrivileged(NativeMethod)
[Service]       at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[Service]       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[Service]       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[Service]       at java.lang.Thread.run(Thread.java:484)
 

Does this mean I have to restart Jboss server each time I deploy my project?

Thanks very much

Wei

Reply via email to