Hi, I am new to Java programming. I tried to access a secure ejb from a remote java client but I am getting NO PERMISSIOn error. My code is below:

java.util.Properties env = new java.util.Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://nagpr03-oel01.ca.com:2809");
env.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");
Context ctx = new InitialContext(env);
ctx.lookup("");
LoginContext lc = new LoginContext("WSLogin", new WSCallbackHandlerImpl("user1","user1"));
lc.login();
javax.security.auth.Subject ctxSubject = lc.getSubject();
System.out.println("User: " + ctxSubject.getPrincipals());
WSSubject.setRunAsSubject(ctxSubject);
System.setSecurityManager(new RMISecurityManager());

PrototypeServiceHome testAppHome = (PrototypeServiceHome) ctx.lookup("JaccPrototypeService");
PrototypeService testAppObj = (PrototypeService) testAppHome.create();

Accesing the "create" method of ejb giving NO_Permission error.
The exact error code is :

com.ibm.CORBA.iiop.ClientDelegate@1b6101e invoke:807 P=566422:O=0:CT ORBRas[default] Received SystemException org.omg.CORBA.NO_PERMISSION:
>> SERVER (id=4773e3aa, host=NAGPR03-OEL01.ca.com) TRACE START:
>> org.omg.CORBA.NO_PERMISSION: java.rmi.AccessException: ; nested exception is:
com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)JaccPrototypeService create:2 JACC Authorization failed for bean: PrototypeService vmcid: 0x0 minor code: 0 completed: No
>> at com.ibm.ws.security.core.SecurityCollaborator.perf ormAuthorization(SecurityCollaborator.java:490)
>> at com.ibm.ws.security.core.EJSSecurityCollaborator.p reInvoke(EJSSecurityCollaborator.java:209)
>> at com.ibm.ejs.container.EJSContainer.preInvokeForSta telessSessionCreate(EJSContainer.java:3612)
>> at com.ibm.ejs.container.EJSContainer.preInvoke(EJSCo ntainer.java:2833)
>> at com.ca.siteminder.asa.testapp.ejb.EJSRemoteStatele ssPrototypeServiceHome_5a57290e.create(Unknown Source)
>> at com.ca.siteminder.asa.testapp.ejb._EJSRemoteStatel essPrototypeServiceHome_5a57290e_Tie.create(_EJSRe moteStatelessPrototypeServiceHome_5a57290e_Tie.jav a:161)
>> at com.ca.siteminder.asa.testapp.ejb._EJSRemoteStatel essPrototypeServiceHome_5a57290e_Tie._invoke(_EJSR emoteStatelessPrototypeServiceHome_5a57290e_Tie.ja va:86)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)
>> SERVER (id=4773e3aa, host=NAGPR03-OEL01.ca.com) TRACE END.
vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.ibm.rmi.iiop.ReplyMessage._getSystemException( ReplyMessage.java:241)
at com.ibm.rmi.iiop.ReplyMessage.getSystemException(R eplyMessage.java:189)
at com.ibm.rmi.iiop.ClientResponseImpl.getSystemExcep tion(ClientResponseImpl.java:232)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:552)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1150)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDele gate.java:778)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1180)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at com.ca.siteminder.asa.testapp.ejb._PrototypeServic eHome_Stub.create(_PrototypeServiceHome_Stub.java: 215)
at TestClass.main(TestClass.java:59)
, p1=



I executed the above with the following options:

java -cp C:\ibmorb.jar;C:\ibmorbapi.jar;C:\ws_runtime.jar;C :\com.ibm.ws.webservices.thinclient_6.1.0.jar;C:\A saTestApp_EJBP.jar;. -Djava.security.auth.login.config=C:\wsjaas_client. conf -Dcom.ibm.CORBA.ConfigURL=file:C:\sas.client.props -Dcom.ibm.SSL.ConfigURL=file:C:\ssl.client.props TestClass

Can anyone let me know what is the probelm with my code?