dev@glassfish.java.net

Getting security error during deployment of MEJB in cluster

From: Naman Mehta <Naman.Mehta_at_Sun.COM>
Date: Tue, 17 Aug 2010 14:58:30 +0530

hi all,

Till yesterday, it was working fine. But from today morning I am getting
error during deployment of MEJB in cluster environment.

*When the code(MEJBNamingObjectProxy.java) is trying to deploy MEJB gets
below error:*

[#|2010-08-17T14:45:37.164+0530|SEVERE|glassfish3.1|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=17;_ThreadName=Thread-1;|iiop.secmechanism_exception
com.sun.enterprise.iiop.security.SecurityMechanismException: Cannot
propagate username/password required by target when using run as identity
     at
com.sun.enterprise.iiop.security.SecurityMechanismSelector.propagateIdentity(SecurityMechanismSelector.java:645)
     at
com.sun.enterprise.iiop.security.SecurityMechanismSelector.getSecurityContextForWebOrEJB(SecurityMechanismSelector.java:541)
     at
com.sun.enterprise.iiop.security.SecurityMechanismSelector.selectSecurityContext(SecurityMechanismSelector.java:504)
     at
com.sun.enterprise.iiop.security.SecurityContextUtil.getSecurityContext(SecurityContextUtil.java:121)
     at
com.sun.enterprise.iiop.security.SecClientRequestInterceptor.send_request(SecClientRequestInterceptor.java:269)
     at
com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeClientInterceptorStartingPoint(InterceptorInvoker.java:268)
     at
com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeClientPIStartingPoint(PIHandlerImpl.java:381)
     at
com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:297)
     at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:194)
     at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:361)
     at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
     at
org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
     at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:472)
     at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:523)
     at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:501)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at
com.sun.enterprise.naming.util.IIOPObjectFactory.getObjectInstance(IIOPObjectFactory.java:79)
     at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
     at
com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:134)
     at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:510)
     at
org.glassfish.kernel.javaee.MEJBNamingObjectProxy.create(MEJBNamingObjectProxy.java:93)
     at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:513)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at manager.ManagerServlet.createMejb(ManagerServlet.java:132)
     at manager.ManagerServlet.access$000(ManagerServlet.java:36)
     at manager.ManagerServlet$1.run(ManagerServlet.java:62)
     at java.security.AccessController.doPrivileged(Native Method)
     at manager.ManagerServlet.processRequest(ManagerServlet.java:59)
     at manager.ManagerServlet.doGet(ManagerServlet.java:88)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
     at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1518)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:171)
     at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:651)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:591)
     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
     at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:87)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
     at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:321)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:222)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:166)
     at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:721)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1014)
     at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:220)
     at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
     at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
     at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
     at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
     at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
     at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
     at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
     at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
     at java.lang.Thread.run(Thread.java:619)
|#]

*Code snapshot in which error is coming:*

private void deployMEJB() throws IOException {
         _logger.info("Loading MEJB app on JNDI look up");
         ServerContext serverContext =
habitat.getComponent(ServerContext.class);
         File mejbArchive = new File(serverContext.getInstallRoot(),
                 "lib/install/applications/mejb.jar");
         DeployCommandParameters deployParams =
                 new DeployCommandParameters(mejbArchive);
         String targetName = habitat.getComponent(Server.class,
ServerEnvironment.DEFAULT_INSTANCE_NAME).getName();
         deployParams.target = targetName;
         deployParams.name = "mejb";
         ActionReport report = habitat.getComponent(ActionReport.class,
"plain");
         Deployment deployment = habitat.getComponent(Deployment.class);
         ExtendedDeploymentContext dc = deployment.getBuilder(_logger,
deployParams, report).source(mejbArchive).build();
         deployment.deploy(dc);

         if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
             throw new RuntimeException("Failed to deploy MEJB app: " +
                     report.getFailureCause());
         }
     }

Any idea on this?

Regards,
Naman