title: User <anonymous> has insufficient permission to access EJB
body: <p>I'm hoping that someone has encountered this error before in weblogic.</p>
  
  <p>I've setup a remote EJB call using 2-way SSL, RMI over T3S .  The following code runs perfectly:</p>
  
  <pre><code>Environment env = new Environment();          
  env.setProviderUrl("t3s://localhost:7002");
  env.setSecurityPrincipal("");
  Context ctx = env.getContext();
  IMyEJB bean = (IMyEJB)ctx.lookup("java:global.ejb.MyEJB!com.sample.IMyEJB");
             System.out.println(bean.getMessage());
  </code></pre>
  
  <p>but when I comment out env.setSecurityPrincipal(""); I get the exception, does anyone know why?</p>
  
  <pre><code>Exception in thread "main" javax.ejb.EJBAccessException: [EJB:010160]Security violation: User &lt;anonymous&gt; has insufficient permission to access EJB type=&lt;ejb&gt;, application=ejb, module=ejb.jar, ejb=MyEJB, method=getMessage, methodInterface=Remote, signature={}.
  at weblogic.ejb.container.internal.MethodDescriptor.checkMethodPermissionsBusiness(MethodDescriptor.java:201)
  at weblogic.ejb.container.internal.BaseRemoteObject.__WL_preInvoke(BaseRemoteObject.java:118)
  at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:23)
  at com.sample.MyEJB_lkq74w_IMyEJBImpl.getMessage(Unknown Source)
  at com.sample.MyEJB_lkq74w_IMyEJBImpl_WLSkel.invoke(Unknown Source)
  at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:701)
  at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:231)
  at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:527)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
  at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:523)
  at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
  </code></pre>