This discussion is archived
3 Replies Latest reply: Jun 7, 2012 11:19 AM by reaper1022 RSS

Problem creating dummy orb: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor203

504153 Newbie
Currently Being Moderated
Created a simple SLSB 3.1 with ejb-jar.xml and weblogic-ejb-jar.xml. Deployed in 12 C.
The <home><remote><local-home><local> tags are commented when trying to do a remote global jndi lookup from client.
Also in weblogic-ejb-jar.xml <wls:jndi-name> and <wls:local-jndi-name> have been commented out.
Surprisingly Weblogic12C is not being shipped with jRockit VM.
Have used JDK16_29 to compile both ejb and client. Server using jdk16_29. Project facet ejb3.1, java6.

When trying to look up from remote client receive,
Problem creating dummy orb: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
Exception in thread "main" java.lang.AssertionError: Context may not be null
     at weblogic.j2eeclient.SimpleContext.checkForNameUnderRemoteNode(SimpleContext.java:103)
     at weblogic.j2eeclient.SimpleContext.internalLookup(SimpleContext.java:68)
     at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:39)
     at weblogic.jndi.SimpleContext.lookup(SimpleContext.java:86)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at learn.trial.and.error.test.StatelessDemoBeanTest31.main(StatelessDemoBeanTest31.java:37)

The JNDI tree does get created in the server with the correct JNDI names. The same EJB deployed with 2.1 can be looked up from the client.
##############

@Stateless
@Local(StatelessDemoLocalBusiness.class)
@Remote(StatelessDemoRemoteBusiness.class)
@LocalHome(StatelessDemoLocalHome.class)
@RemoteHome(StatelessDemoRemoteHome.class)
@LocalBean
public class StatelessDemoBean implements StatelessDemoRemoteBusiness, StatelessDemoLocalBusiness{
public StatelessDemoBean() {}
public String giveDemo() throws Exception{         return "StatelessDemoBean";    }
}

#############
import javax.ejb.Local;

@Local
public interface StatelessDemoLocalBusiness extends StatelessDemoInterface{}

@Remote
public interface StatelessDemoRemoteBusiness extends StatelessDemoInterface{}
#############
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
     version="3.1">

     <enterprise-beans>
          <session>
               <ejb-name>StatelessDemoBean</ejb-name>
               <!-- <home>learn.trial.and.error.StatelessDemoRemoteHome</home> -->               
               <!-- <remote>learn.trial.and.error.StatelessDemoRemoteObject</remote> -->
               <!-- <local-home>learn.trial.and.error.StatelessDemoLocalHome</local-home> -->
               <!-- <local>learn.trial.and.error.StatelessDemoLocalObjest</local> -->
               <ejb-class>learn.trial.and.error.StatelessDemoBean</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Container</transaction-type>
          </session>
     </enterprise-beans>
     
</ejb-jar>

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar
     xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd">
     <!--weblogic-version:12.1.1 -->
     <wls:weblogic-enterprise-bean>
          <wls:ejb-name>StatelessDemoBean</wls:ejb-name>
          <!--<wls:jndi-name>ejb.StatelessDemoBean</wls:jndi-name>
          <wls:local-jndi-name>ejb.local.StatelessDemoBean</wls:local-jndi-name>-->     
     </wls:weblogic-enterprise-bean>
</wls:weblogic-ejb-jar>
#############
Client
public class StatelessDemoBeanTest31 {
     public static void main(String[] args) {
          try {
               Properties env = new Properties();
               env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
               env.put(Context.PROVIDER_URL, "t3://localhost:7001");
               env.put(Context.SECURITY_PRINCIPAL, "weblogic");
               env.put(Context.SECURITY_CREDENTIALS, "weblogic123");
               Context ctx = new InitialContext(env);
               
               StatelessDemoRemoteBusiness stdr = (StatelessDemoRemoteBusiness)ctx.
                         lookup("java:global/MyOwnFirstStateless/StatelessDemoBean!learn.trial.and.error.StatelessDemoRemoteBusiness");     
               stdr.giveDemo();
               
          } catch (NamingException e) {e.printStackTrace();}
catch (Exception e) {e.printStackTrace();}
     }

Edited by: user501150 on Feb 11, 2012 9:58 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points