Calling .ejb from .ejb

I am using Weblogic Workshop WLS8.1. I have one .ejb calling another .ejb. Appearenlty,
MyBeanHome.java MyBean.java resolve in the workshop. But they are not resolving
when I use ant build. Any suggestions.
Thanks

Hi John,
check the following URLS's for your requirement
1>procedure  for  Accessing  WebService in ejb By using NetWeaver,
2>i am using webservice in ejb but it is giving Naming exception in NetWeaver  (if you get naming exception while calling webservice from ejb)
3>http://help.sap.com/saphelp_webas630/helpdata/en/2c/ce9535c22ecd4db8820e238c3acce0/frameset.htm    (Accessing the Web Services Context from a WS-EJB )
4>Webservice call does not return data
Do reward points if it helps

Similar Messages

  • Call RFC from EJB code

    Hi,
         I have a scenario where I need to write an EJB from where I need to execute a JCO call to an RFC. This RFC takes an XString as input (this is the input file) and returns a XString from which an XML needs to be generated.
    Can anyone suggest how to go about this?
    Thanks,
    Shiladitya

    JRA is the way to go....
    check my blog on this...
    /people/amol.joshi2/blog/2006/11/27/alerts-from-adapter-modules--the-jra-way

  • Calling ejb from ejb of other container

    Hi,
    My problem is : I have one application that call one EJB. This EJB must call another EJB from other container, in other server... Is it possible ???? How can I make this ????? I'm trying to call BuscaEnderecoHome from BuscaCEPBean....
    I'm trying to do that but I'm having the following problem :
    Oracle9iAS (1.0.2.2.1) Containers for J2EE initialized
    Exception --> Erro em setSessionContext (ServicoPostalECTBean) - ERROR :
    ejb/BuscaEnderecoHome not found in BuscaCEPBean
    java.lang.NullPointerException
    at com.ect.corporate.ejb.CEP.consultaPorCep(CEP.java:78)
    at com.ect.corporate.ejb.BuscaCEPBean.consultaPorCEP(BuscaCEPBean.java:7
    2)
    at BuscaCEP_StatelessSessionBeanWrapper0.consultaPorCEP(BuscaCEP_Statele
    ssSessionBeanWrapper0.java:54)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:66)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Erro null

    Hi,
    My problem is : I have one application that call one EJB. This EJB must call another EJB from other container, in other server... Is it possible ???? How can I make this ????? I'm trying to call BuscaEnderecoHome from BuscaCEPBean....
    I'm trying to do that but I'm having the following problem :
    Oracle9iAS (1.0.2.2.1) Containers for J2EE initialized
    Exception --> Erro em setSessionContext (ServicoPostalECTBean) - ERROR :
    ejb/BuscaEnderecoHome not found in BuscaCEPBean
    java.lang.NullPointerException
    at com.ect.corporate.ejb.CEP.consultaPorCep(CEP.java:78)
    at com.ect.corporate.ejb.BuscaCEPBean.consultaPorCEP(BuscaCEPBean.java:7
    2)
    at BuscaCEP_StatelessSessionBeanWrapper0.consultaPorCEP(BuscaCEP_Statele
    ssSessionBeanWrapper0.java:54)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:66)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Erro null

  • ClassCastException calling EJB from EJB (diff  EARs) Urgent please help !!

    Hi,
    I�m trying to call a Remote EJB ( in jdev BBEAN.prj ) from another EJB (in jdev ABEAN.prj) located in a different EAR.
    In JDEVELOPER (oc4j 9.0.3) I also considered BBEAN as a libreary which is included in the ABEAN project.
    So that the ABEAN JAR contains the class definition for the Home and remote interface.
    From the ABEAN bean I call this code:
    DO ()
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "manager");
    env.put(Context.PROVIDER_URL, "ormi://GSARNO-1/BBean");
    return new InitialContext(env);
    BBeanHome BBeanHome = (BBeanHome)PortableRemoteObject.narrow(context.lookup("BBean"), BBeanHome.class);
    BBean bBean;
    ������������..
    After having deployed both projects I then run a client (Calling the Do function).
    Doing so I keep receiving the following error when calling narrow.
    java.lang.ClassCastException
    java.lang.Object com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
    PortableRemoteObject.java:296
    java.lang.Object javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
    PortableRemoteObject.java:137
    java.lang.String mypackage1.impl.MySessionEJBBean.Do()
    MySessionEJBBean.java:39
    java.lang.String MySessionEJB_StatelessSessionBeanWrapper6.Do()
    MySessionEJB_StatelessSessionBeanWrapper6.java:85
    java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
    native code
    void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
    RMICallHandler.java:119
    void com.evermind.server.rmi.RMICallHandler.run()
    RMICallHandler.java:48
    void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
    PooledExecutor.java:803
    void java.lang.Thread.run()
    Thread.java:484
    Can anyone help ?
    What should I do to call remote e/o local interfaces located on different EARs ?
    I�m using OC4J 9.0.3

    Hi Giuseppe,
    If both EAR files are in the same OC4J instance you do not have to use RMIInitialContextFactory to invoke the EJB. You have to do the following:
    In OC4J
    1) Make the BBEAN as the parent for ABEAN application defined in the server.xml as follows:
    application name="ABEAN" path="../applications/abean.ear" parent="BBEAN" auto-start="true" />
    2)
    You can define ejb-ref or ejb-local-ref in the deployment descriptor of your application
    3) You can use the default InitialContext to lookup your EJB as if both EJBs are in the same application
    regards
    Debu

  • Calling Servlets from EJB

    Please can anyone help me out of how to make sevlet calls from EJB? Example source code if available will be of great help too.
    I know that this is a rare senario but this is required for a very urgent work.

    Vladimir - thanks again !!
    I am getting closer, I have 3 errors for "cannot resolve symbol"
    .../work/jsp_testmap1175186470750.java:78: cannot resolve symbol
    symbol  : class mappingservices
    location: package appsrv
    fsd.oms.appsrv.mappingservices mappingServicesLocal = null;
                          ^
    .../work/jsp_testmap1175186470750.java:79: cannot resolve symbol
    symbol  : class mappingservices
    location: package appsrv
    mappingServicesLocal = (fsd.oms.appsrv.mappingservices)pageContext.getAttribute("mappingServicesLocal", PageContext.SESSION_SCOPE);
                                                               ^
    .../work/jsp_testmap1175186470750.java:85: cannot resolve symbol
    symbol  : class mappingservices
    location: package appsrv
    mappingServicesLocal = (fsd.oms.appsrv.mappingservices) Beans.instantiate(getClass().getClassLoader(), "fsd.oms.appsrv.mappingservices");
                                                               ^
    3 errors
    (all ^ point between appsrv and mappingservices)
    This appears to be a classpath issue? Could this fall under this SAP note?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_jas/~form/handler
    Or do you know of issues with string methods instead of object methods?
    Those were a couple of posts I found, that seemed similar, but not really. I appreciate the experienced help and your thoughts!
    thanks again - Allen

  • Calling non ejb from ejb using jndi lookup

    Is it possible to call a non ejb java object from an ejb using a jndi lookup?
    For example, we have a java class where main registers itself with our application server (JBoss 3.0.1). We have a test client that can use jndi to look up the object, but we can't get an ejb inside the application server to use the object.
    Are we trying to do the impossible? If my question is not clear, please let me know so I can try to clarify.
    Thanks

    JNDI uses factories to create objects.
    It's possible that JBoss has a Bean Factory which you can use to create your instance.
    Tomcat has a Bean factory in its JNDI implementation. I use it just as you have indicated.
    The JBoss documenation may help?
    Dave

  • 125: VALUE_HOLDER_INSTANTIATION_MISMATCH while calling toplink from ejb

    Hi Folks
    I am calling registerNewObject from from a stateless session ejb.
    The object i wanted to persist is as below
    A--> Collection B ---
    each item in collection B is mapped as one to one mapping to object C.
    When I try to persist it, i get following excecption:
    Exception [TOPLINK-125] (OracleAS TopLink - 10g (9.0.4.9) (Build 060118)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The mapping for the attribute [RPGOperRole] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
    anything missing that should be done when calling from ejb

    You need to initialize your variable RPGOperRole in your class to a new ValueHolder(), either in its constructor or variable definition.
    i.e.
    public B() {
    this.RPGOperRole = new ValueHolder();
    or,
    private ValueHolderInterface RPGOperRole = new ValueHolder();

  • Help needed in EJB - to call AS from EJB a Session Bean

    Hi All ,
    I have been strictly told not to use Web Services as all the applications are on the same server
    actually I have to make an EJB invocation to an Application Service from the CAF layer from a Session Bean of another EJB Project(Not a CAF Service).
    the CAF layer has 5 parts metadata , permissions , dictionary , ear and ejbmodule.
    I added the ejbModule to the Build Path of the calling EJB Session Bean. And so I was able to access the operations of the Application Service which in turn accesses a BAPI(The Appl Service operation returns a String).
    But while executing I got the exception java.lang.RuntimeException: java.lang.NoClassDefFoundError
    My method :
    Normally from a Dynamic Web Project acting as a client to an EJB Session bean, I was able to get access to EJB Local Interface by using
      private ConverterLocal converterBean = null;
      public void jspInit() {
        try {
         InitialContext ic = new InitialContext();
         converterBean = (ConverterLocal)
         ic.lookup("java:comp/env/Converter");
        } catch (Exception ex) {
             System.out.println("Couldn't create converter bean."+
           ex.getMessage());
    BigDecimal dollarAmount =  converterBean.euroToDollar(value);
    So I created a JNDI field in ejb-j2ee-engine.xml
    enterprise-beans>
            <enterprise-bean>
         <ejb-name>com.sap*******.bapi_company_getlist.BAPI_COMPANY_GETLIST</ejb-name>
                   <jndi-name>COMPANY</jndi-name>
                </enterprise-bean>
    </enterprise-beans>
    And from my Session Bean , I tried to access it using the code in already existing Bean which was working fine
    BAPI_COMPANY_GETLISTBeanImpl bean = new BAPI_COMPANY_GETLISTBeanImpl();
              try {
                   InitialContext ctx = new InitialContext();
                   bean = (BAPI_COMPANY_GETLISTBeanImpl)ctx.lookup("COMPANY");
              } catch (NamingException e) {
                   System.out.println("Converter Bean can't be created");
                   String send = bean.returnDetails();
    And I tried to print the String , but I got the above error
    I have a doubt :
    1) How do I specify the JNDI name ie in the ejb-j2ee-engine.xml file , what should I add as the name of the ejb
    is this sufficient , or are there more steps ??

    Hi Ekaterina,
    I have the document to access my Bean from another Bean.
    I could access my Bean from a standalone Java class with this code
    Properties props = new Properties();
              props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
              props.put(Context.PROVIDER_URL,"hostname:port");
              try{
                   Context ctx = new InitialContext(props);
                   Object o = ctx.lookup("sap.com/TestEAR/REMOTE/TestBean/com.@#$.TestRemote");
                   TestRemote testRem = (TestRemote)javax.rmi.PortableRemoteObject.narrow(o, TestRemote.class);
                   String msg = testRem.getMessage();
                   System.out.println(msg);
    And in this document there is a way shown to access a bean from another Bean.
       http://help.sap.com/saphelp_nw04/helpdata/en/13/c8633e0084e946e10000000a114084/frameset.htm
    If your client is another enterprise bean, declare the EJB reference in the ejb-jar.xml.
    -For more information, see Declaring EJB References.
    But the problem is that in EJB 3.0 ,  I can't see the ejb-jar.xml file .
    So how should I have a Bean as a client to another Bean, I am not that familiar with Annotations.

  • Call RFC from EJB using SSO

    Can anyone point me in the right direction on the best practice for calling an RFC using SSO from an EJB?
    When using the local interface for the EJB, the only solution I see is to pass the authenticated IUser instance from the portal component to the EJB business method through the method signature.
    I am guessing that there is a better way to get access to an authenticated user in the EJB container.

    Thanks for the reply.
    Actually I was able to solve the problem last night. To get SSO to work in my local EJBs I created an RFC destination in the destination service using the visual administrator. I then used the destination service at runtime to pull the system definition from the J2EE system definitions store instead of the portal system landscape definitions and my connection object was created as expected.
    Here is the code to create the connection in my EJB business method:
    //get the user
    IUser user = UMFactory.getUserFactory().getUserByUniqueName(this.myContext.getCallerPrincipal().getName());
    // get the destination service
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.prt.registry.PortalRegistryFactory");
    InitialContext context = new InitialContext(env);
    IDestinationsService destinationsService =
         (IDestinationsService) context.lookup(IDestinationsService.SERVICE_JNDI_NAME);
    // define a destination filter to restrict to the RFC defined destinations
    DestinationFilter destinationFilter1 =
         new DestinationFilter(DestinationFilter.SOURCE_J2EE_DESTINATION_SERVICE, DestinationFilter.TYPE_SAP);
    // get a user specific connection
    IConnection connection = destinationsService.getConnection(user, "ECC", destinationFilter1);

  • [b]How connect to EJB from java webstart[/b] ?

    Hi,
    I'm a newcomer to J2EE, I'd like to build J2EEE app
    first of all,I've developed simple EJB components and jSwing client to call method from EJB. All in the same project.
    Client programe has method
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.PROVIDER_URL, "ormi://10.145.100.2:23891/current-workspace-app");
    return new InitialContext(env);
    When I run client app it work well, I follow in Jdev905 to deploy to java webstart
    1. Create .jar file (Item JAR file - Simple archive)
    2. Create Java web start(JNLP) files
    after that, I have .jar,.html,.jnlp file
    3. running project(use embedded OC4J server)
    4. running .html file
    first, java webstart download code then run but nothing
    happen. I think that It may be some wrong in JNDI look up.
    I try my best, It's taken me a week but I still do'nt understand.
    ! Please help show how to go through that or how to deploy using java web start. We intend to develop rich client.
    thanks a lots!
    Kien
    (Sorry for my bad English)

    This might be of help http://developer.novell.com/wiki/ind...asses_for_Java
    >>> dikshaneel<[email protected]> 12/8/2009 3:16 AM >>>
    Can someone please tell me how should I connect to LDAP from Java?
    Thanks in advance-- dikshaneel------------------------------------------------------------------------dikshaneel's Profile: http://forums.novell.com/member.php?userid=72973View this thread: http://forums.novell.com/showthread.php?t=395162

  • Challenge: call local ejb from remote ejb on weblogic 9.2

    Hi ALL,
    How do I call to local ejb from remote ejb object. The jar file is deployed on weblogic server 9.2, if you want get it http://geocities.yahoo.com.br/lindembe/BEAProject.jar and the source code are http://geocities.yahoo.com.br/lindembe/BEAProject.zip. It is a sample app with two ejb that works so good on JBOSS, JOnAS, but BEA Weblogic.....
    The complete problem you watch http://forum.java.sun.com/thread.jspa?threadID=768718&messageID=4387570#4387570
    or
    http://forums.bea.com/bea/message.jspa?messageID=600043148&tstart=0

    Your code in SigemFacadeBean should just do:
    InitialContext ctx = new InitialContext();
    when you lookup the local EJB. (This will work on all app servers. There's no need to put an app-server specific intial context factory in your code.)
    Also, you can remove the jndi-name setting for the local ejb from your weblogic-ejb-jar.xml. jndi-name is only applied to remote ejbs.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Calling a newly deployed EJB from an EJB gives a NoSuchMethod Exception if the jar of the newly deployed ejb is not in the classpath

    Hi ,
    I have an EJB A which is already deployed when the server starts. A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methods in EJB
    B.
    I get a NoSuchMethodException when I call the create method in the Home object
    of EJB B. If I add the ejb jar file to the classpath before the server starts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not known before the server
    is started. New EJBs can be deployed at runtime and EJB A should be able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jar file of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodException because it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)

    Hi,
    I am attaching a test case. This test case actually demonstrates a security bug.
    Unzip the file and modify the StartWeblogic.cmd in domainA to not refer to the
    SampleRemoteEJB.jar in the classpath. If u run the test client under the client
    dir u will see a NoSuchMethodException.
    The reason is it is not able to load the dynamically generated stub file.
    Initially I had the getMethod and it didn't work. You might have to modify the
    files to suit ur env. The easier way is to run th edomain wizard and create 2
    domains. Run the servers in development mode and place the jars under the applications
    dir
    Thanks
    Rajesh Mirchandani <[email protected]> wrote:
    Do you have any old EJB classes in your classpath? Did you recompile
    your EJBs if you
    upgraded from a old release or a Service pack?
    Bob Lee wrote:
    Hmmmm. That's an interesting problem.
    Why is it giving you a NoSuchMethodException instead of a
    ClassNotFoundException?
    Can you post the code from SampleConctorEJB.java, line 181?
    Try changing your call to getDeclaredMethod() to getMethod().
    getDeclaredMethod() searches only the class you called it on, whereas
    getMethod() traverses to the superclasses and interfaces. You onlyneed
    getDeclaredMethod() when you're accessing a nonpublic method.
    Not sure if this will help, but it's worth a shot.
    Bob
    Vasu wrote:
    Hi ,
    I have an EJB A which is already deployed when the server starts.
    A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methodsin EJB
    B.
    I get a NoSuchMethodException when I call the create method in theHome object
    of EJB B. If I add the ejb jar file to the classpath before the serverstarts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not knownbefore the server
    is started. New EJBs can be deployed at runtime and EJB A shouldbe able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jarfile of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodExceptionbecause it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support
    [user_projects.zip]

  • How to Call one EJB from another

    Hi all
    I am trying to call one EJB in one system from another EJB residing on diferent system...
    Both are Stateless session beans ...
    I can't use No-args Intialcontext() as i need to specify the Ip address of other system to be looked up.....
    So i am using properties Dorg.omg.CORBA.ORBInitlalHost....
    But its not looking up..Its telling not bound...But i called it from standalone client remotely...
    Am i wrong..?
    I hope I am in right path....
    I hope ill get reply as fast as possible...
    Gopal V

    Hi ken Thanks for replying....
    Ya i packed it as a jar (using Export tool in Eclipse3.2)....
    I am using SUN AS 9.....
    I packed bean1 and bean2 as two different jars in the same domain...
    Here is my code...
    Bean1:
    @Stateless(mappedName="ejb/Second")
    public class SecondIMPL implements SecondRemote {
         public FirstRemote obj;
         public String connect() {
              try{
                   InitialContext ctx= new InitialContext();
                   FirstRemote obj =(FirstRemote)ctx.lookup("ejb/First");
                   System.out.println("Client :"+obj.bMethod());
              }catch(Exception e){
                   e.printStackTrace();
              return "Check server Log";
    }Bean2 :
    @Stateless(mappedName="ejb/First")
    public class FirstIMPL implements FirstRemote {
         public String bMethod() {
              return "From First Bean";
    Client:
    public static void main(String[] args) {
              try{
                   InitialContext ctx= new InitialContext();
                   SecondRemote obj =(SecondRemote)ctx.lookup("ejb/Second");
                   System.out.println("Client :"+obj.connect());
              }catch(Exception e){
                   e.printStackTrace();
    Here is my Stack Trace...
    [#|2007-05-24T18:35:17.214+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 19;_RequestID=bb4848e7-829a-421d-a560-93659898eb02;|
    javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.SecondRemote[Root exception is java.lang.ClassNotFoundException: com.SecondRemote]
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
         at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.FirstBean.rediff(FirstBean.java:16)
         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.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
         at $Proxy36.rediff(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)
    Caused by: java.lang.ClassNotFoundException: com.Second
         at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:701)
         at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:614)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:568)
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:320)
         ... 31 more
    |#]

  • Error while calling PI webservice from EJB

    Hi Experts,
    We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this.  The below is the trace that we got.
    Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
    Text: Connection IO Exception. Check nested exception for details. (Connection reset).
    [EXCEPTION]
    com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
    at $Proxy780.mioaRDMDataDistribution(Unknown Source)
    at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
    at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
    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:597)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
    at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
    at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
    at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
    ... 78 more
    Regards,
    Pradeep

    Hi Pradeep,
    this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
    Regards,
    Tobias

  • HOW TO CALL A WEB SERVICE OR EJB FROM BPEL

    HI
    i want to call java web service or ejb from my bpel process. how can i do this.
    i am using oracle soa10.1.3.1.0 and jdeveloper 10.1.3.1.0 and oracle database xe 10g.
    thanks in advance K ROY

    You could deploy your EJB or Java under a web service into your OC4J, after that, you invoke a partnerlink from BPEL to the destination of wsdl will do. Also don't forget to add in your XSD schema as well.
    Thanks,
    Jyno

Maybe you are looking for

  • Loading of JSP files run as rwservlet.

    When I look at the trace file of the .jsp report run as rwservlet, I noticed that a major percent of time is spent in the generation and creation of JSP parser and XML definitions. How can I pre-compile and load the class files rather than compiling

  • Itouch is messed up

    I just got my touch about a week and a half ago. Whenever i start up an app there is about a 70% chance that my ipod automatically quits out of it. This also happens when i play music and pretty much everything else on my ipod. Lately my home button

  • Add value to model nodes

    hi all, I have to populate a model node and execute the RFC so that its updated at the backend and the nodes are once again refreshed. <b>It_Prcgprdg()</b> is the model to which i have to add the record which should be added in the backend and the ou

  • Customers License Number... Tax Registration Num (TAX_REFERENCE)

    Hi there We have legacy License number which is equal to Customer number in legacy system, we used ORIG_SYSTEM_REFERENCE field as a license number in Oracle Receivable Customer form. What happened this field is not updateable and the some time user f

  • Dbms_scheduler within procedure

    Hi, I want to create a procedure which drops all JOBs of a user. My Problem ist, that the escaping not works: CREATE OR REPLACE  PROCEDURE "SYS"."drop_user_jobs" (schemaName     varchar2) AS cursor c_get_objects_jobs is   select owner||'.'||object_na