Org.omg.CORBA.MARSHAL:vmcid:SUN Minor code:211 Completed:maybe

Source: Internet
Author: User

Test EJB3 with WebLogic 12c

import Javax.naming.initialcontext;import javax.naming.namingexception;import ejb3test. Helloworld;import weblogic.jndi.WLInitialContextFactory; Public classTest { Public Static voidMain (string[] args) throws Namingexception {Java.util.Properties prop=Newjava.util.Properties (); Prop.setproperty (Javax.naming.Context.INITIAL_CONTEXT_FACTORY, wlinitialcontextfactory.class. GetName ()); Prop.setproperty (Javax.naming.Context.PROVIDER_URL,"t3://localhost:7001"); InitialContext IC=NewInitialContext (prop); HelloWorld h= (HelloWorld) ic.lookup ("Helloworldbean#ejb3test. HelloWorld"); System. out. println (H.sayhello ("Somebody"));////somebody say Hello. }}

How to generate EJBS:

The EJB contains an interface and an implementation class

Package ejb3test;  Public Interface HelloWorld {    public  string SayHello (string name);  }

" Helloworldbean " )  @Remote ({HelloWorld. class  publicclass  Helloworldbean implements HelloWorld {        public string SayHello (string name) {        return name+"  say Hello. " ;    }}

Packing HelloWorld     Helloworldbean to Helloapp.jar (normal jar)  and deployed to WebLogic server   
HelloWorld  to Helloi.jar for Test class invocation  


Test encountered a problem

Org.omg.CORBA.MARSHAL:vmcid:SUN minor code:211 Completed:maybe .....

Solutions

One is to introduce Weblogic.jar directly (as if this version is supported)

or CD to Oracle\middleware\oracle_home\wlserver\server\lib, perform Java-jar Wljarbuilder.jar, and finally generate Wljarbuilder.jar introduced into the test Class {The official operation: http://docs.oracle.com/cd/E24329_01/web.1211/e24378/jarbuilder.htm#SACLT421}

Org.omg.CORBA.MARSHAL:vmcid:SUN Minor code:211 Completed:maybe

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.