Invoking an EJB using CORBA

I'd like to invoke an EJB using the CORBA interface.
I know that "ejbc" generates the CORBA IDL definitions. Do I then invoke
"idlj" on these IDL files to generate the client stubs, or is there a better
way? Will these client stubs work from a WebLogic 5.1 container?
Thanks,
Bob

I'd like to invoke an EJB using the CORBA interface.
I know that "ejbc" generates the CORBA IDL definitions. Do I then invoke
"idlj" on these IDL files to generate the client stubs, or is there abetter
way? Will these client stubs work from a WebLogic 5.1 container?Repost in the RMI-IIOP newsgroup. Also try searching that newsgroup as I
believe this has been answered before.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Bob Lee" <[email protected]> wrote in message
news:[email protected]..
>

Similar Messages

  • Problem using CORBA clients with RMI/EJB servers..!!!???

    Hi,
    I have a question on using EJB / or RMI servers with CORBA clients using
    RMI-IIOP transport, which in theory should work, but in practice has few
    glitches.
    Basically, I have implemented a very simple server, StockTreader, which
    looks up for a symbol and returns a 'Stock' object. In the first example, I
    simplified the 'Stock' object to be a mere java.lang.String, so that lookup
    would simply return the 'synbol'.
    Then I have implemented the above, as an RMI-IIOP server (case 1) and a
    CORBA server (case 2) with respective clients, and the pair of
    client-servers work fine as long as they are CORBA-to-CORBA and RMI-to-RMI.
    But the problem arises when I tried using the RMI server (via IIOP) with the
    CORBA client, when the client tries to narrow the object ref obtained from
    the naming service into the CORBA idl defined type (StockTrader) it ends up
    with a class cast exception.
    This is what I did to achieve the above results:
    [1] Define an RMI interface StockTrader.java (extending java.rmi.Remote)
    with the method,
    public String lookup( String symbol) throws RMIException;
    [2] Implement the StorckTrader interface (on a PortableRemoteObject derived
    class, to make it IIOP compliant), and then the server to register the stock
    trader with COS Naming service as follows:
    String homeName =....
    StockTraderImpl trader =new StockTraderImpl();
    System.out.println("binding obj <" homeName ">...");
    java.util.Hashtable ht =new java.util.Hashtable();
    ht.put("java.naming.factory.initial", args[2]);
    ht.put("java.naming.provider.url", args[3]);
    Context ctx =new InitialContext(ht);
    ctx.rebind(homeName, trader);
    [3] Generate the RMI-IIOP skeletons for the Implementation class,
    rmic -iiop stock.StockTraderImpl
    [4] generate the IDL for the RMI interface,
    rmic -idl stock.StockTraderImpl
    [5] Generate IDL stubs for the CORBA client,
    idlj -v -fclient -emitAll StockTraderImpl.idl
    [6] Write the client to use the IDL-defined stock trader,
    String serverName =args[0];
    String symList =args[1];
    StockClient client =new StockClient();
    System.out.println("init orb...");
    ORB orb =ORB.init(args, null);
    System.out.println("resolve init name service...");
    org.omg.CORBA.Object objRef
    =orb.resolve_initial_references("NameService");
    NamingContext naming =NamingContextHelper.narrow(objRef);
    ... define a naming component etc...
    org.omg.CORBA.Object obj =naming.resolve(...);
    System.out.println("narrow objRef: " obj.getClass() ": " +obj);
    StockTrader trader =StockTraderHelper.narrow(obj);
    [7] Compile all the classes using Java 1.2.2
    [8] start tnameserv (naming service), then the server to register the RMI
    server obj
    [9] Run the CORBA client, passing it the COSNaming service ref name (with
    which the server obj is registered)
    The CORBA client successfully finds the server obj ref in the naming
    service, the operation StockTraderHelper.narrow() fails in the segment
    below, with a class cast exception:
    org.omg.CORBA.Object obj =naming.resolve(...);
    StockTrader trader =StockTraderHelper.narrow(obj);
    The <obj> returned by naming service turns out to be of the type;
    class com.sun.rmi.iiop.CDRInputStream$1
    This is of the same type when stock trader object is registered in a CORBA
    server (as opposed to an RMI server), but works correctly with no casting
    excpetions..
    Any ideas / hints very welcome.
    thanks in advance,
    -hari

    On the contrary... all that is being said is that we needed to provide clearer examples/documentation in the 5.1.0 release. There will be no difference between the product as found in the service pack and the product found in the 5.1.1. That is, the only substantive will be that 5.1.1 will also
    include the examples.
    "<=one way=>" wrote:
    With reference to your and other messages, it appears that one should not
    expect that WLS RMI-IIOP will work in a complex real-life system, at least
    not now. In other words, support for real-life CORBA clients is not an
    option in the current release of WLS.
    TIA
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]...
    We currently publish an IDL example, even though the IDL programmingmodel in Java is completely non-functional, in anticipation of the support
    needs for uses who need to use IDL to talk to the Weblogic server,
    generically. This example illustrates the simplest connectivity; it does not
    address how
    to integrate CORBA and EJB, a broad topic, fraught with peril, imo. I'llnote in passing that, to my knowledge, none of the other vendors attempt
    this topic either, a point which is telling if all the less happy to hear.
    For the record then, what is missing from our distribution wrt RMI-IIOPare a RMI-IIOP example, an EJB-IIOP example, an EJB-C++. In this you are
    correct; better examples are forth coming.
    Still, I would not call our RMI-IIOP implementation fragile. I would saythat customers have an understandably hard time accepting that the IDL
    programming model is busted; busted in the sense that there are no C++
    libraries to support the EJB model, and busted in the sense that there is
    simply no
    support in Java for an IDL interface to an EJB. Weblogic has nothing to doit being busted, although we are trying to help our customers deal with it
    in productive ways.
    For the moment, what there is is a RMI (over IIOP) programming model, aninherently Java to Java programming model, and true to that, we accept and
    dispatch IIOP request into RMI server objects. The way I look at it is this:
    it's just a protocol, like HTTP, or JRMP; it's not IDL and it has
    practically nothing to do with CORBA.
    ST wrote:
    Eduardo,
    Can you give us more details about the comment below:
    I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult ot
    use an idl client in java to work.It seems to me that Weblogic's RMI-IIOP is a very fragile
    implementation. We
    don't need a "HelloWorld" example, we need a concrete serious example(fully
    tested and seriously documented) that works so that we can get a betteridea
    on how to integrate CORBA and EJB.
    Thanks,
    Said
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]...
    Please post request to the news group...
    As I said, you must separate the idl related classes (class files and
    java
    files) from the rmi classes... in the rmic step, you must set a newtarget
    (as you did), emit the java files into that directory (it's not clearyou
    did this), then remove all the rmi class files from the class path... ifyou
    need to compile more classes at that point, copy the java files to theidl
    directly is you must, but you can not share the types in any way.
    I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult otuse
    an idl client in java to work.
    Harindra Rajapakshe wrote:
    Hi Eduardo,
    Thanks for the help. That is the way I compiled my CORBA client, by
    separating the IDL-generated stubs from the RMI ones, but still I
    get a
    CORBA.BAD_PARAM upon narrowing the client proxy to the interfacetype.
    Here's what I did;
    + Define the RMI interfaces, in this case a StockTrader interface.
    + Implement RMI interface by extendingjavax.rmi.PortableRemoteObject
    making
    it IIOP compliant
    + Implemnnt an RMI server, and compile using JDK1.2.2
    + use the RMI implementation to generate CORBA idl, using RMI-IIOPplugin
    utility rmic;
    rmic -idl -noValueMethods -always -d idl stock.StockTraderImpl
    + generate Java mappings to the IDL generated above, using RMI-IIOPplugin
    util,
    idlj -v -fclient -emitAll -tf src stocks\StockTrader.idl
    This creates source for the package stock and also
    org.omg.CORBA.*
    package, presumably IIOP type marshalling
    + compile all classes generated above using JDK1.2.2
    + Implement client (CORBA) using the classes generated above, NOTthe
    RMI
    proxies.
    + start RMI server, with stockTrader server obj
    + start tnameserv
    + start CORBA client
    Then the client errors when trying to narrow the obj ref from the
    naming
    service, into the CORBA IDL defined interface using,
    org.omg.CORBA.Object obj =naming.resolve(nn);
    StockTrader trader =StockTraderHelper.narrow(obj); // THIS
    ERRORS..!!!
    throwing a CORBA.BAD_PARAM exception.
    any ideas..?
    Thanks in advance,
    -hari
    ----- Original Message -----
    From: Eduardo Ceballos <[email protected]>
    Newsgroups: weblogic.developer.interest.rmi-iiop
    To: Hari Rajapakshe <[email protected]>
    Sent: Wednesday, July 26, 2000 4:38 AM
    Subject: Re: problem using CORBA clients with RMI/EJBservers..!!!???
    Please see the post on june 26, re Errors compiling... somewherein
    there,
    I suspect, you are referring to the rmi class file when you are
    obliged
    to
    completely segregate these from the idl class files.
    Hari Rajapakshe wrote:
    Hi,
    I have a question on using EJB / or RMI servers with CORBA
    clients
    using
    RMI-IIOP transport, which in theory should work, but in practice
    has
    few
    glitches.
    Basically, I have implemented a very simple server,
    StockTreader,
    which
    looks up for a symbol and returns a 'Stock' object. In the firstexample, I
    simplified the 'Stock' object to be a mere java.lang.String, so
    that
    lookup
    would simply return the 'synbol'.
    Then I have implemented the above, as an RMI-IIOP server (case
    1)
    and a
    CORBA server (case 2) with respective clients, and the pair of
    client-servers work fine as long as they are CORBA-to-CORBA andRMI-to-RMI.
    But the problem arises when I tried using the RMI server (via
    IIOP)
    with
    the
    CORBA client, when the client tries to narrow the object ref
    obtained
    from
    the naming service into the CORBA idl defined type (StockTrader)
    it
    ends
    up
    with a class cast exception.
    This is what I did to achieve the above results:
    [1] Define an RMI interface StockTrader.java (extending
    java.rmi.Remote)
    with the method,
    public String lookup( String symbol) throws RMIException;
    [2] Implement the StorckTrader interface (on a
    PortableRemoteObject
    derived
    class, to make it IIOP compliant), and then the server to
    register
    the
    stock
    trader with COS Naming service as follows:
    String homeName =....
    StockTraderImpl trader =new StockTraderImpl();
    System.out.println("binding obj <" homeName ">...");
    java.util.Hashtable ht =new java.util.Hashtable();
    ht.put("java.naming.factory.initial", args[2]);
    ht.put("java.naming.provider.url", args[3]);
    Context ctx =new InitialContext(ht);
    ctx.rebind(homeName, trader);
    [3] Generate the RMI-IIOP skeletons for the Implementation
    class,
    rmic -iiop stock.StockTraderImpl
    [4] generate the IDL for the RMI interface,
    rmic -idl stock.StockTraderImpl
    [5] Generate IDL stubs for the CORBA client,
    idlj -v -fclient -emitAll StockTraderImpl.idl
    [6] Write the client to use the IDL-defined stock trader,
    String serverName =args[0];
    String symList =args[1];
    StockClient client =new StockClient();
    System.out.println("init orb...");
    ORB orb =ORB.init(args, null);
    System.out.println("resolve init name service...");
    org.omg.CORBA.Object objRef
    =orb.resolve_initial_references("NameService");
    NamingContext naming=NamingContextHelper.narrow(objRef);
    ... define a naming component etc...
    org.omg.CORBA.Object obj =naming.resolve(...);
    System.out.println("narrow objRef: " obj.getClass() ":"
    +obj);
    StockTrader trader =StockTraderHelper.narrow(obj);
    [7] Compile all the classes using Java 1.2.2
    [8] start tnameserv (naming service), then the server to
    register
    the
    RMI
    server obj
    [9] Run the CORBA client, passing it the COSNaming service ref
    name
    (with
    which the server obj is registered)
    The CORBA client successfully finds the server obj ref in the
    naming
    service, the operation StockTraderHelper.narrow() fails in thesegment
    below, with a class cast exception:
    org.omg.CORBA.Object obj =naming.resolve(...);
    StockTrader trader =StockTraderHelper.narrow(obj);
    The <obj> returned by naming service turns out to be of the
    type;
    class com.sun.rmi.iiop.CDRInputStream$1
    This is of the same type when stock trader object is registeredin a
    CORBA
    server (as opposed to an RMI server), but works correctly with
    no
    casting
    excpetions..
    Any ideas / hints very welcome.
    thanks in advance,
    -hari

  • I have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?

    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?
    thanks!

    You'd do something like:
    <%
    //vvv this part can potentially be done in initialization
    Context ctx = getInitialContext();
    BeanHome home =
    (BeanHome)PortableRemoteObject.narrow(ctx.lookup("the.jndi.name"),
    BeanHome.class);
    Bean b = home.create();
    //^^^
    Result r = b.invokeMethod();
    %>
    "toxin" <[email protected]> wrote in message
    news:3d2e95e5$[email protected]..
    >
    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke theEJB's method?
    thanks!

  • UNABLE TO ACCESS SECURED EJB USING IIOP FROM JSP

    Following codes does not work with IIOP when called from jsp returns an
    com.sap.engine.services.iiop.CORBA.CORBAObject:com.sap.engine.services.iiop.server.portable.Delegate_1_1@8312b1 step2 RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: User Guest does not have access to method create(). at
    Following codes does not work with IIOP when called from a fat client returns an
    org.omg.CORBA.UNKNOWN:   vmcid: 0x0  minor code: 0 completed: Maybe
            at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServ
    iceContext.java:33)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
            at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put(Context.PROVIDER_URL, "iiop://hostname:50007");
    p.put(Context.SECURITY_PRINCIPAL, "User");
    p.put(Context.SECURITY_CREDENTIALS, "pass");
    I have add java option to add IIOP filer
    -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sap.engine.services.iiop.csiv2.interceptors.SecurityInitializer
    Solution Required: Could you please detail me what steps in need to perform in order for me to access secure ejb using iiop protocol.
    FYI -- How ever ejb security works with P4 protocol, If required i can send you the test case ear.
    Thanks
    Vijay
    Following are the server side logs
    java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: User Guest does not have access to method create().
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:91)
         at test._TestEJBHome_Stub.create(_TestEJBHome_Stub.java:214)
         at jsp_testIIOP1199698887113._jspService(jsp_testIIOP1199698887113.java:33)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.security.exceptions.BaseSecurityException: Caller not authorized.
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:608)
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:505)
         at com.sap.engine.services.security.resource.ResourceContextImpl.checkPermission(ResourceContextImpl.java:45)
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:89)
         ... 20 more
    ; nested exception is:
         java.lang.SecurityException: com.sap.engine.services.security.exceptions.BaseSecurityException: Caller not authorized.
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:608)
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:505)
         at com.sap.engine.services.security.resource.ResourceContextImpl.checkPermission(ResourceContextImpl.java:45)
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:89)
         at test._TestEJBHome_Stub.create(_TestEJBHome_Stub.java:214)
         at jsp_testIIOP1199698887113._jspService(jsp_testIIOP1199698887113.java:33)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    That's the code that you need to execute but you should
    probably encapsulate that code in Custom Action.
    Orion has a EJB Tag Library that is free to distribute that
    does all that stuff you just set some attributes.
    Go to their site and look at their Tag Libraries.
    Also look for other Tag Libraries Freely Available for EJB Access.

  • Unable to invoke a EJB from a BPEL process

    I am unable to invoke a EJB from a BPEL process. Whenever I try to test it from the oracle EM, I get the below exception. I am using WebLogic 10.3.3, SOA suite 11.1.1.3 and JDev 11.1.1.3 .
    This is what I see from the EM....
    Non Recoverable System Fault :
    javaInterface attribute for the binding is missing or the inteface class is not available.
    Below is a part of the stack trace from the soa server log…
    Caused By: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: com.abc.GreetingEJBBean
    Dependent class: oracle.integration.platform.blocks.ejb.SDOEjbReferenceD
    elegateImpl
    Loader: sun.misc.Launcher$AppClassLoader@20929799
    Code-Source: /C:/Oracle_latest/Middleware/home_11gR1/Oracle_SOA1/soa
    /modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar
    Configuration: /C:/Oracle_latest/Middleware/home_11gR1/Oracle_SOA1/soa
    /modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar
    Piece of xml from the composite.xml
    <reference name="GreetingService"
    ui:wsdlLocation="http://123.45.218.140:7001/GreetingEJBBean/GreetingEJBBeanService?wsdl">
    <interface.wsdl interface="http://abc.com/#wsdl.interface(GreetingEJBBean)" />
    <binding.ejb uri="GreetingEJB-GreetingEJB-GreetingEJB"
    javaInterface="com.abc.GreetingEJB"/>
    </reference>
    Looks like its not able to find the javaInterface mentioned above.
    I have a simple EJB with one business method and a very simple BPEL process.
    @Stateless(name = "GreetingEJB", mappedName = "GreetingEJB-GreetingEJB-GreetingEJB")
    @WebService
    public class GreetingEJBBean implements GreetingEJB {
    public GreetingEJBBean() {
    public String greetUser(String name){
    return ("Hello " + name);
    Any help would be greatly appreciated.

    I haven't tried from a BPEL process, but I have had success (as in Lucas's blogs) of using services and references as EJB Java Interface. This is with EJB java interfaces solely of base types (i.e. String foo(String s)).
    At high level here's what I have noted so far:
    1. Per Lucas's blog, @javaInterface is not being added to the ejb.binding automatically but it's not clear to me when this is and is not required given that interface.java is specified for the reference or service. Would interface.java and @javaInterface ever be different? I've been adding @javaInterface manually anyways since Lucas is a smart guy and I'd rather avoid errors. :-)
    2. Dropping an EJB interface jar in SCA-INF/lib works, but I've had the problem that the JDeveloper SOA Plugin doesn't see those classes until I stop and restart JDeveloper. Until then, I'm confronted with the java->wsdl mapping error. I was sort of primed to figure this one out since I ran into similar issues with SOA SpringBean components.
    3. Dropping EJB interface source in SCA-INF/src is more reliable, because then I can build the project (i.e. create SCA-INF/classes) and the JDeveloper SOA Plugin seems to resolve these brand new classes immediately.
    4. I've tried to invoke an EJB java-interface reference with a slightly complicated java interface (a class parameter with some fields, one of which is an array of another class). The auto-generated WSDL doesn't look exactly right to me (but I'm new to JAXB). Mediator maps to it just fine and the project compiles and deploys normally but fails at runtime. I have not researched in depth. It's not clear to me from the documentation and release notes whether I should expect for it to work, or whether I should expect to have to create my own JAXB mapping. If the latter, I really need a good example!

  • Error compiling single ejb using appc/ejbc (long)

    This may be related to my earlier post ("no longer able to build ejb
    using appc (WLS 8.1)", posted this morning), but the error and the way I
    encountered it were different enough that I thought I'd post as a new
    topic. I've been trying to build a project using weblogic 8.1, but I've
    been running into some problems.
    As a test, I tried compiling a single ejb from the command line using
    the new appc compiler. I compiled the source files and moved them to a
    clean build directory, along with the deployment descriptors. From the
    command line, I set the system classpath to the bare minimum necessary
    to build the ejb-- the jdk tools.jar, the jre rt.jar, the weblogic.jar
    file, the project bin directory, the log4j.jar, and my database driver
    jar (see [1] and the echoed resulting classpath at [2] below). I then
    invoked appc, specifying the output and source paths ([3]). The
    resulting error ([4]) shows a much larger classpath, which abruptly ends
    with a "?". I ran the same test using ejbc instead of appc, and I get
    the very same problem (same error message). I've never encountered
    problems like these before, and other than upgrading to weblogic 8.1, my
    system configuration hasn't changed. Any ideas or suggestions would be
    greatly appreciated!
    system:
    weblogic 8.1
    sun jdk 1.4.1_02 (bundled with weblogic)
    win 2k
    Test and resulting error message:
    [1] SETTING CLASSPATH...
    D:\workspace\TRIPS\deployment\build>set classpath=D:\bea\jdk141_02\jre
    \lib\rt.jar;D:\bea\jdk141_02\lib\tools.jar;D:\bea\weblogic81\server\lib
    \weblogic.jar;D:\workspace\TRIPS\bin;D:\workspace\TRIPS\lib\log4j.jar;D:
    \workspace\TRIPS\lib\ifxjdbc.jar
    [2] ECHOING CLASSPATH...
    D:\workspace\TRIPS\deployment\build>set classpath
    classpath=D:\bea\jdk141_02\jre\lib\rt.jar;D:\bea\jdk141_02\lib
    \tools.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\workspace\TRIPS
    \bin;D:\workspace\TRIPS\lib\log4j.jar;D:\workspace\TRIPS\lib\ifxjdbc.jar
    [3] INVOKING APPC...
    D:\workspace\TRIPS\deployment\build>java weblogic.appc -output D:
    \workspace\TRIP
    S\deployment\build\VASKeyGenerator.jar D:\workspace\TRIPS\deployment
    \build
    [4] ERROR MESSAGE...
    java.io.IOException: CreateProcess: javac -classpath "C:\temp\appcgen;C:
    \Program
    Files\Java\j2re1.4.1_01\lib\rt.jar;C:\Program Files\Java\j2re1.4.1_01
    \lib\i18n.
    jar;C:\Program Files\Java\j2re1.4.1_01\lib\sunrsasign.jar;C:\Program
    Files\Java\
    j2re1.4.1_01\lib\jsse.jar;C:\Program Files\Java\j2re1.4.1_01\lib
    \jce.jar;C:\Prog
    ram Files\Java\j2re1.4.1_01\lib\charsets.jar;C:\Program Files\Java
    \j2re1.4.1_01\
    classes;D:\bea\jdk141_02\jre\lib\rt.jar;D:\bea\jdk141_02\lib
    \tools.jar;D:\bea\we
    blogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib
    \wlcipher.jar;D:\be
    a\weblogic81\server\lib\webservices.jar;D:\bea\weblogic81\server\lib
    \xmlx.jar;D:
    \bea\weblogic81\server\lib\ojdbc14.jar;D:\bea\weblogic81\server\lib
    \EccpressoAsn
    1.jar;D:\bea\weblogic81\server\lib\EccpressoCore.jar;D:\bea\weblogic81
    \server\li
    b\EccpressoJcae.jar;D:\bea\weblogic81\server\lib\ant\ant.jar;D:\bea
    \weblogic81\s
    erver\lib\ant\optional.jar;D:\bea\weblogic81\server\lib\ant\jakarta-oro-
    2.0.4.ja
    r;D:\bea\weblogic81\server\lib\ant\xml-apis.jar;D:\bea\weblogic81\server
    \lib\ant
    \xerc?
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:63)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at weblogic.utils.Executable.exec(Executable.java:227)
    at weblogic.utils.Executable.exec(Executable.java:156)
    at weblogic.utils.Executable.exec(Executable.java:142)
    at weblogic.utils.compiler.CompilerInvoker.execCompiler
    (CompilerInvoker.
    java:246)
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit
    (CompilerInvo
    ker.java:463)
    at weblogic.utils.compiler.CompilerInvoker.compile
    (CompilerInvoker.java:
    364)
    at weblogic.utils.compiler.CompilerInvoker.compile
    (CompilerInvoker.java:
    372)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile
    (EJBCompiler.java:270)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB
    (EJBCompiler.java:468)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB
    (EJBCompiler.java:387)
    at weblogic.appc.compileEJB(appc.java:735)
    at weblogic.appc.compileEJB(appc.java:709)
    at weblogic.appc.compileInput(appc.java:446)
    at weblogic.appc.runBody(appc.java:167)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.appc.main(appc.java:961)
    Exec failed .. exiting
    D:\workspace\TRIPS\deployment\build>

    Hi Tim,
    I just got past a similar problem by specifying the full path to javac
    in build.xml. Like:
    <wlappc source="${dest.dir}" compiler="C:\bea\jdk141_02\bin\javac"
    />
    Tim Perrigo <[email protected]> wrote in message news:<[email protected]>...
    This may be related to my earlier post ("no longer able to build ejb
    using appc (WLS 8.1)", posted this morning), but the error and the way I
    encountered it were different enough that I thought I'd post as a new
    topic. I've been trying to build a project using weblogic 8.1, but I've
    been running into some problems.
    As a test, I tried compiling a single ejb from the command line using
    the new appc compiler. I compiled the source files and moved them to a
    clean build directory, along with the deployment descriptors. From the
    command line, I set the system classpath to the bare minimum necessary
    to build the ejb-- the jdk tools.jar, the jre rt.jar, the weblogic.jar
    file, the project bin directory, the log4j.jar, and my database driver
    jar (see [1] and the echoed resulting classpath at [2] below). I then
    invoked appc, specifying the output and source paths ([3]). The
    resulting error ([4]) shows a much larger classpath, which abruptly ends
    with a "?". I ran the same test using ejbc instead of appc, and I get
    the very same problem (same error message). I've never encountered
    problems like these before, and other than upgrading to weblogic 8.1, my
    system configuration hasn't changed. Any ideas or suggestions would be
    greatly appreciated!
    system:
    weblogic 8.1
    sun jdk 1.4.1_02 (bundled with weblogic)
    win 2k
    Test and resulting error message:
    [1] SETTING CLASSPATH...
    D:\workspace\TRIPS\deployment\build>set classpath=D:\bea\jdk141_02\jre
    \lib\rt.jar;D:\bea\jdk141_02\lib\tools.jar;D:\bea\weblogic81\server\lib
    \weblogic.jar;D:\workspace\TRIPS\bin;D:\workspace\TRIPS\lib\log4j.jar;D:
    \workspace\TRIPS\lib\ifxjdbc.jar
    [2] ECHOING CLASSPATH...
    D:\workspace\TRIPS\deployment\build>set classpath
    classpath=D:\bea\jdk141_02\jre\lib\rt.jar;D:\bea\jdk141_02\lib
    \tools.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\workspace\TRIPS
    \bin;D:\workspace\TRIPS\lib\log4j.jar;D:\workspace\TRIPS\lib\ifxjdbc.jar
    [3] INVOKING APPC...
    D:\workspace\TRIPS\deployment\build>java weblogic.appc -output D:
    \workspace\TRIP
    S\deployment\build\VASKeyGenerator.jar D:\workspace\TRIPS\deployment
    \build
    [4] ERROR MESSAGE...
    java.io.IOException: CreateProcess: javac -classpath "C:\temp\appcgen;C:
    \Program
    Files\Java\j2re1.4.1_01\lib\rt.jar;C:\Program Files\Java\j2re1.4.1_01
    \lib\i18n.
    jar;C:\Program Files\Java\j2re1.4.1_01\lib\sunrsasign.jar;C:\Program
    Files\Java\
    j2re1.4.1_01\lib\jsse.jar;C:\Program Files\Java\j2re1.4.1_01\lib
    \jce.jar;C:\Prog
    ram Files\Java\j2re1.4.1_01\lib\charsets.jar;C:\Program Files\Java
    \j2re1.4.1_01\
    classes;D:\bea\jdk141_02\jre\lib\rt.jar;D:\bea\jdk141_02\lib
    \tools.jar;D:\bea\we
    blogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib
    \wlcipher.jar;D:\be
    a\weblogic81\server\lib\webservices.jar;D:\bea\weblogic81\server\lib
    \xmlx.jar;D:
    \bea\weblogic81\server\lib\ojdbc14.jar;D:\bea\weblogic81\server\lib
    \EccpressoAsn
    1.jar;D:\bea\weblogic81\server\lib\EccpressoCore.jar;D:\bea\weblogic81
    \server\li
    b\EccpressoJcae.jar;D:\bea\weblogic81\server\lib\ant\ant.jar;D:\bea
    \weblogic81\s
    erver\lib\ant\optional.jar;D:\bea\weblogic81\server\lib\ant\jakarta-oro-
    2.0.4.ja
    r;D:\bea\weblogic81\server\lib\ant\xml-apis.jar;D:\bea\weblogic81\server
    \lib\ant
    \xerc?
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:63)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at weblogic.utils.Executable.exec(Executable.java:227)
    at weblogic.utils.Executable.exec(Executable.java:156)
    at weblogic.utils.Executable.exec(Executable.java:142)
    at weblogic.utils.compiler.CompilerInvoker.execCompiler
    (CompilerInvoker.
    java:246)
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit
    (CompilerInvo
    ker.java:463)
    at weblogic.utils.compiler.CompilerInvoker.compile
    (CompilerInvoker.java:
    364)
    at weblogic.utils.compiler.CompilerInvoker.compile
    (CompilerInvoker.java:
    372)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile
    (EJBCompiler.java:270)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB
    (EJBCompiler.java:468)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB
    (EJBCompiler.java:387)
    at weblogic.appc.compileEJB(appc.java:735)
    at weblogic.appc.compileEJB(appc.java:709)
    at weblogic.appc.compileInput(appc.java:446)
    at weblogic.appc.runBody(appc.java:167)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.appc.main(appc.java:961)
    Exec failed .. exiting
    D:\workspace\TRIPS\deployment\build>

  • Best way to use CORBA 3 with Oracle

    Hi, developers,
    I was using Oracle 8i JVM with my CORBA server deployed without any problems. That was CORBA 2 with old BOA.
    Now I have to implement CORBA 2.3 (I've met the "valuetype" in my new IDL definition). I've successfully compiled the IDL file with JDeveloper 9i (which uses the Visibroker's 4 idl2java compiler). The output was the heap of *.java including *POA.java files. I can not deploy them even when I use the Oracle9i database server.
    1) Can anybody show me the way (or multiple ways) to create and to run the CORBA server with POA in the Oracle environment.
    2) Is it possible to compile the IDL file (with valuetype statement) with -boa option and to use the output as it is shown in examples included in database server.
    3) Are there any good links to find the documentation which could describe the CORBA client/server developing process with the help of JDeveloper.
    Thanks in advance,
    Andrew

    Forget about using Corba with an oracle product.
    I tried to connect a C++ corba client. It is supposed to work. But the guys who wrote the implementation don't work for Oracle anymore. The samples can't be compiled or linked because they use an old ORB.
    Oracle support doesn't want to answer with a working solution (even if we PAY for support).
    It is probably possible to use an old version of corba with java. I won't be surprised if it is dropped from a future version of the db or application server.
    Try to use another solution (ejb, webservice, ...)
    Good luck,
    Jean-Paul

  • Javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998

    while interacting with the server side bean , i am getting teh following exception.
    exception
    Aug 30, 2007 5:53:12 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
    at ossj.sa.ri.order.JVTActivationBean.createOrderByValue(JVTActivationBean.java:357)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:107)
    at $Proxy23.createOrderByValue(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    ... 1 more
    Caused by: javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
    at ossj.sa.ri.order.JVTActivationBean.createOrderByValue(JVTActivationBean.java:357)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:107)
    at $Proxy23.createOrderByValue(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    I could not undersatnd waht can be the roblem.
    Please do help me

    check your server log, it may contain some information

  • Why can't I invoke a ejb in Tomcat?

    Hi everyone:
    I invoke a ejb in Tomcat(the ejb is in the weblogic in the same computer with tomcat).The jsp code is:
    /////////////////first method//////////////////////
    Context ctx=new InitialContext();
    Object obj=ctx.lookup("ejb/Hello");
    Hellohome home=(Hellohome)PortableRemoteObject.narrow(obj,Hellohome.class);
    Hello hello=home.create();
    out.println(hello.getHello());
    ///////////////second method//////////////////
    Hashtable ht=new Hashtable();
    Context ctx=null;
    ht.put(ctx.PROVIDER_URL, "t3://127.0.0.1:7001" ); // t3://127.0.0.1:7001
    ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ctx = new InitialContext();
    Hellohome home= (Hellohome) javax.rmi.PortableRemoteObject.narrow (ctx.lookup ("HelloEJB"),Hellohome.class);
    Hello hello=home.create();
    out.println(hello.getHello());
    Is there any different?If I want to invoke the EJB which is in the weblogic.The Tomcat says:
    Name HelloEJB is not bound in this Context
    But I bound it in the weblogic and I add the "
    <ejb-ref>
    <ejb-ref-name>HelloEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>lyoejb.Hellohome</home>
    <remote>lyoejb.Hello</remote>
    <ejb-link>Hello.jar#HelloEJB</ejb-link>
    </ejb-ref>"
    in the ejb-jar.xml. And I copy the j2ee.jar,wlclient.jar,Hello.jar to Tomcat/....web-inf/lib
    How to setting the web.xml in the Tomcat?

    Hi duffymo:
    I install weblogic in windowsXP and weblogic run property in it.Any wrong?I install JVM in IE6 so the IE can display Applet.
    I can invoke the EJB in Tomcat.Let me say it carefully.
    The weblogic's port is 7001 and the Tomcat's port is 8080.I deploy a EJB in weblogic and I can see the JNDI name in weblogic console(The JNDI name is HelloEJB). I test the EJB in Tomcat.The dir is C:\tomcat\webapps\ROOT\ejb\invokeEJB.jsp and I write the code:
    ///////////////////////////invokeEJB.jsp///////////////////////////////////////
    Hashtable ht=new Hashtable();
    Context ctx=null;
    ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(ctx.PROVIDER_URL, "t3://127.0.0.1:7001" );
    ctx = new InitialContext(ht);
    Hellohome home= (Hellohome)ctx.lookup ("ejb.HelloEJB");
    Hello hello=home.create();
    out.println(hello.getHello());
    /////////////////////////End code////////////////////////////////
    I test it using the URL:"http://localhost:8080/ejb/invokeEJB.jsp"
    It can display the content of the EJB property.I means that the Tomcat can invoke EJB.I copy the "j2ee.jar , wlclient.jar , HelloEJB.jar(My EJB Home and Remote interface)" to "Tomcat/.../share/lib" directory.
    I hope you will reply if you have any advice. :)

  • Relation between EJB and CORBA

    Hi,
    I'm confused as to the relation between EJB and CORBA. Some books I've read say that CORBA is used to implement the underlying RMI protocol in EJB while others say it is an alternative to EJB.
    Could someone please clarify.
    Thanks

    Could you pleae restate your question.
    I'm assuming you want to bind a Corba object to a
    CosNaming service from within a j2ee component. JNDI
    supports this case fully via their CosNaming service provider
    (see http://java.sun.com/products/jndi/serviceproviders.html) JNDI is part of J2SE, so it's fully available to any J2EE component.
    Amlan on behalf of Kenneth Saks

  • Javax.naming.NoInitialContextException when invoking an EJB

    Hi,
    I've deployed a stateless session EJB in oc4j and invoking it thru a Java client. I'm using Eclipse. I've a jndi.properties in config folder of my application which is in the classpath of the client code.
    The jndi.properties has :
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=ormi://<localhost>:12401/OC4JEJB
    java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=oc4jadmin
    where OC4JEJB is the application name deployed in oc4j.
    This jndi.properties file is in the classpath.
    My client code is :
    Server server = null; //interface
    ServerHome testSessionBean; //implementation of methods in Server interface
    try {
    Context ctx = new InitialContext();
    Object objref = ctx.lookup("EJBServer"); //JNDI name
    Object obj = PortableRemoteObject.narrow(objref, ServerHome.class);
    testSessionBean = (ServerHome) PortableRemoteObject.narrow(objref,
                             ServerHome.class);
    server = testSessionBean.create();
    } catch (...) {  }
    When i set the properties and do a look up
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
              "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");//oc4jadmin
    env.put(Context.SECURITY_CREDENTIALS, "oc4jadmin");
    env.put(Context.PROVIDER_URL,
         "ormi://<localhost>:12401/OC4JEJB");           
    InitialContext ctx = new InitialContext(env);
    it works perfectly fine.
    But when i use the jndi.properties it gives the following exception.
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at client.ORION_EJB_Util.getServer(ORION_EJB_Util.java:203)
         at client.ORION_EJB_Util.<init>(ORION_EJB_Util.java:90)
         at client.TestClient.main(TestClient.java:26)
    client.exception.EJBUtilException
         at client.ORION_EJB_Util.getServer(ORION_EJB_Util.java:248)
         at client.ORION_EJB_Util.<init>(ORION_EJB_Util.java:90)
         at client.TestClient.main(TestClient.java:26)
    Invoking the server
    Inside getServer method
    Obtained Initial Context javax.naming.InitialContext@422ede
    Exception null
    I've tried placing the jndi.properties in j2ee/home/applib too. Where shud i place this jndi.properties and invoke the EJB?
    Could anyone help resolve this issue?
    Thanks in advance,
    Sprightee

    Try add your jndi.properties to your CLASSPATH.
    See this doc for more details of RMI.
    http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28958/rmi.htm#i1084792

  • Problem: Connecting to EJB from CORBA with Glassfish as AppServer

    Hi all,
    I was looking and tryieng for days now, but never found a proper solution or how to, to solve my problem:
    I have to expose a Remote EJB as Corba Object and provide a set of IDL Files, which can be used by any CORBA Client (i.e. IIOP.NET).
    First i tried it the EJB3 way, but everywhere is mentioned that IIOP cann only be used by EJB2.x way. So this ist what i have done so far:
    The Home Inteface, as described at many tutorials
    package org.ba.services.iiop;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface KursmanagerRemoteServiceHome extends EJBHome {
        public KursmanagerRemoteService create() throws CreateException, RemoteException;
    }The Service Interface:
    package org.ba.services.iiop;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.ejb.EJBObject;
    import org.ba.entities.Kurs;
    import org.ba.entities.Person;
    * @author Pocket
    public interface KursmanagerRemoteService extends EJBObject{
        public void prepareApplication(long callID) throws RemoteException;
        public boolean resetDataFile() throws RemoteException;
        byte[] getOneMegabyte(long callID) throws RemoteException;
    }there are some more methods, but thats not the point
    And this is the implementing bean:
    package org.ba.services.iiop;
    import java.rmi.RemoteException;
    @Stateless
    @RemoteHome(KursmanagerRemoteServiceHome.class)
    public class KursmanagerRemoteServiceBean extends AbstractService implements KursmanagerRemoteService, SessionBean {
        @EJB
        Kursmanager km;
        @Init
        public void create() {
        public void prepareApplication(long callID) {
        public boolean resetDataFile() {
             return emptyDataFile();
    public EJBHome getEJBHome() throws RemoteException {
            return null;
        public Object getPrimaryKey() throws RemoteException {
            return null;
        public void remove() throws RemoteException, RemoveException {
        public Handle getHandle() throws RemoteException {
            return null;
        public boolean isIdentical(EJBObject arg0) throws RemoteException {
        return false;
        public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException {
        public void ejbRemove() throws EJBException, RemoteException {
        public void ejbActivate() throws EJBException, RemoteException {
        public void ejbPassivate() throws EJBException, RemoteException {
        }Deployed on Glassfish V2ur1
    IDE: Netbeans 6.0.1
    Does anyone know if this is correct? How do i create the IDLs correctly? Which of the SessionBeanIF Methods have to be implemented (or at all)?
    is there no easy way to expose objects for CORBA Clients?
    I would appreciate any help..
    thanx
    Andreas

    John,
    JDeveloper 3.1 is not certified against OAS 4.0.8.2 - and JDeveloper 3.2 will not be certified against any version of OAS, since Oracle is moving to iAS.
    If your project is in its early stages, I suggest that you consider switching to iAS - and you can work against Apache until iAS is available, which will be with JDeveloper 3.2, in the last quarter of this calendar year (2000).
    Thanks
    Blaise

  • Error during deployment of stateless session EJB using EJB 3.0

    having trouble deploying a stateless session bean to app server 10.1.3.1 oc4j container.
    deceided to go through oracles demo: How-To Develop a Stateless Session EJB using EJB 3.0 (http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-stateless-ejb/doc/how-to-ejb30-stateless-ejb.html).
    the demo encounters the same issue. so i assume there is something wrong with the app server set up, and not my source code.
    here is the deployment log:
    [Jul 1, 2009 11:59:25 AM] Application Deployer for test_ws STARTS.
    [Jul 1, 2009 11:59:25 AM] Copy the archive to C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear begins...
    [Jul 1, 2009 11:59:25 AM] Unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Done unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear ends...
    [Jul 1, 2009 11:59:25 AM] Starting application : test_ws
    [Jul 1, 2009 11:59:25 AM] Initializing ClassLoader(s)
    [Jul 1, 2009 11:59:25 AM] Initializing EJB container
    [Jul 1, 2009 11:59:25 AM] Loading connector(s)
    [Jul 1, 2009 11:59:26 AM] Starting up resource adapters
    [Jul 1, 2009 11:59:26 AM] Processing EJB module: ejb30ws-ejb.jar
    [Jul 1, 2009 11:59:26 AM] application : test_ws is in failed state
    [Jul 1, 2009 11:59:26 AM] Operation failed with error: java.lang.NoClassDefFoundError
    the opmn log reveals the same error, but no more detail.
    any ideas???
    /stuck

    I am having exactly the same issue. Was this issue resolved? If so, please share the resolution and if not can someone please suggest what could be wrong.
    Thanks

  • Invoking a scenario using web service

    Hi Experts,
    Could anyone pls suggest how to pass variables from SOAP to ODI 11g(11.1.1.6.3)
    Here we are using wsdl utility to invoke a scenario using web service and trying to pass a variable like the below
    The scenario is triggered successfully without passing a parameter.
    But when i try to pass a variable like the below,am getting error
    Variables name='PROJECT_CODE'
    Variables value='JI-2015'
    In ODI 11g, i have generated a scenario with a variable PROJECT_CODE as a declare variable and tried triggering from both the environments
    From ODI 11g:
    When I try to trigger the scenario from wsdl, in that variable step(in operator), I got error as ODI-17546: Specified variable not found in the Repository
    But in the work repository SNP_VAR table I could still see the variable name under VAR_NAME column.
    From ODI 10g:
    When i try to do the same from odi 10g, the scenario execution is success.
    But the variable had taken only NULL value instead of taking the value which i passed from wsdl.
    Could you pls advise where am going wrong

    variable should be passed in the soap message by adding variables elements. Refer to Note ID [1499852.1]
    <Variables>
    <Name>Project.Variable1</Name>
    <Value>Variable1Value</Value>
    </Variables>
    <Variables>
    <Name>Project.Variable2</Name>
    <Value>Variable2Value</Value>
    </Variables>
    <Variables>
    <Name>Project.Variable3</Name>
    <Value>Variable3Value</Value>
    </Variables>

  • Invoking web service using Weblogic Workshop (JCX)

    Invoking web service using Weblogic Workshop
    Posted: 5 Jan 2005 23:31 PM Reply
    Hi,
    I have WSDL from which I have generated a web service control (.jcx) using Weblogic Workshop.
    I need to write a client which will invoke the web service using the control.
    Can someone help me on how to go about this ?
    BTW .. I also tried the clientgen route and tried to generated the proxy jar from the WSDL but wasn't successful because of a existing clientgen bug.
    Refer bug

    Hi,
    if the consumer of the webservice is a control-aware consumer ( pageflow, control, process ) simply drag the control to this consumer and the control variable is ready for use.
    if the consumer is not control-aware, try to generate a proxy using eg. the axis tool, or handcode your proxy class.
    links :
    how to use webservice control
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/conGettingStartedWithJavaControls.html
    axis
    http://ws.apache.org/axis/
    - Anders M.
    - Anders M.

Maybe you are looking for

  • Installing on Drive Other then C:

    I've done some research on this and it seems it's not possible but I'm going to ask any way to get official clarification.  I have an SSD (C:) drive and I don't want my Creative Cloud on that drive I rather have it on the 300GIG K drive I have. It wo

  • I have recently bought a mac. how do i request a platform swap for my cs5 from pc to mac?

    i have recently bought a mac. how do i request a platform swap for my cs5 from pc to mac?

  • Problem with WSDL file generated by PI for sender SOAP

    I have a scenario SOAP to idoc that I am trying to test in PI7.1.  I have created my objects in the ESR and completed the configuration in IB.  When I test the configuration in IB, the data passes through PI to ECC correctly. Now I want to export the

  • About focus

    I am moving our project from jdk1.3 to jdk1.4. And it's a puzzle that some component can not gain focus any more. So does anyone know what is the condition of obtaining the focus. For instance , I know , requestfocus() , setSelected() . I want to kno

  • Iphoto won't import photos and application won't stop working

    Recently, when I have tried to import photos from my card reader the iphoto application appears to be working to locate the pictures but it freezes.  It won't respond to the "Quit" function, window won't close, can't eject my device.  The only way to