Remote Invokation of EJB 3 on OAS 10.1.3.3 from OAS 10.1.2.2

The setup is as follows:-
1. I have OAS 10.1.2.2 on System 1.
2. I have OAS 10.1.3.3 on System 2.
3. I have deployed a simple EJB 3 on System 2.
4. Now I do a remote lookup for the EJB 3 as follows:-
String lookupName = "SampleEJB";
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory" );
env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
env.put( Context.SECURITY_CREDENTIALS, "welcome1" );
env.put(Context.PROVIDER_URL, PROVIDER_URL);
env.put("dedicated.connection","true");
Context context = new InitialContext( env );
Object obj = context.lookup(lookupName);
SampleEJB sample = (SampleEJB) obj;
As can be seen above, I am using "com.evermind.server.rmi.RMIInitialContextFactory" as the Initial Context Factory which is part of oc4jclient.jar of OAS 10.1.2.2. The lookup goes well. But when I try to type cast to the business interface of EJB3, I get "java.lang.ClassCastException".
I printed the object "obj" retrieved from the lookup. It is an instance of "javax.naming.Reference" referencing to "javax.ejb.EJBObject". Because of this the "java.lang.ClassCastException" is obvious, as the "SampleEJB" object to which I am trying to do a explicit type cast is a plain Java interface.
I guess the reason for getting a "javax.naming.Reference" referencing to "javax.ejb.EJBObject" because I am using "com.evermind.server.rmi.RMIInitialContextFactory" as the Initial Context Factory which is used for looking up EJB2. I know that we need to use "oracle.j2ee.rmi.RMIInitialContextFactory" for looking up EJB3 which is part of oc4jclient.jar of OAS 10.1.3.3. But I can't use this Initial Context Factory here as it is not available in OAS 10.1.2.2.
Can someone let me know how this can be accomplished.

Run Time Libraries Cause problem on oracle application server

Similar Messages

  • EJB 3.0 App won't run on OAS 10.1.3.1 AIX5L

    Hi All,
    I'm developing Application with Struts + JSP + EJB3.0 with JDev 10.1.3. It runs well on embedded OC4J with JDev. And it runs well also on Oracle Application Server 10.1.3.1 + Windows XP Prof. But when I deployed it on Oracle Application Server 10.1.3.1 + IBM AIX 5L which is my production environment, the application won't run.
    I try to narrowing down the problem, so I create a simple EJB3.0 Application. It consist of 1 Entity from Table (JPA/EJB3.0) and the entity has queryFindAll() method. One simple Facade Session Bean EJB invoke it. 1 JSP file call a class that do the context lookup to SessionBean EJB.
    This simple application runs well on both platform, i.e Windows XP Prof and IBM AIX 5L.
    But when I try to create an application that has complex relationship, i.e has relation many-to-many and one-to-many, the application wont run on OAS 10.1.3.1 on IBM AIX5L. Instead, it runs well on OAS 10.1.3.1 on Windows XP Prof.
    this is the error messages in log.xml from OAS 10.1.3.1 on IBM AIX5L:
    [SessionEJB:public java.util.List tintin.model.SessionEJBBean.queryBiOfficesFindAll()] exception occurred during method invocation: oracle.oc4j.rmi.OracleRemoteException:
    javax.persistence.PersistenceException: Exception [TOPLINK-7158] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Error encountered when building the @NamedQuery [BiOffices.findAll] from entity class [class oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries.MetadataNamedQuery].
    Internal Exception: java.lang.IllegalStateException: ClassLoader "ejbtest.root:0.0.1" (from <application> in /oraias/product/10131/gebas/j2ee/oc4j_geb/applications/ejbtest/):
    This loader has been closed and should not be in use.; nested exception is:
    javax.persistence.PersistenceException: Exception [TOPLINK-7158] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Error encountered when building the @NamedQuery [BiOffices.findAll] from entity class [class oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries.MetadataNamedQuery].
    Internal Exception: java.lang.IllegalStateException: ClassLoader "ejbtest.root:0.0.1" (from <application> in /oraias/product/10131/gebas/j2ee/oc4j_geb/applications/ejbtest/):
    This loader has been closed and should not be in use.
    What could be the root cause of these errors? I've tried to compared all components that are installed on WinXP box and AIX5L. I can't find any clue of it.
    Could someone please help me? Thanks...

    I found Error Code for TOPLINK here: http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/errcode007.htm
    but it is strange, that my error exception is TOPLINK-7158:
    7158: ERROR_PROCESSING_NAMED_QUERY_ANNOTATION
    Cause: Error encountered when building the @NamedQuery annotation from entity class ClassName.
    Action: Ensure the correctness of the annotation specification.
    how come that error only occured in OAS 10.1.3.1 on AIX 5L, but it didn't occur in OAS 10.1.3.1 on Windows XP Pro?
    Is it really the root cause or OAS throws wrong exception code? Could someone from Oracle help me please?

  • 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. :)

  • 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!

  • Could not create remote for an EJB

    Hello,
    We have deployed an App on Sun One 7 that has web as well ejb modules integarted into it. The app deploys properly, However as soon as I try to call a servlet which in turn looks up an EJB (say ClientBean ) it gives me the followign error --->
    "Could not create remote for Client Bean"
    The entries in the xml files are as follows -
    1) In ejb-jar.xml -
    <session>
    <ejb-name>EUClientBean</ejb-name>
    <home>com..ejb.EUClientHomeIF</home>
    <remote>com..ejb.EUClientRemoteIF</remote>
    <ejb-class>com.ejb.EUClsClientBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <description>database ref</description>
    <res-ref-name>test/db</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    2) in sun-ejb-jar.xml --
    <ejb>
    <ejb-name>EUClientBean</ejb-name>
    <jndi-name>ejb/EUClientBean</jndi-name>
    <ejb-ref>
    <resource-ref>
    <res-ref-name>test/db</res-ref-name>
    <jndi-name>jdbc/test/db</jndi-name></resource-ref>
    <pass-by-reference>true</pass-by-reference>
    <bean-pool>
    <pool-idle-timeout-in-seconds>0</pool-idle-timeout-in-seconds></bean-pool>
    </ejb>
    3) In sun-web.xml -
    <ejb-ref>
    <ejb-ref-name>ejb/test/client</ejb-ref-name>
    <jndi-name>ejb/EUClientBean</jndi-name>
    </ejb-ref>
    4) In web.xml --
    <ejb-ref>
    <ejb-ref-name>ejb/test/client</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.ejb.EUClientHomeIF</home>
    <remote>com.ejb.EUClientRemoteIF</remote>
    <ejb-link>EUClientBean</ejb-link>
    </ejb-ref>
    Actually the same app was working on IAS 6.5.
    Any ideas what cud have gone wrong?

    Hi Mandar,
    Can you post the exception you're getting in your servlet code? Does it happen when the servlet is looking up the ejb or when it tries to create it?
    Regards,
    Ken

  • JNDI Error when Oracle BPM Process invokes an EJB Service Adapter

    Hi All,
    I am trying to invoke an EJB Service from my Oralce BPM process/workflow. I have provided the JNDI name in EJB service adapter in Jdeverloper also. Even though I have configured the JNDI in weblogic server properly, i am getting some JNDI invocation error (FabricInvocationException) as below.
    Can somebody help me on this.
    Non Recoverable System Fault :
    *<bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>oracle.fabric.common.FabricInvocationException: Exception creating jndi context for ejb invocation:</summary></part><part name="detail"><detail>Unable to resolve 'XXXXXXInterfaceRemote'. Resolved ''</detail></part><part name="code"><code>null</code></part></remoteFault></bpelFault>*
    Edited by: 920456 on Apr 2, 2013 2:09 AM

    Hi All,
    Still i am facing the above stated challenge, i am getting a JNDI error when i am trying to call it from Oracle BPM process.
    can somebody tell me Does Oracle SOA Suite - EJB Adapter version 3.0 has any runtime bugs ? etc.
    Bcoz in the below link it is given something like EJB Version 2 Are Not Supported During Runtime. So, i want to check whether any bugs.
    [Oracle SOA EJB Adapter Version bugs|http://www.oracle.com/technetwork/middleware/docs/aiasoarelnotesps5-1455925.html#intadapt]
    Regards,
    Satya

  • 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]..
    >

  • Optimization of remote calls of EJB

    Hello,
    does the SAP Web AS support automatic optimization of remote calls of EJBs such that the overhead associated with remote calls is avoided iff the target EJB of the call actually runs in the same JVM (and therefore would allow a local call)? This would imply that in this case objects are passed by reference instead of by value.
    To clarify: I am aware of the fact that EJBs can be called through Local and LocalHome interfaces. But that prevents the distribution of the EJBs. What I am looking for is to always use Remote and Home interface (remote call) and let the AppServer optimize the call to be virtually local if possible.
    From what I know, JBoss and WebLogic support this feature. Is there anything like that for the Web AS. What do I need to configure?
    Any hint is greatly appreciated. Please let me know if you need additional clarification on my question. Thanks!
    With kindest regards,
    Nick.

    Hi Nick,
    The optimizations I was talking about are a proprietary internal functionality and not something application developers can rely on. That's why they are not documented in any external documentation. According to your problem, my proposal is to declare both the remote and local interfaces of the beans and use the proper one depending on whether the bean client wants to pass parameters by value or by reference.
    SAP does not have plans to dynamically (or automatically as you call it) switch from calling by value to calling by reference as this is not just a performance optimization - this breaks the functionality. If we decide to do it, we will have at least two problems:
    1. Incompatibility with the RMI specification
    2. Incompatibility with previous versions
    As I already mentioned, there are EJB components that rely on being called by value, no matter whether the client resides in the same JVM or is a remote one.
    I still cannot get your goal - both insisting on remote interfaces and expecting object-by-reference.
    Best regards,
    Viliana

  • How to access the Remote Appserver thru EJB

    hi friends...
    How to access the Remote appserver thru EJB from a Portlet.
    I've tried but its not working u have any idea Plz help me out...
    The scenario is I have my portal running in my machine & appserver(weblogic) running in remote and want to access that appserver
    thru Remote EJB from my portal. I have tried with the t3 protocol and iiop but it is not working
    The code i have use
    Properties props = new Properties();
    props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    props.put(javax.naming.Context.PROVIDER_URL, "t3://10.1.87.46:7031");
    it is giving me a nullpointer exception when i try to access the method in the ejb , it is not able to call that method...
    Plz help me out to resolve this situation
    Thnx in Advance.....

    SanjayBala, just so you know that it is possible to create a database link in Oracle to non-Oracle databases in some circumstances. Look up Generic Connectivity aslo know as Heterogenous Services. With 11g Oracle has basically renamed the feature and replaced it with somethinkg named ike DG4ODBC.
    I have not spent time studying the details for DB4ODBC but with HS Oracle provided the interface and you had to obtain the necessary ODBC driver on your own. I had Oracle on AIX reading and writing to SQL Server on Windows but the developers chose to write a java program and connect to both via it. On Windows and Linux platforms the necessary ODBC drivers might be available without the requirement to go out and purchase one.
    The Oracle Open Gateway product is an advanced version of the above features with drivers for specific non-Oracle databases included like DB2 or Informix.
    HTH -- Mark D Powell --

  • I made a change to my EJB, and went to re-deploy onto the OAS, and got an error.

    I successfully deployed an EJB, and tested it, which it worked. Now, if I want to make a modification to that EJB, I need to redeploy it onto the OAS server, JDeveloper gives me an exception when deploying:
    java.io.FileNotFoundException: D:\orant\ows\4.0\..\apps\ejb\HiWorld\_client.jar
    at java.lang.Throwable.<init>(Compiled Code)
    at java.io.FileNotFoundException.<init>(Compiled Code)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:69)
    at sun.tools.jar.Main.run(Main.java:76)
    at sun.tools.jar.Main.main(Main.java:524)
    at oracle.oas.tools.util.JarGenerator.createJar(Compiled Code)
    at oracle.oas.tools.util.CreateJars.main(Compiled Code)
    Creation of client jar for D:\\orant\\ows\\upload\\544HiWorldSource.jar failed!
    What do I need to do to redeploy an EJB onto the OAS? Do I need to shut down the OAS server in order to redeploy?
    Thanks!

    You could either restart/bounce your OAS or turn the FILECACHING=OFF in the svadmin.cfg file in OAS
    raghu

  • OAS and using JDBC-drivers from EJB

    Hi.
    I have a problem with accessing the database from EJB-components
    deployed to OAS 4.0.8. The database is 8.1.5-version. I'm trying
    to use a connection exactly like it is documented in OAS-EJB-
    documents, the connection string looks like this:
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:jts8:@ora8i");
    And this is the error that above sentence it generates:
    "Sub Protocol must be specified in connection URL".
    The DAD(ora8i) is created in OAS.
    Now, I don't even know if this uses JDBC/OCI or thin since the
    documented connection-string doesn't contain that information. I
    quess it must use OCI-drivers, at least I should use them and
    they should be installed with OAS.
    So:
    * I should use only jts-enabled JDBC-drivers when developing EJB-
    components, is this right?
    * How can I connect to the database (from OAS 4.0.8 to Oracle
    8i), the string please?
    Thanks,
    [email protected]
    null

    Hi Suresh,
    There is lot of Documentation available on this, check these links
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/07d2eeea3e0485e10000000a155369/frameset.htm
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/08546ff5200486e10000000a155369/frameset.htm
    Venkat.

  • 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!

  • 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

  • Migration from OAS 10g to Weblogic 10.3

    Hello,
    I migrate large app from OAS 10g to Weblogic 10.3.
    1.
    The main part of the job was to prepare descriptors for Weblogic. Unfortunatelly I don't find any tool that could do the job:( There are some problems with descriptors namespaces. This schema and namespaces given in 10.3 docs are not working (not available):
    http://edocs.bea.com/wls/docs103/ejb/DD_defs_reference.html
    So I use the one from 10 release in weblogic-ejb-jar.xml:
    weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd"&gt;
    and form 9 release in weblogic-cmp-rdbms-jar.xml:
    &lt;weblogic-rdbms-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-rdbms20-persistence.xsd"&gt;
    There are also some bugs in docs about ejb relations.
    After fixing some schema compliance exc this step success.
    2. Next the EJBComplianceChecker - its much more restrictive than OAS verification. So updates in ejb interfaces are necessary. It is not a problem with small app but when there ale a lot of code/branches to migrate it's become a problem. I have been looking for some switch that could help with this but with no result/
    EJBComplianceChecker - Spec veryfication level
    3. Now after EJB compliance checker done its job with success I have an exception that I do not understand:
    An error occurred during activation of changes, please see the log for details.
    Exception
    preparing module: EJBModule(corpo_ejb.jar)
    Unable to deploy EJB: corpo_ejb.jar from corpo_ejb.jar:
    There are 1 nested errors:
    java.io.IOException: JDT compilation error! at
    weblogic.ejb.container.ejbc.CompilerForJDT.compile(CompilerForJDT.java:66)
    at
    weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:357)
    at
    JDT compilation error!
    Could you please give me some point where the problem could be? I don't have any idea where to start looking for..
    What are your experiences with migrations from OAS to Weblogic 10?
    Thanks in advance!
    Edited by: Stoigniew Sztank on Oct 10, 2008 4:00 AM
    Edited by: Stoigniew Sztank on Oct 10, 2008 4:01 AM
    Edited by: Stoigniew Sztank on Oct 10, 2008 4:02 AM
    Edited by: Stoigniew Sztank on Oct 10, 2008 4:04 AM
    Edited by: Stoigniew Sztank on Oct 10, 2008 8:05 AM

    Hi Stoigniew Sztank,
    I am working on migrating Enterpirse application developed using Struts, Ejb2.0, JMS. Its been deployed on OAS 10G and Websphere, but I need to deploy the application on Weblogic 10.3. It seems you have migrated a J2ee application from OAS 10G to Weblogic 10.3. Please can you list me the steps that you followed to migrate the application.
    As per my understanding follwing things needsto be taken care of:-
    1) Weblogic Descriptor files:
    1.1 Weblogic.xml:- we added security roles and ejb-reference-description for the ejbs.
    1.2 Weblogic-ejb-jar.xml for all the ejbs used in the application.
    1.3 Weblogic-application.xml
    1.4 Resource Adapter
    2) JMS queue set up
    3) JDBC set up
    It would be a great help if you can let me know what are the steps to migrate the application.
    Thanks and Regards
    Deepak Dani

  • Executing an Oracle 9i Client Process from OAS 10g Java Application

    Sorry in advance for the long post:
    We have a piece of legacy software (Uniface.exe) that contains a good chunk of business rules for an existing system. Uniface client connects to an Oracle 10g database but requires Oracle 9i client libraries. Therefore the default Oracle home for a local machine running Uniface is set to the Oracle 9i client software location.
    On the same machine we have OAS 10g (10.1.3.1) running a Java-based middleware product (J2EE). The Java code invokes the Uniface.exe client to run specific business functions. We have in our Java code Runtime.getRuntime().exec(cmd); where cmd is the Uniface.exe.
    It appears that when the OAS Java program executes the Uniface.exe it is using the Oracle 10g client libraries from OAS instead of the Oracle 9i client libraries from the local machine's default Oracle home. When we run Uniface.exe from a Windows command prompt it works fine.
    We have noticed that when running Uniface.exe from Java OAS uses its own Windows path and environment variables and does not honor the system path. We wrote a Windows bat script to explicitly set the Oracle home and system path to the 9i location and then run Uniface.exe but this doesn't seem to work.
    Any ideas?

    OAS sets the ORA_NLS33 environment variable to the OAS 10g home location (F:\Oracle\10.1.3.1\OracleAS_1\ocommon\nls\admin\dat). Setting it to my Oracle 9i client location (C:\Oracle\product\9i\ocommon\nls\ADMIN\DATA) appears to have solved the problem.

Maybe you are looking for

  • How to deploy my wsp in a single web applciation

    I want to deploy my solution to a single web application. I used the following script: Add-SPSolution -d:/mywebpart.wsp Install-SPSolution mywebpart.wsp -WebApplication "mywebappln" -GacDeployment But the solution is now available in the 'Site Collec

  • Re-installing Acrobat X pro after repairs. Where do I find my serial number or authorisation key?

    I want to be prepared before I send in my less than 6 months old Vaio (again) for repair. Thanks for your help

  • Weird OCCI crash when creating a connection

    Hi Forum Users, I wonder if anyone experienced weird occassional crashes deep inside the OCCI / OCI like the one described below, and have any clues how to avoid them? I work in a environment where my backend server connects to a load-balanced cluste

  • Ios 7 apps refresh

    Why is it when I am multi-tasking between apps that when going back to an app like safari the page will reload. I was checking out on a web page shopping cart and went to my email for a second and when I came back to safari by double click home butto

  • Delete photos taken on the same day

    Hi. I have hundreds of photos taken on the same day each. How to delete photos taken on the same day? Or I would have to ask like this, how to select all photos that were taken on the same day?