[jboss-user] [Security & JAAS/JBoss] - Re: ExtendedManagedObjectAdvisor returns null getMethodInfo

ugge do-not-reply at jboss.com
Wed Feb 4 11:38:00 EST 2009


login-config.xml
<application-policy name="Domain">
		
			<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required">
				<module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
				<module-option name="java.naming.provider.url">ldap://host:389/</module-option>
				<module-option name="java.naming.security.authentication">simple</module-option>
				<module-option name="principalDNPrefix">cn=</module-option>
				<module-option name="principalDNSuffix">...</module-option>
				<module-option name="uidAttributeID">roleOccupant</module-option>
				<module-option name="matchOnUserDN">true</module-option>
				<module-option name="rolesCtxDN">...</module-option>
				<module-option name="roleAttributeID">cn</module-option>
			</login-module>
		
	</application-policy>




@Stateless
@SecurityDomain(value="Domain")
@RolesAllowed(value={"Role1", "Role2"})
@DeclareRoles(value={"Role1", "Role2"})
@PermitAll
public class MyEJB .... {

}


Subject.doAs(mySubject, new PrivilegedAction() {

			@Override
			public Object run() {
			   //do some calls to the MyEJB
			}
			
		});



java.lang.NullPointerException
	at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:444)
	at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
	at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
	at org.jboss.remoting.Client.invoke(Client.java:1634)
	at org.jboss.remoting.Client.invoke(Client.java:548)
	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
  ...
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:337)
	.....

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

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



More information about the jboss-user mailing list