Calling EJB from from a client app

Hi all,
I am trying to call an EJB component from portal. The example EJB I have taken is from SDN Bonus Calculator example - Application Server/Web Dynpro/Samples and Tutorials/Using EJBs (20)
I deployed the EAR file - no issue
I wrote the following code in a client app and trying to connect to the EJB remotely.
          try {
               java.util.Properties properties = new Properties();
               properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
               properties.put(Context.PROVIDER_URL, "ux0800:55304");
               InitialContext ctx = new InitialContext(properties);
               //InitialContext ctx = new InitialContext();
               // get ejb home
               home =
                    (BonusCalculatorLocalHome) ctx.lookup(
                         "localejbs/MySessionBean");
               theCalculator = home.create();
          } catch (Exception namingException) {
               namingException.printStackTrace();
I get the following error
javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at com.sap.bonus.calculation.sessionBean.MyCommandBean.<init>(MyCommandBean.java:27)
     at com.sap.bonus.calculation.sessionBean.MyCommandBean.main(MyCommandBean.java:68)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
Any clue will be appreciated.
thnx

Hi Sabbir,
Following code works for me in calling EJB from normal java application. Did you added the jar files to your application?. see the required jar files in end of code.
Create simple java applcation do the following steps:
Give JNDI name to the EJB(HelloJNDI)->Add the HelloEJB to HelloEAR ->deploy
Proxy Program to call ejb:
import javax.naming.Context;
import javax.naming.InitialContext;
import com.sample.Hello;
import com.sample.HelloHome;
public class HelloTest {
     public static void main(String[] args) {
                   Hello remote = null;
                  try {
                    Context ctx = new InitialContext();
                    HelloHome home = (HelloHome) ctx.lookup("HelloJNDI");
                    remote = home.create();
                    String result = remote.hello();
                    System.out.print("Result:" + result);
                     } catch (Exception e) {
                            System.out.println("Exception:" + e.getLocalizedMessage());
1. Go To  Run > Java Application ->New->select your project and select your main class(java program from which your going to call EJB)
2. Click  next tab ->(x)=Arguments
paste the following code in VM Arguments
-Djava.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl -Djava.naming.provider.url=localhost:50104
replace the server IP address with your server IP address where your ejbs are running.
Under Class path settings for the program put the following jar files.
You can search for them from net weaver soruce folders
or copy from D:\usr\sap\J2E\JC01\j2ee\j2eeclient
ejb20.jar
logging.jar
exception.jar
sapj2eeclient.jar
Add Corresponding ejb.jar
and RUN >>>
this makes testing of your client programs easier, you can find the error trace on which line and saves lot of time.
Regards, Suresh

Similar Messages

  • Calling EJB from app client

    Hello, everybody,
    I'm very new at EJB and I'm trying to learn it.
    I have created Enterprise Application using Netbeans IDE, I have EJB and APP client. What I want is to connect to my MySql database and get some info from table.
    For e.g. Login and Password.
    How can I call EJB from my client app which connects to my database and gets information I need?

    What server you are using?
    if you use jboss AS ,here is a simple Main class how to connect EJB and access ejb methods:
    package com.david.ejb.client;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import com.david.ejb.domain.Person;
    import com.david.ejb.domain.PersonRemote;
    public class Main {
         public static void main(String[] args) {
              try {
                   Context ctx = getInitialContext();
                   Object obj = ctx.lookup("PersonSessionRemote/remote");
                PersonRemote pr=(PersonRemote)PortableRemoteObject.narrow(obj, PersonRemote.class);
                Person p=new Person();
                p.setName("david");
                pr.addPerson(p);
                pr.findPerson(1);
                   // System.out.print(br.find(pk).getAuthor_name());
              } catch (Exception ex) {
                   ex.printStackTrace();
         private static Context getInitialContext() throws NamingException {
              Properties p = new Properties();
              p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
              p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
              p.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
              return new InitialContext(p);
    }Person is ant @Entity and PersonRemote is remote interfaces, to connect database you have to make datasource file at jboss-4.2.3.GA\server\default\deploy
    simle mysql-ds.xml looks like this:
    datasources>
       <local-tx-datasource>
          <jndi-name>some name</jndi-name>
          <connection-url>jdbc:mysql://localhost:3306/dbname</connection-url>
          <driver-class>com.mysql.jdbc.Driver</driver-class>
          <user-name>root</user-name>
          <password>root password</password>
          <min-pool-size>5</min-pool-size>
          <max-pool-size>100</max-pool-size>
          <idle-timeout-minutes>15</idle-timeout-minutes>
          <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
          <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
       </local-tx-datasource>
    </datasources>also at resources/META-INF directory you must have persistence.xml like this
    <persistence>
         <persistence-unit name="SimpleEjb">
              <jta-data-source>java:/some name</jta-data-source>
              <properties>
                   <property name="hibernate.hbm2ddl.auto" value="update" />
                   <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
                   <property name="hibernate.show_sql" value="true"/>
                   <property name="hibernate.format_sql" value="true"/>
              </properties>
         </persistence-unit>
    </persistence>

  • Calling EJB from other EJB on other J2EE Server

    Can I call EJB from other EJB on other J2EE Server
    Servers - Websphere 5.0
    Do i require home & remote interface of that ejb on client side also
    Help me, please

    the problem is actually i require that is specific to websphere
    for example i want to call a method ion that ejb
    say my ejb name is myejb
    so the normal way i should call is
    InitialContext initialContext = new InitialContext();     
    Object homeObject = initialContext.lookup("ejb/MyEjbHome");
    MyEJBHome myEJBHome =(MYEjbHome )javax.rmi.PortableRemoteObject.narrow(homeObjectMYEjbHome.class);
              myEJB = lSHome.create();
    myEJB.someMethod();
    but here i am having class for home and remote available
    now if other app server i am not having this classes then what to do

  • Error while running EJB from java client on JBOSS

    Hi
    As i am new to EJB i have created a helloworld application in ejb which is working fine when i try to call it from servlet but when i try to invoke the same ejb from java client (i.e from diff jvm) on jboss i got the following error:
    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.gl.TestClient.main(TestClient.java:39)
    Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
         ... 4 more
    Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
         ... 5 more
    Caused by: java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:266)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
         ... 5 more
    Following is my code:
    Home Interface:
    package com.gl;
    import javax.ejb.CreateException;
    public interface testHome extends EJBHome {
         String JNDI_NAME = "testBean";
         public     test create()
         throws java.rmi.RemoteException,CreateException;
    Remote Interface:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface test extends EJBObject {
         public String welcomeMessage() throws RemoteException;
    Bean:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class testbean implements SessionBean {
         public void ejbActivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbPassivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbRemove() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void setSessionContext(SessionContext arg0) throws EJBException,
                   RemoteException {
              // TODO Auto-generated method stub
         public void ejbCreate(){}
         public String welcomeMessage(){
              return "Welcome to the World of EJB";
    ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>testBean</ejb-name>
    <home>com.gl.testHome</home>
    <remote>com.gl.test</remote>
    <ejb-class>com.gl.testbean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    jboss.xml:
    <?xml version='1.0' ?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>testBean</ejb-name>
    <jndi-name>testBean</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    Client code:
    package com.gl;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class TestClient {
         public static void main(String[] args) throws Exception{
                   try{
                   /*     Properties props=new Properties();
                        props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                        props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                   Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost:1099");
                        System.out.println("Properties ok");
                        //env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
                        //env.put(Context.PROVIDER_URL,"http://localhost:8080");
                        //env.put(Context.SECURITY_PRINCIPAL, "");
                        //env.put(Context.SECURITY_CREDENTIALS, "");
                        Context ctx=new InitialContext(props);
                        System.out.println("context ok");
                        //testHome home = (testHome)ctx.lookup("testBean");
                        Object obj = ctx.lookup ("testBean");
                        System.out.println("ojb = " + obj);
                        testHome ejbHome = (testHome)PortableRemoteObject.narrow(obj,testHome.class);
                   test ejbObject = ejbHome.create();
                   String message = ejbObject.welcomeMessage();
                        System.out.println("home ok");
                        System.out.println("remote ok");
                        System.out.println(message);
                        catch(Exception e){e.printStackTrace();}
    I am able to successfully deployed my ejb on JBOSS but i m getting above error when i am trying to invoke ejb from java client.
    kindly suggest me something to solve this issue.
    Regards
    Gagan
    Edited by: Gagan2914 on Aug 26, 2008 3:28 AM

    Is it a remote lookup? Then maybe this will help:
    [http://wiki.jboss.org/wiki/JBoss42FAQ]
    - Roy

  • Call ejb from browsers

    Hello Developers!
    I deployed my ejb to OAS4081. I call that
    from JDeveloper so it good. But when I try
    to call from applet in IExpl5 I can't
    instantiate the ORB. I've got a com.ms.security.SecurityException : oracle.oas.orb.CORBA.ORB.init
    I coded the CLASSPATH(oasoorb(yoj),client,
    ejbapi...) perfectly, I think.
    If anybody could help, please...
    Thanx!

    Hi there,
              I saw someone on this group had a problem to locate proper classpath
              to call EJB from JSP. I thought if you call EJB from classpath, you are
              calling the bean. But you loss all the EJB functions. To be able to utilize
              EJB features like object pooling. You need to call it from Weblogic server
              using url/jndi, not from the jar directly.
              Any comment? Am I right?
              BTW, my question about calling EJB from JSP means calling through URL,
              not a local path.
              Thank you
              >-------------------------------------------------------------------->
              Jim wrote in message <[email protected]>...
              >Hi there,
              > Can I call EJB from JSP? Is there a particular security setting or
              >concern for Weblogic? Is there an coding example?
              >
              >Thank you
              >
              >
              

  • Calling EJB from Java Stored Procedures

    Hi,
    I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
    It is not working when I am trying to call EJB from it. It is giving compile-time error.
    If anybody has implemented the same please suggest how to go forward.
    thanks in advance,
    Shashank Agarwal

    I tried the same thing without any luck. I assume you are using OC4J for your EJB ...
    The compiling issue may be because you don't have the classes in your EJB client jar loaded into the database. Once those classes are loaded, you should loadjava without any problem.
    However, you won't be able to call the EJB server because the EJB client (your Java code in the DB) will need the OC4J environment (oc4j.jar). I have tried to load oc4j.jar into the DB as well, and that was a big mess and nothing worked. My DB is 8.1.7, maybe the new 9i have OC4J libs bundled?!?
    I looked around and only found 2 alternatives:
    1. Write a JSP page that acts like an EJB client, then use URLConnection in your DB java code to send params to the JSP for it to invlode the EJB
    2. Replace the JSP with RMI code, and use RMI instead of URLConnection in your DB code to invloke the EJB client.
    If you find any other solution, please share it here.
    Good luck!
    Hi,
    I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
    It is not working when I am trying to call EJB from it. It is giving compile-time error.
    If anybody has implemented the same please suggest how to go forward.
    thanks in advance,
    Shashank Agarwal

  • Run a report in reports server calling it from a client/server form

    How can I run a report in reports server calling it from a client/server form ?
    Thanks

    In client server mode you can use RUN_PRODUCT built-in. Lookup help for this built-in for more details.
    Best of luck!

  • Call OSB from java client

    Hi',
    I am trying to call OSB from java client,
    The OSB proxy Service type is "WSDL Web Service", I am able to get response from SOAP UI with below request, Please help me with Java code,
    I have been Googling a lot for this however didnt got enough.
    Thanks
    Yatan
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://core.xxx.com/schema/ServiceHeader/V1.0" xmlns:v11="http://core.xxx.com/schema/Customer/V1.0" xmlns:v12="http://core.xxx.com/schema/Customer/V1.0">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>weblogic</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome1</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    <v1:GMWSHeader>
    <v1:SourceId>String</v1:SourceId>
    <v1:TransactionId>String</v1:TransactionId>
    <v1:TransactionTimeStamp>1967-08-13</v1:TransactionTimeStamp>
    <v1:ServiceVersion>LATEST</v1:ServiceVersion>
    </v1:GMWSHeader>
    </soapenv:Header>
    <soapenv:Body>
    <v11:GetDetailsRequest>
    <v11:Condition>
    <v12:SellingSource>?</v12:SellingSource>
    <v12:FulfillingFCNNbr>?</v12:FulfillingFCNNbr>
    </v11:Condition>
    </v11:GetDetailsRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    Thanks Guys, I tried the ways you mentioned I am getting below error, this error is coming in both weblogic clientgen and webservice proxy from jdeveloper,
    I understand that this error has something to do with my process however not sure why is it coming, I will really appreciate if you can provide me some pointers.
    error:
    Buildfile: C:\JDeveloper\OSBClient\TestOSBClient\build.xml
    javaFromWSDL:
    [clientgen]
    *********** jax-ws clientgen attribute settings ***************
    wsdlURI: http://localhost:8001/xx/som/contracts/CustomerContract?wsdl
    packageName : com.osb.client
    destDir : C:\OSB
    *********** jax-ws clientgen attribute settings end ***************
    [clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
    [clientgen] parsing WSDL...
    [clientgen]
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.SOMMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "SOMMessage" is generated from here.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "TaskCompletionMessage" is generated from here.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    BUILD FAILED
    weblogic.wsee.tools.WsBuildException: Error running JAX-WS clientgen: null
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:175)
         at weblogic.wsee.tools.anttasks.ClientGenFacadeTask.execute(ClientGenFacadeTask.java:244)
         at weblogic.wsee.tools.anttasks.ClientGenTask.execute(ClientGenTask.java:365)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatinxxethodAccessorImpl.invoke(DelegatinxxethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.Main.start(Main.java:179)
         at org.apache.tools.ant.Main.main(Main.java:268)
    Caused by: Error starting wsimport:
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:757)
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:169)
         ... 19 more
    Caused by: com.sun.tools.ws.wscompile.AbortException
         at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:136)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2255)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:194)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:140)
         at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:261)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:203)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:188)
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:738)
         ... 20 more
    Total time: 3 seconds

  • How to call ejb from a Swing gui application client?

    Hi Everyone,
    I am new to EJB and I have question for calling an ejb from a Swing GUI application client. Can anyone give me an example of how my Swing GUI can call an EJB from a SUN ONE Application Server. If anyone can give me some insight, I appreciate it.

    I have looked up various sources and just can't get it to work. I know I have to use the lookup() method, but I have also seen lookups using IIOP://servename......
    Context ctx = getInitialContext();
    DemoHome dhome = (DemoHome)ctx.lookup("demo.DemoHome");
    or
    Context ctx = getInitialContext();
    DemoHome dhome = (DemoHome)ctx.lookup(java:comp/......)
    so can anyone tell what is the difference between using iiop://servername..... as the lookup string and java:comp/......
    and if using java:comp/ what does this mean? Does it mean that lookup() method is looking for the ejb somewhere in this directory. I would really appreciate if someone can give an example of a Swing GUI calling a ejb from an application server and how the code is actually doing the lookup in and what are each steps it goes through.
    Thanks

  • Calling ejbs from servlets without using web apps.

    i am trying to instantiate and ejb from a servlet but it gives me the
              following error. the configuration and code that generated this error is
              attached below.
              oddly enough the same chunk of code works fine in a stand alone client if
              j2ee.jar;weblogic\classes and weblogicaux.jar are included in the classpath.
              any help would be appreciated.
              peter
              -8787844: in servlet.Webmedx.init
              -8787844: null
              java.lang.ClassCastException
              at
              com.sun.corba.ee.internal.javax.rmi.PortableRemoteObject.narrow(Porta
              bleRemoteObject.java:296)
              at
              javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
              at webmedx.servlet.Webmedx.init(Webmedx.java:23)
              at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              at
              weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
              pl.java:474)
              at
              weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
              Impl.java, Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
              mpl.java:422)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              java:187)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:118)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:760)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:707)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:369)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              configuration:
              WebLogic startup settings are presently:
              CLASSPATH Prefix
              \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar
              CLASSPATH
              \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar;\weblo
              gic\
              jre1_2\lib\tools.jar;\weblogic\jre1_2\jre\lib\rt.jar;\weblogic\jre1_2\jre\li
              b\i1
              8n.jar;C:\weblogic\license;C:\weblogic\classes\boot;C:\weblogic\classes;C:\w
              eblo
              gic\lib\weblogicaux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
              JAVA_HOME \weblogic\jre1_2
              WEBLOGIC_LICENSEDIR C:\weblogic\license
              WEBLOGIC_HOME C:\weblogic
              system properties:
              java.security.manager
              java.security.policy=\weblogic\weblogic.policy
              weblogic.system.home=\weblogic
              java.compiler=symcjit
              weblogic.class.path=\weblogic\lib\weblogic510sp5.jar;\weblog
              ic\license;\weblogic\classes;\weblogic\lib\weblogicaux.jar
              INITIAL_HEAP 64 MB
              MAX_HEAP 64 MB
              SERVERCLASSPATH
              \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar;\weblo
              gic\
              jre1_2\jre\lib\rt.jar;\weblogic\jre1_2\jre\lib\i18n.jar;C:\weblogic\classes\
              boot
              ;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
              Type "wlconfig -help" for program usage.
              code:
              public void init() throws ServletException{
              try{
              Log.debug("in servlet.Webmedx.init");
              Properties h = new Properties();
              h.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
              h.put(Context.PROVIDER_URL, "t3://localhost:7001");
              Context initial = new InitialContext(h);
              Object objref = initial.lookup("webmedx/pool");
              webmedxpoolhome =
              (WebmedxPoolHome)PortableRemoteObject.narrow(objref,WebmedxPoolHome.class);
              }catch(Exception ex){
              Log.error(ex);
              

    The problem before was that you were trying to load the same class from
              2 different class paths. The ClassCastException is very un-intuitive in this
              case.
              Peter Ghosh wrote:
              > however, when i added it to the classpath prefix (not the
              > weblogic.classpath) it seemed to do the trick. very odd.
              > thanks,
              > peter
              >
              > "Peter Ghosh" <[email protected]> wrote in message
              > news:[email protected]...
              > > i tried that but no luck. any other suggestions?
              > > peter
              > >
              > > "Ohad Shany" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Is your EJB classes on the servlet classpath?
              > > > (weblogic.httpd.servlet.classpath property)
              > > >
              > > > I had some strange casting problem when my EJB classes was on the
              > servlet
              > > > classpath
              > > > and it was gone when i moved them to the weblogic.class.path . Worth a
              > > try.
              > > >
              > > > OHAD
              > > >
              > > > Peter Ghosh wrote:
              > > >
              > > > > i am trying to instantiate and ejb from a servlet but it gives me the
              > > > > following error. the configuration and code that generated this error
              > is
              > > > > attached below.
              > > > > oddly enough the same chunk of code works fine in a stand alone client
              > > if
              > > > > j2ee.jar;weblogic\classes and weblogicaux.jar are included in the
              > > classpath.
              > > > > any help would be appreciated.
              > > > > peter
              > > > >
              > > > > -8787844: in servlet.Webmedx.init
              > > > > -8787844: null
              > > > > java.lang.ClassCastException
              > > > > at
              > > > > com.sun.corba.ee.internal.javax.rmi.PortableRemoteObject.narrow(Porta
              > > > > bleRemoteObject.java:296)
              > > > > at
              > > > > javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
              > > > > at webmedx.servlet.Webmedx.init(Webmedx.java:23)
              > > > > at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              > > > > at
              > > > > weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
              > > > > pl.java:474)
              > > > > at
              > > > > weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
              > > > > Impl.java, Compiled Code)
              > > > > at
              > > > > weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
              > > > > mpl.java:422)
              > > > > at
              > > > > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              > > > > java:187)
              > > > > at
              > > > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              > > > > pl.java:118)
              > > > > at
              > > > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > > > textImpl.java:760)
              > > > > at
              > > > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > > > textImpl.java:707)
              > > > > at
              > > > > weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              > > > > ContextManager.java:251)
              > > > > at
              > > > > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              > > > > a:369)
              > > > > at
              > > > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              > > > >
              > > > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              > > > > Code)
              > > > >
              > > > > configuration:
              > > > >
              > > > > WebLogic startup settings are presently:
              > > > >
              > > > > CLASSPATH Prefix
              > > > > \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              > > > > logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar
              > > > > CLASSPATH
              > > > > \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              > > > >
              > >
              > logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar;\weblo
              > > > > gic\
              > > > >
              > >
              > jre1_2\lib\tools.jar;\weblogic\jre1_2\jre\lib\rt.jar;\weblogic\jre1_2\jre\li
              > > > > b\i1
              > > > >
              > >
              > 8n.jar;C:\weblogic\license;C:\weblogic\classes\boot;C:\weblogic\classes;C:\w
              > > > > eblo
              > > > > gic\lib\weblogicaux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
              > > > > JAVA_HOME \weblogic\jre1_2
              > > > > WEBLOGIC_LICENSEDIR C:\weblogic\license
              > > > > WEBLOGIC_HOME C:\weblogic
              > > > > system properties:
              > > > > java.security.manager
              > > > > java.security.policy=\weblogic\weblogic.policy
              > > > > weblogic.system.home=\weblogic
              > > > > java.compiler=symcjit
              > > > >
              > > > > weblogic.class.path=\weblogic\lib\weblogic510sp5.jar;\weblog
              > > > > ic\license;\weblogic\classes;\weblogic\lib\weblogicaux.jar
              > > > > INITIAL_HEAP 64 MB
              > > > > MAX_HEAP 64 MB
              > > > > SERVERCLASSPATH
              > > > > \weblogic\lib\weblogic510sp5boot.jar;\j2ee\lib\j2ee.jar;\web
              > > > >
              > >
              > logic\lib\servlet.jar;\weblogic\lib\jaxp.jar;\weblogic\lib\parser.jar;\weblo
              > > > > gic\
              > > > >
              > >
              > jre1_2\jre\lib\rt.jar;\weblogic\jre1_2\jre\lib\i18n.jar;C:\weblogic\classes\
              > > > > boot
              > > > > ;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
              > > > >
              > > > > Type "wlconfig -help" for program usage.
              > > > >
              > > > > code:
              > > > >
              > > > > public void init() throws ServletException{
              > > > > try{
              > > > > Log.debug("in servlet.Webmedx.init");
              > > > > Properties h = new Properties();
              > > > > h.put(Context.INITIAL_CONTEXT_FACTORY,
              > > > > "weblogic.jndi.WLInitialContextFactory");
              > > > > h.put(Context.PROVIDER_URL, "t3://localhost:7001");
              > > > > Context initial = new InitialContext(h);
              > > > > Object objref = initial.lookup("webmedx/pool");
              > > > > webmedxpoolhome =
              > > > >
              > > > >
              > >
              > (WebmedxPoolHome)PortableRemoteObject.narrow(objref,WebmedxPoolHome.class);
              > > > > }catch(Exception ex){
              > > > > Log.error(ex);
              > > > > }
              > > > > }
              > > >
              > >
              > >
              

  • Calling EJB from class in same ear

    Has anyone ever attempted to call an EJB from a class that is in the same ear?
    I have a singleton class, not
    another EJB, that is trying to get ahold of an EJB to call a method. This method
    has been defined to have both
    a local and remote interface.
    I thought I should be able to get a hold of the local interface. When I try to
    get the interface out of JNDI
    as follows:
    PickupCpaLocalHome cpaHome = (PickupCpaLocalHome) ctx.lookup("pickup.PickupCpaEJBLocal");
    I get an exception:
    javax.naming.LinkException: [Root exception is
         javax.naming.NameNotFoundException: Unable to resolve
         'app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home' Resolved: 'app/ejb'
         Unresolved:'PickupCpaEJB.jar#PickupCpaEJB' ; remaining name
         'PickupCpaEJB.jar#PickupCpaEJB/local-home']; Link Remaining Name:
    'java:app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home'
    When I look at the JNDI tree using the WebLogic console, it shows that "pickup.PickupCpaEJBLocal"
    is
    in JNDI.
    Since the local interface doesn't work, I thought I'd try the remote interface.
    The remote interface
    works fine from my client and from another EJB in a different ear. Using the
    remote interface I get an
    exception when trying to cast the result to my home.
    java.lang.ClassCastException:
    com.fedex.pickup.j2ee.ejb.cpa.PickupCpaEJB_gapk5_HomeImpl_WLStub
    // Code
    PickupCpaHome cpaHome = (PickupCpaHome) ctx.lookup("pickup.PickupCpaEJBRemote");
    As I mentioned earlier, the same code works in a client and in an EJB in another
    ear.
    Any ideas

    Has anyone ever attempted to call an EJB from a class that is in the same ear?
    I have a singleton class, not
    another EJB, that is trying to get ahold of an EJB to call a method. This method
    has been defined to have both
    a local and remote interface.
    I thought I should be able to get a hold of the local interface. When I try to
    get the interface out of JNDI
    as follows:
    PickupCpaLocalHome cpaHome = (PickupCpaLocalHome) ctx.lookup("pickup.PickupCpaEJBLocal");
    I get an exception:
    javax.naming.LinkException: [Root exception is
         javax.naming.NameNotFoundException: Unable to resolve
         'app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home' Resolved: 'app/ejb'
         Unresolved:'PickupCpaEJB.jar#PickupCpaEJB' ; remaining name
         'PickupCpaEJB.jar#PickupCpaEJB/local-home']; Link Remaining Name:
    'java:app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home'
    When I look at the JNDI tree using the WebLogic console, it shows that "pickup.PickupCpaEJBLocal"
    is
    in JNDI.
    Since the local interface doesn't work, I thought I'd try the remote interface.
    The remote interface
    works fine from my client and from another EJB in a different ear. Using the
    remote interface I get an
    exception when trying to cast the result to my home.
    java.lang.ClassCastException:
    com.fedex.pickup.j2ee.ejb.cpa.PickupCpaEJB_gapk5_HomeImpl_WLStub
    // Code
    PickupCpaHome cpaHome = (PickupCpaHome) ctx.lookup("pickup.PickupCpaEJBRemote");
    As I mentioned earlier, the same code works in a client and in an EJB in another
    ear.
    Any ideas

  • How to call ejb from Forms?

    Hi.
    I have an existing form (version 11.1.2.0.0) and an existing ejb. Both are running on a WebLogic server version 10.3.5.0. I want to call the ejb from the form (I know that this is not recommended, but in this case it is the only sensible solution). I have tried searching the web but I have not been able to find anything about this except some broken links.
    Can somebody please explain how to do this or show me some documentation or tutorial?
    Regards,
    Sveinung
    Edited by: SvSig on Aug 7, 2012 11:52 PM

    Let's skip the fact that you are asking about an EJB and instead talk about what options are available to call out to any external app or component. Here are some of the options:
    <blockquote>1. To make calls from the client machine to any web server (HTTP listener) you can use WEB.SHOW_DOCUMENT. This command simply passes a url to a browser. No return information is passed back into the running form.
    2. To make calls from the client machine to almost any process on the client side, including the OS directly, you would need to create a java bean and integrate it into your form. Whether or not you get return information will depend on how you write the bean and to what you are calling.
    3. To make calls from the server side (mid tier) part of a running form to an external application or component on the same mid tier you can use the HOST command. This executes a shell command. Although specific information cannot be returned (i.e. return values), you can get pass or fail results.
    4. To call out to java applications on the mid tier you can import java code into your Forms application using the Forms Java Importer. This will give you a direct connection to the java application both in and out.</blockquote>
    All of the above examples are explained in the Forms Builder online help. There are other options which are explained in the Forms Deployment Guide
    <blockquote>http://docs.oracle.com/cd/E24269_01/doc.11120/e24477/toc.htm</blockquote>
    Look specifically at chapters 6-8
    <blockquote><li>6 Oracle Forms and JavaScript Integration
    <li>7 Enhanced Java Support
    <li>8 Working with Server Events</blockquote>
    Summary
    <blockquote><li>WEB.SHOW_DOCUMENT
    <li>HOST
    <li>Java Bean
    <li>Imported Java</blockquote>

  • Call EJB from Start Up class

    I'm using OC4J 10.1.3 Standalone.
    I have a requirement to initialize web services and configuration parameters during app server start up.
    Accordingly,I planned to call a EJB 2.0 stateless session bean from a StartUp class.
    The ejb is responsible for initializing some configurations and web services.The ejb is dependent on some other classes which are present as utility jars .
    However,I cannot somehow figure out how to refer the EJB from my startup class because the EAR which contains the EJB jar is in a child loader to that containing the startup class.
    Please guide me!! Please suggest if some alternative approach could be taken to suffice my requirement.
    TIA

    Avi, I was just waiting for the "servlet hack".
    I really prefer the application client way, much cleaner, no servlet container needed, and could be tested outside the container.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                       

  • Calling EJB from an applet in 9iAS Release 2?

    Hello!
    In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
    Will 9iAS Rel. 2 support Applets calling EJBs?

    Jeff,
    I am also trying to make an applet client for an EJB deployed to OC4J.
    I modified the java2.policy file as you suggested, but when I tried to run my applet, I
    got the following error:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
         at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
         at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
         at EJBApplet.jbInit(EJBApplet.java:47)
         at EJBApplet.init(EJBApplet.java:36)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
    5.0 with the java 1.3.1 plug-in.
    Here is the applet code that I use to lookup the EJB home interface:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
    props.put(Context.SECURITY_PRINCIPAL,"admin");
    props.put(Context.SECURITY_CREDENTIALS,"password");
    Context ctxt = new InitialContext(props);
    Object homeObj = ctxt.lookup("my_bean");
    MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
    The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
    web application. The applet class file is located in a subdirectory of the default-web-app
    directory. Here is the HTML page...
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    HTML Test Page
    </TITLE>
    </HEAD>
    <BODY>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
    <param name="java_code" value="EJBApplet">
    <param name="java_codebase" value="/tests">
    <param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
    <param name="java_type" value="application/x-java-applet;version=1.3">
    <param name="java_scriptable" value="true">
    <table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
    <tr><td>
    This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
    </table>
    </object>
    </BODY>
    </HTML>
    I have searched the Internet, and the documentation, and tried several, different things,
    but I can't get it to work.
    Any and all help will be greatly appreciated.
    Thanks,
    Sofia.

  • Calling EJB from WL 7.0 to WL 5.1

    Hello All,
    Here is my situation. There are 3 app servers. App server 1 and 2 are WL 7.0.
    App server 3 is WL 5.1. EJB A is deployed in App server 1. EJB B is deployed in
    app servers 2 and 3. For EJB B deployed in app server 3, I compiled using WL 5.1
    classes. When I call the EJB B deployed in app server 3 from EJB A deployed in
    app server 1, I am getting the following exception:
    javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException:
    [Login failed: 'Incompatible version:Incompatible versions - this server:5.1.0
    client:7.0.4.0]]
    I have read earliar documentation, but the solution is not clear. I have tried
    calling the EJB B using iiop( I compiled using -iiop option) instead of t3 and
    that is not working either.
    Thanks for the help.

    "Jeba Bhaskaran" <[email protected]> writes:
    There are a bunch of interop fixes for 5.1 that you probably
    require. Please go through support to obtain these.
    andy
    Hello All,
    Here is my situation. There are 3 app servers. App server 1 and 2 are WL 7.0.
    App server 3 is WL 5.1. EJB A is deployed in App server 1. EJB B is deployed in
    app servers 2 and 3. For EJB B deployed in app server 3, I compiled using WL 5.1
    classes. When I call the EJB B deployed in app server 3 from EJB A deployed in
    app server 1, I am getting the following exception:
    javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException:
    [Login failed: 'Incompatible version:Incompatible versions - this server:5.1.0
    client:7.0.4.0]]
    I have read earliar documentation, but the solution is not clear. I have tried
    calling the EJB B using iiop( I compiled using -iiop option) instead of t3 and
    that is not working either.
    Thanks for the help.

Maybe you are looking for