3 Replies Latest reply on Feb 14, 2009 5:45 AM by Ugur Dincer

    ExtendedManagedObjectAdvisor returns null getMethodInfo

    Ugur Dincer Newbie
        • 1. Re: ExtendedManagedObjectAdvisor returns null getMethodInfo
          jaikiran pai Master

          Please provide more details about your application including relevant code, logs and any exception stacktrace. You can also have a look at the "security" tutorial in EJB3 tutorials for an example usage in JBossAS5 http://www.jboss.org/jbossejb3/docs/

          • 2. Re: ExtendedManagedObjectAdvisor returns null getMethodInfo
            Ugur Dincer Newbie

            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)
            .....

            • 3. Re: ExtendedManagedObjectAdvisor returns null getMethodInfo
              Ugur Dincer Newbie

              It was some classLoading problems for some reason. Another found issue is that LdapExtLoginModule does not accept provided credentials for some reason, but LdapLoginModule works fine.