Process Integrator Problem (use of session bean variable between tasks)

Hello,
I'm having a problem using the Process Integrator. I made a
really simple workflow (Start, Task1, Task2, Done) which uses
the bean given whith the order processing example. Task1 creates
the bean and executes a business operation (check inventory).
Task2 executes another business operation (calculate total
price). The problem is when I try to execute this second b.o I
get an exception saying
Nested exception is: Workflow error:
com.bea.wlpi.common.WorkflowException: Empty instance object for
business operation "Calculate Total Price" in
template "Template3".
Someone could help me and tell me what I am doing wrong.
Thanks in advance,
Albert

If I understand you correctly, you have 3 business operations, one is "Create a EJB",
one is call "Check Inventory", the other is "Caculate Total Price". I assume you
save the EJB handle to a workflow variable with a type Bean. My speculation is when
you define business operation for "Calculate Total Price", you did not associate
it with the workflow variable that you saved the EJB handle. Just a wild guess.
Jim Zhou.
"Albert Lanchas" <[email protected]> wrote:
>
Hello,
I'm having a problem using the Process Integrator. I made a
really simple workflow (Start, Task1, Task2, Done) which uses
the bean given whith the order processing example. Task1 creates
the bean and executes a business operation (check inventory).
Task2 executes another business operation (calculate total
price). The problem is when I try to execute this second b.o I
get an exception saying
Nested exception is: Workflow error:
com.bea.wlpi.common.WorkflowException: Empty instance object for
business operation "Calculate Total Price" in
template "Template3".
Someone could help me and tell me what I am doing wrong.
Thanks in advance,
Albert

Similar Messages

  • A simple problem with sateful Session beans

    Hi,
    I have a really novice problem with stateful session bean in Java EE 5.
    I have written a simple session bean which has a counter inside it and every time a client call this bean it must increment the count value and return it back.
    I have also created a simple servlet to call this session bean.
    Everything seemed fine I opened a firefox window and tried to load the page, the counter incremented from 1 to 3 for the 3 times that I reloaded the page then I opened an IE window (which I think is actually a new client) but the page counter started from 4 not 1 for the new client and it means that the new client has access to the old client session bean.
    Am I missing anything here???
    Isn�t it the way that a stateful session bean must react?
    This is my stateful session bean source.
    package test;
    import javax.ejb.Stateful;
    @Stateful
    public class SecondSessionBean implements SecondSessionRemote
    private int cnt;
    /** Creates a new instance of SecondSessionBean */
    public SecondSessionBean ()
    cnt=1;
    public int getCnt()
    return cnt++;
    And this is my simple client site servlet
    package rezaServlets;
    import java.io.*;
    import java.net.*;
    import javax.ejb.EJB;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import test.SecondSessionRemote;
    public class main extends HttpServlet
    @EJB
    private SecondSessionRemote secondSessionBean;
    protected void processRequest (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType ("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter ();
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet main</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Our count is " + Integer.toString (secondSessionBean.getCnt ()) + "</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close ();
    protected void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    processRequest (request, response);
    protected void doPost (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    processRequest (request, response);
    }

    You are injecting a reference to a stateful session bean to an instance variable in the servlet. This bean instance is shared by all servlet request, and that's why you are seeing this odd behavior.
    You can use type-leve injection for the stateful bean, and then lookup the bean inside your request-processing method. You may also save this bean ref in HttpSession.
    @EJB(name="ejb/foo", beanName="SecondBean", beanInterface="com.foo.foo.SecondBeanRemote")
    public MyServlet extends HttpServlet {
    ic.lookup("java:comp/env/ejb/foo");
    }

  • SOS problem using one Entity bean for editing records. please help me

    Hello
    I have one great problem using one entity bean 2.1 and i am working with this problem several days and i dont solve it.
    i am using this jb 2.1 for add new records to one oracle database and for editing records.
    I have one great problem for editing records
    I have one objets that is as one of my database table. (PersonaObj.java)
         //personaObj.java
         public class PersonaObj implements Serializable{
              private Integer id_persona; //this ishte database table autonumeric
              private java.lang.String nombre;
              now the set/get methods.
         One field of this objets (bean) is the primary key of the table, and this field is one part of the pk from the entity bean.
         From one session bean i call the entity bena passing the objet
         into the entity bean (interface) i have one methods:
              public getPersona getT56aaat04();
         public void setPersona(PersonaObj obj);
         into the entitybean bean i have:
         public PersonaEntityPK ejbCreate(PersonaObj obj) throws CreateException {
              this.setT56aaat04(obj);
              public abstract Integer getId_persona();
         public abstract void setId_persona(Integer Id_persona);
         public abstract java.lang.String getNombre();
         public abstract void setNombre(java.lang.String Nombre);
         public PersonaObj getPersona() {
              PersonaObj obj = new PersonaObj();
              obj.setId_persona(getId_persona());
              obj.setNombre(getNombre());
              return obj;
         public void setPersona(PersonaObj obj) {
              setId_persona(obj.getId_persona());
              setNombre(obj.getNombre());
    But i have one graet problem.
    adding new record to the database i runs well but if i want to edit one recor appears this error:
    => Error <=
    java.rmi.RemoteException: EJB Exception: ; nested exception is: javax.ejb.EJBException: EJB Exception: : java.lang.IllegalStateException:[EJB:010144]The setXXX method for a primary key field may only be called during ejbCreate.
    at PersonasEJB_a43o8n__WebLogic_CMP_RDBMS.setId_persona(PersonasEntityEJB_a43o8n__WebLogic_CMP_RDBMS.java:328)
    at PersonasEntityBean.setPersona(PersonasEntityBean.java:114)
    at PersonasEntityEJB_a43o8n_ELOImpl.setPersona(PersonasEntityEJB_a43o8n_ELOImpl.java:45)
    at PersonasSessionBean.editarPersona(PersonasSessionBean.java:849)
    at PersonasSessionBean_bszo9t_EOImpl.editarPersona(PersonasSessionBean_bszo9t_EOImpl.java:208)
    at PersonasSessionBean_bszo9t_EOImpl_WLSkel.invoke(Unknown Source)
    into the session bean i make this (the session recibes one PersonaObj obj):
    T56aContactosEntityLocal personaLocal ;
                   try {
                        personaLocal = personaHome.findByPrimaryKey(new T56aContactosEntityPK(obj.getId_a04()));
                        T56aaat04Obj objTmp = new T56aaat04Obj();
                        objTmp.setAp1_a04(obj.getAp1_a04());
                        objTmp.setEstado_a04("false");
                        personaLocal.setT56aaat04(obj);
    Please can you help me to solve this problem?

    Hello Werner,
    The mappings seem to be alright at a first glance.
    Have you tried out un- and redeploying your application? Sometimes values appear to be cached in the server. So if you have deployed the application before you entered DB_BANK as alias this might solve the problem...
    BR
    Daniel

  • May i use the session bean in the jsp

    <%@ page import="sms.EJB.*,sms.UserDetailEJB.*" %>
    <%
    if (request.getParameter("userid")!=null && request.getParameter("password") !=null && request.getParameter("userLevel")!=null)
    UserHome userHome look up...
    UserLocal userLocal;
    userLocal = userHome.create(userid,password,userlevel);
    %>
    <html>
         <head>
              <title>Insert One Page</title>
         </head>
         <body>
         <form action="/testing/insertOne.jsp">
              <h1 align="center">Insert into User Database !</h1>
              <table align="center">
                   <tr>
                        <td bgcolor ="#FFFCCC">User Name :</td>
                        <td bgcolor ="#FFFCCC"><input type="text" name="userName" size="12" maxlength="12"></td>
                   </tr>
                   <tr>
                        <td bgcolor ="#FFFCCC">Password :</td>
                        <td bgcolor ="#FFFCCC"><input type="password" name="password" size="12" maxlength="12"></td>
                   </tr>
                   <tr>
                        <td bgcolor ="#FFFCCC">User Level :</td>
                        <td bgcolor ="#FFFCCC"><input type="text" name="userLevel" size="12" maxlength="12"></td>
                   </tr>
              </table>
              <p align="center"><input type="submit" name="submit" value="add it"</p>
         </form>
         </body>
    </html>
    May i use the session bean like this, if i dont want to use the data access object
    may i use this...

    Hey it apperars to me like heero82 is using session facade and all he has to do is use session bean to make one business call on session bean. Now if u say it is not correct then i would like to know the better way to doing so.
    I can imagine one ways is use business delegate. Just make new of java class in jsp and let that java class do lookup and delegate the call to session facade.
    Let me know inpout on this
    pranav

  • Code using advisor session bean..returning of a list

    Hi,
    I am using Advisor Session Bean for classifying users instead of using pz:div
    tags. The steps are given in documentation. I wanted to know what advice.getResult()
    returns? It has been given in the API as an Object. Even in pz:div java file they
    have used this code to check if the getresult returns something ...
    Object nestedResult = advice.getResult();
    if((nestedResult instanceof List) && ((List)nestedResult).size() > 0)
    {  //belongs to segment
    My code works perfectly but I am curious to know about this code. Can anyone please
    tell me about the above given code?
    Thanx

    Assuming you are using v7.0
    This might help
    http://edocs.bea.com/wlp/docs70/dev/p13n.htm#1000231
    i dont know if this has changed in v8.1
    hth
    deepak
    "Madhu" <[email protected]> wrote:
    >
    Hi,
    I want to use the Advisor session bean directly in place of the tags
    to return
    content based on a static query and match the content to users based
    on rules
    that execute a content query. Where can I find more information on this?
    Thanx.
    Madhu

  • Problem when running session bean

    Hi all,
    I am a new comer to jdeveloper11g and weblogic10.In these days i am trying to create session bean in jdeveloper. but i got this error when i am try to run the program using new sample client.
    mapped name=New-SessionEJB
    package=project1
    Remote interface=NewSession
    SessionBean=NewSessionBean
    javax.naming.NameNotFoundException: While trying to lookup 'New-SessionEJB#project1.NewSession' didn't find subcontext 'New-SessionEJB#project1'. Resolved '' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'New-SessionEJB#project1.NewSession' didn't find subcontext 'New-SessionEJB#project1'. Resolved '']; remaining name 'New-SessionEJB#project1/NewSession'
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at project1.NewSessionClient.main(NewSessionClient.java:16)
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'New-SessionEJB#project1.NewSession' didn't find subcontext 'New-SessionEJB#project1'. Resolved ''
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Process exited with exit code 0.
    Here is my client program
    public class NewSessionClient {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    NewSession newSession = (NewSession)context.lookup("New-SessionEJB#project1.NewSession");
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // WebLogic Server 10.x connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://localhost:7101");
    return new InitialContext( env );
    If anybody know what the problem is please tell me.
    thanks.......
    (tcr)

    I ran into the EXACT same problem described by Tracy, and I assembled my .ear file manually.
    According the error message, it would appear that the server is looking for the EJB remote interface in the ../temp/__session_bean_rpc directory when it is trying to generate its session bean wrapper class. As Tracy notes, when the file Hello.class is copied into the directory, the problem goes away. Furthermore, once the wrapper class has been generated, Hello.class is no longer needed and can be deleted from the directory.
    Better still, I found a way to deploy the web services web module and make the error go away. I created the ejbws.war file with a copy of the remote interface Hello.class in the WEB-INF/classes directory. This makes the class available when the wrapper class is generated.
    The WebServicesAssembler tool doesn't copy the EJB remote interfaces into the .war web module, which would appear to be
    necessary.
    Hope this helps.

  • JDev 10.1.3: Problem deploying a session bean to embedded OC4J

    JDeveloper 10.1.3, TopLink, OC4J, WinXP, java 1.4.2_05.
    I used TopLink to create a set of Java objects from a DB Schema, then created a simple Session Bean to read some of the objects. Everything compiles fine.
    JAVA_HOME points to the JDK (not JRE) and CLASSPATH is empty (undefined).
    When I try to Run my session bean in the jdeveloper embedded oc4j, I get this message. Thanks in advance for your help.
    Milind
    ===============
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config>
    C:\Tools\jdev_10_1_3\jdk\bin\javaw.exe -ojvm -classpath C:\Tools\jdev_10_1_3\j2ee\home\oc4j.jar;C:\Tools\jdev_10_1_3\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    05/03/22 14:43:50 Node started with id=127765687050882
    05/03/22 14:43:52 Auto-deploying - applications/admin_ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)...
    05/03/22 14:43:52 Error initializing server: Error initializing ejb-module; Exception null
    05/03/22 14:43:53 Fatal error: server exiting
    Process exited with exit code 1.

    Error initializing ejb-module;
    Is the EJB Jar structured as
    META-INF/
    ejb-jar.xml
    Bean Class
    Home interface Class
    Remote interface Class
    Does the EJBdeploy in some other server?

  • How to realize timeout while invoking a method in remote sesssion bean using my session bean running on wls5.1

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

  • Deploy Error when using Stateful Session Bean inside Webdynpro

    Hi,
    I'm trying to create a webdynpro project that uses a stateful session bean
    I have created DC's for a EJB Module project, Enterprise Application and Webdynpro component. Created the bean, built it, added it's package to the public part, added the EJB Module to the EAR project. Built the EAR project. Added the EJB Module project and Enterprise Application project as a used DC in the Webdynpro DC.
    In the Webdynpro DC I added com.sap.archive-packaging.default.update-descriptors=true in the build.properties file of the cfg directory. (using the navigator view) That resolved an error while building it.
    Deployed the Enterprise Application DC without problems.
    Tried to deploy the Webdynpro DC but I get the following error:
    Jun 16, 2008 9:40:46 AM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] WARNING:
    [012]Deployment finished with warning
    Settings
    SDM host : 10.64.36.74
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Result
    => deployed with warning : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Finished with warnings: development component 'projempactcmp'/'company.nl'/'local'/'20080616094022':Caught exception during application startup from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Error occurred while starting application company.nl/projempactcmp and wait. Reason: Clusterwide execption: server ID 6060950:<--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5) (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : Got problems during deployment
    Does anyone know what this error means and how to resolve it. I searched the forum but only found errors that look like this relating to XI not to Webdynpro.......
    Thansk,
    Jeschael
    Edited by: J.V. Lebbink on Jun 17, 2008 6:52 AM

    Default is 30mts.
    This is done as a parameter in orion-ejb-jar.xml. Please look at the EJB Guide at http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/dtdxml.htm#634197 for details
    regards
    Debu

  • Using BC4J Session Bean in OC4J 10.1.3 with dynamic ports

    Hi Folks!
    I've benn having trouble connecting my BC4J Session Bean to an Oracle 10gAS R3 server instance tha uses dynamic ports.
    After migrating a BC4J/Struts/JSP application from 9iAS to 10gAS R3, I'm trying to connect from a client application to my instace in the server. The problem is that the instance uses dynamic ports, and whenever I deploy my application to the server, I've got to update the port number in the bc4j.xcfg file in the client application, wich has became impossible to maintain.
    When I connect to an EJB in the same server, I use the instance name instead of the port number. However, when I do the same with BC4J, I get the following exception:
    javax.naming.NamingException [Root exception is java.lang.NumberFormatException: For input string: "OC4J_dvt20"]
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:131)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.getRemoteApplicationModuleHome(AmHomeImpl.java:42)
         at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.lookupUsingPlatformContext(AbstractApplicationModuleHomeImpl.java:82)
         at oracle.jbo.client.ejb.ApplicationModuleHomeImpl.<init>(ApplicationModuleHomeImpl.java:52)
         at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.<init>(AbstractApplicationModuleHomeImpl.java:35)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:35)
         at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:28)
         at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:77)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:136)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:80)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2468)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:536)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2094)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1546)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1504)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)
         at pkg.TesteEjbMCT.findTLS(TesteEjbMCT.java:98)
         at pkg.TesteEjbMCT.main(TesteEjbMCT.java:51)
    My question is: is there a way to configure my bc4j.xcfg, or another way to connect, in order to skip the use of the port number? Or a way to get the port number from the server before I connect?
    Thanks in advance!!!

    I've just found the solution from Steve Muench weblog, always useful by the way!
    You can find the solution at this link http://radio.weblogs.com/0118231/stories/2004/05/07/handcodingDynamicDiscoveryOfEjbdeployedAppmodule.html
    In summary, we need to use the class com.evermind.server.rmi.RMIInitialContextFactory, which supports dynamic lookup, and implement the lookup ourselves.
    The code I've written to lookup the service is listed below:
    public static ApplicationModule getAppModuleManutencao() {
    try {
    Context ctx = getContext();
    ManutencaoFacadeHome home = (ManutencaoFacadeHome) ctx.lookup(EJB_MANUTENCAO_BEAN_NAME);
    ApplicationModule am = ApplicationModuleProxy.create(home, null);
    return am;
    } catch (NamingException nex) {     
    nex.printStackTrace();
    return null;
    private static InitialContext getContext() {   
    try {     
    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, "opmn:ormi://dsv008:OC4J_dvt20/mct");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    return new InitialContext(env);
    }catch (NamingException e) {     
    e.printStackTrace();
    return null;
    I hope this helps someone!!!
    Cheers!

  • Process Integration Handbook - useful links - permission denied

    Hi!
    in the PI 7.1 EhP1 Handbook there are two obviously useful links. Unfortunately I get an "Access Denied" error in SMP although I have a valid SMP user ID with Partner Status.
    Does anybody know how to get these to files?
    3.1.2 Updating from SAP NetWeaver PI 7.1 to EHP 1 for NetWeaver PI 7.1
    If you have already installed SAP NetWeaver PI 7.1, you can update to SAP enhancement package 1 (EHP
    1) for SAP NetWeaver PI 7.1.
    The following documents show how this works for a typical database and operating system:
    Update Guide to EHP 1 for SAP NetWeaver PI 7.1 (SMP login required)
    This guide explains how to update your system from PI 7.1 to EHP 1 for PI 7.1. It also describes how
    to configure and run a simple process integration scenario.
    Update Demo to EHP 1 for SAP NetWeaver PI 7.1 (SMP login required)
    This demo shows how to update your system from PI 7.1 to EHP 1 for PI 7.1. It also shows you how
    to configure and run a simple process integration scenario.
    The URLs for both documents are:
    https://service.sap.com/~sapidb/011000358700002004632008E.pdf
    https://service.sap.com/~sapidb/011000358700001989572008E/index.htm
    Thanx!
    Regards,
    Volker

    Hi!
    I can access all other material in SMP and I can also download software. This does not seem to be the problem. I think SAP has accidentially not released these two documents for customers and partners.
    Regards,
    Volker

  • Problem calling a session bean (EJB 3.0)

    Hello,
    I'm new to netbeans and J2EE. I'm using NetBeans 5.5 Beta 2 and sun application server 9 pe.
    I created a new enterprise application and i'm trying to access a Session Bean (Remote and Stateless)
    from the app-client (outside the main class).
    This is the loockup method that was generated by the IDE (Enterprise Resources > Call enterprise bean):
    private ejb.SessionBeanDoenteRemote lookupSessionBeanDoenteBean() {
    try {
    javax.naming.Context c = new javax.naming.InitialContext();
    return (ejb.SessionBeanDoenteRemote) c.lookup("java:comp/env/ejb/SessionBeanDoenteBean");
    catch(javax.naming.NamingException ne) {
    java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
    throw new RuntimeException(ne);
    When I run the application and try to invoke the lookup method my application gets the following exception:
    SEVERE: exception caught
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/Se
    ssionBeanDoenteBean
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.
    java:751)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.j
    ava:156)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at intensivecare.entrada.JDialogEntrada.lookupSessionBeanDoenteBean(JDia
    logEntrada.java:219)
    at intensivecare.entrada.JDialogEntrada.buttonMenuGravarActionPerformed(
    JDialogEntrada.java:79)
    at intensivecare.JDialogWizzard$2.jButtonGravarActionPerformed(JDialogWi
    zzard.java:178)
    at componentes.JTaskPanelMenu$3.actionPerformed(JTaskPanelMenu.java:54)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
    49)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2169)
    Please... can someone help me?

    The portable way to acquire the dependency is through java:comp/env or @EJB. Accessing the
    global namespace directly is not recommended. If you use an ejb-ref, you need to define it
    in the component environment within which you'll be looking up the dependency. So if you're
    looking it up from an Application Client, you'll need to define the ejb-ref in application-client.xml.
    Also, the ejb-ref-name is the portion of the string after java:comp/env. There is no automatic
    "ejb" appended to it. If you do ic.lookup("java:comp/env/foo"), your ejb-ref-name would be "foo".
    You can use @EJB but it can only be defined in certain managed classes such as the
    Application Client main class.
    You can find additional info in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem Calling Remote Session Bean Method

    Need help. I am trying to call a method in a remote stateless session bean in an EJB in my web application from a stateless session bean in a different EJB in the web application. I am getting a run-time error that says,
    "java.lang.NoClassDefFoundError: dtpitb.common.sb.reports.CommonReportsHome"
    ref = ctx.lookup( jndiName );
    // Cast to Local Home Interface using RMI-IIOP
    commonReportsHome = (CommonReportsHome)
    PortableRemoteObject.narrow(ref, CommonReportsHome.class);
    If while in a session bean of an EJB, I want to call a public method in the session bean of a totally different EJB, is there something in particular I am missing. I can make the call from the web application code. I can make a remote call from this session bean to itself in the exact same fashion. I just can't call a session bean in another EJB. All thoughts are welcome.
    Thanks,
    Pete

    Thanks for replying. That could very well be the case I suppose. I'm using JBuilder and WebLogic, and JBuilder pretty much does all of the deployment descriptor code for me. However, maybe this is something I need to incorporate manually.
    One EJB is in the same project as the web application code. The other EJB (common_ejb) is in another project. The calling session bean is in the project with the web app, and the remote session bean method that I'm targeting is in the common EJB session bean. Both EJBs are included in the web app's WEB-INF\lib dir and in the war file.
    So theoretically, this isn't an unconventional practice I assume?
    Thanks,
    Pete

  • Using local session bean interface from web container using EJB 3.0

    Hi,
    How can you use a local session bean interface from Java (rather than data controls) in a web container using EJB 3.0?
    I can use a remote interface by looking up InitialContext, but I can't find a local interface this way (even from another session EJB). I can use a local interface from an EJB using annotation "EJB", but as I understand, this is not available in the web container.
    If I try to add an ejb-jar.xml file, these seems to mess up by project...
    Hope you can help.
    Roger

    The portable way to retrieve an EJB reference in Java EE is to either inject it or look it up via the
    component's private naming environment. The simplest way is :
    @EJB
    private DocumentManager dm;
    The global JNDI name is only used as an implementation specific way to uniquely assign an
    identifier to a specific Remote EJB. It's best for this not to appear directly in the source code.
    There's more on global JNDI names in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    The alternative to annotations is to use an ejb-ref to declare the ejb dependency. The ejb-ref
    is declared in the standard deployment descriptor corresponding to the component doing the
    lookup. Each ejb-ref has an ejb-ref-name, e.g. <ejb-ref-name>DM_ref</ejb-ref-name>
    The code looks up the ejb-ref-name relative to the java:comp/env namespace to retrieve the
    EJB reference.
    DocumentManager dm = (DocumentManager)
    new InitialContext().lookup("java:comp/env/DM_ref");

  • Create a entity using a session bean in web dynpro

    Hi.
    I want to create an entity bean object trough an EJB session bean in web dynpro, e.g using a form in a WD application filled in by a user.
    I understand how to display a list of entity beans through a session bean and a table, but I don't understand how to create (or edit or remove) such information.
    My session beans look like this:
    @Stateless
    public class MyObjectBean implements MyObjectLocal {
         @PersistenceContext(name = "MyObject", unitName="ProjectPU")
         public EntityManager em;
         public void create(MyObject myObject) {
              em.persist(myObject);
         public void edit(MyObject myObject) {
              em.merge(myObject);
         public void remove(MyObject myObject) {
              em.remove(em.merge(myObject));
         public MyObject find(Integer id) {
              return em.find(MyObject.class, id);
         @SuppressWarnings("unchecked")
         public List<MyObject> findAll() {
              return em.createNamedQuery("MyObject.findAll").getResultList();
    So the model class would be called Request_MyObjectLocal_create.
    I attempted to use [this|http://help.sap.com/saphelp_nwce10/helpdata/en/45/dd45e4bc295595e10000000a1553f7/frameset.htm] help file but I find the answer (step 17) quite unclear.
    Help is greatly appreciated!
    Vincent.

    I've just found the solution from Steve Muench weblog, always useful by the way!
    You can find the solution at this link http://radio.weblogs.com/0118231/stories/2004/05/07/handcodingDynamicDiscoveryOfEjbdeployedAppmodule.html
    In summary, we need to use the class com.evermind.server.rmi.RMIInitialContextFactory, which supports dynamic lookup, and implement the lookup ourselves.
    The code I've written to lookup the service is listed below:
    public static ApplicationModule getAppModuleManutencao() {
    try {
    Context ctx = getContext();
    ManutencaoFacadeHome home = (ManutencaoFacadeHome) ctx.lookup(EJB_MANUTENCAO_BEAN_NAME);
    ApplicationModule am = ApplicationModuleProxy.create(home, null);
    return am;
    } catch (NamingException nex) {     
    nex.printStackTrace();
    return null;
    private static InitialContext getContext() {   
    try {     
    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, "opmn:ormi://dsv008:OC4J_dvt20/mct");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    return new InitialContext(env);
    }catch (NamingException e) {     
    e.printStackTrace();
    return null;
    I hope this helps someone!!!
    Cheers!

Maybe you are looking for

  • Script does not work anymore after updating to FM 12.0.3

    Hi, With TCS5, Robohelp would crash when importing FrameMaker books to RH, because the FM files had embedded graphics. So, I found a script to externalize the graphics before doing the import (the script is: ExtendScript of the week: Externalizing Gr

  • Invoice Reduction Invoice Payment Terms - Due Date

    Hi gurus, At the time we apply invoice reduction in MIRO screen, both invoices (regular and reduction) take vendor payemnt terms (for ex Due in 30 dyas). Is it possible to assign the invoice reduction invoice a fix payment term "Due Immediately" via

  • How can the IE brower display pictures in WCS?

    Hi all, Anyone know that how can the IE display pictures in WCS? Even I enable all field in Security and Advanced in the properties dialog of IE6.0 in Windows 2003, the picture still cannot display in the page of WCS. And the certificate issued by WC

  • #ERR when generating XL reporter report

    We have a sales report, that lists all the different sales per month for this year and last year. Each column represents a month. When we try generating the report for the entire calendar year, there are some errors for November (#ERR) and only #ERR

  • Restoring Backup Set to New Host

    Hi Team, I am working on the RMAN Restore operation on the New Host. I had taken the hot backup of my database (name :Test) with all ControlFile, DataFile, & Archivelog Files using RMAN backup command, RMAN>backup database plus archivelog; Now I want