users@glassfish.java.net

org.omg.CORBA.NO_PERMISSION

From: <glassfish_at_javadesktop.org>
Date: Wed, 06 Jan 2010 13:49:29 PST

Hi
I have a ejb application that deployed on GlassFish 2.1.1, with the following ejb-jar and sun-ejb-jar xml files.
When I run my client from another JVM, it throws the attached exception.
 
Any Idea about that?
Thanks
 
I already have defined the JRunner in security> realms> file in GlassFish
The user is :JRunner
Password: JRunner
Group: JRunner

I am using these parameters when I run my client

  -Dorg.omg.CORBA.ORBInitialHost=localhost
  -Dorg.omg.CORBA.ORBInitialPort=3700
  -Djava.naming.security.principal=JRunner
  -Djava.naming.security.credentials=JRunner
  
 and my client code is something like that:
 
  Properties jndiProperties = new Properties();
  jndiProperties.put(Context.SECURITY_PRINCIPAL, role);
  jndiProperties.put(Context.SECURITY_CREDENTIALS, password);
  Context ctx = new InitialContext(jndiProperties);
  Object obj = ctx.lookup("MySystemExecute");
-----------
<sun-ejb-jar>
        <security-role-mapping>
                <role-name>JRunner</role-name>
                <principal-name>JRunner</principal-name>
                <group-name>JRunner</group-name>
        </security-role-mapping>
        <ejb>
            <ejb-name>SystemExecuteBean</ejb-name>
            <jndi-name>MySystemExecute</jndi-name>
        </ejb>
    </enterprise-beans>
</sun-ejb-jar>
------
<ejb-jar>
       <session>
            <display-name>SystemExecuteBean</display-name>
            <ejb-name>SystemExecuteBean</ejb-name>
            <home>com.my.j2ee.ejb.SystemExecuteHome</home>
            <remote>com.my.j2ee.ejb.SystemExecute</remote>
            <ejb-class>com.my.j2ee.ejb.SystemExecuteBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
            <security-identity>
                <use-caller-identity/>
            </security-identity>
        </session>
        
 
    <assembly-descriptor>
                       
            <security-role>
                     <description>JRunner Role</description>
                    <role-name>JRunner</role-name>
            </security-role>
            
            <method-permission>
                        <role-name>JRunner</role-name>
                    <method>
                            <ejb-name>SystemExecuteBean</ejb-name>
                            <method-name>*</method-name>
                    </method>
            </method-permission>
              
        <container-transaction>
            <method>
                <ejb-name>SystemExecuteBean</ejb-name>
                <method-name>*</method-name>
            </method>
            <trans-attribute>NotSupported</trans-attribute>
        </container-transaction>
         
    </assembly-descriptor>
</ejb-jar>

------------------------------------------------------
Failure Message: java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
        org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
        at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407
        at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
        at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
        at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No

Thanks for any help
[Message sent by forum member 'behrangx' (behrang13_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=379116