Problem while invoking a Stateless Session bean from another bean

Hi,
I have a peculiar problem while coding with Stateless Session beans. Maybe you guys can help me out over here. The scenario is as follows
There are 3 Stateless Session beans. Let Us say Bean A, B and C. There are three methods, method1, method2, and method3 inside A, B and C respectively.
From A.method1(), B.method2(), and C.method3() are being invoked sequentially. Each of these methods does some JDBC operation and then returns.
The problem is this, if C.method3() throws and exception, then I am unable to rollback the changes made by B.method2(). Those changes get "Committed" to the database.
All the 3 beans have Bean managed persistence property set. I am using WebSphere 6.1.
Any insight on why this is happening would be greatly appreciated.
Thanks In Advance
Amardeep Verma

Hi,
This is a matter of calling all three methods in the same transaction context. Most easy way of doing this is having a 4th session bean containing a method calling the other 3. Make sure that the Transaction Attributes are REQUIRED, which is the default.
If the calls a to different backends/databases, you need global transactions and therefor XA complient database and drivers.
HTH Robert

Similar Messages

  • Problem while deploying a stateless Session bean

    hi,
    I am a beginner in J2EE. Please help..
    I have encountered an error while i am deploying a session bean in IBM Webspere App Servere
    the eroor is
    D:\Program Files\WebSphere\AppServer\deploytool\itp>ejbdeploy.bat c:\account\dep
    loy\account.jar c:\account\deploy c:\account\deploy\account-ejb.jar
    Starting workbench.
    Creating the project.
    Validating
    Generating deployment code
    Refreshing: /account.jar/ejbModule.
    Building: /account.jar.
    Invoking RMIC.
    error: Invalid class file format in C:\account\deploy\account.jar(com/fl/ac/Acco
    unt.class). The major.minor version '49.0' is too recent for this tool to under
    stand.
    error: Class com.fl.ac.Account not found in class com.fl.ac.EJSRemoteStatelessAc
    countEJB_ca490e54.
    error: Invalid class file format in C:\account\deploy\account.jar(com/fl/ac/Acco
    untHome.class). The major.minor version '49.0' is too recent for this tool to u
    nderstand.
    error: Class com.fl.ac.AccountHome not found in class com.fl.ac.EJSRemoteStatele
    ssAccountEJBHome_ca490e54.
    4 errors
    [*Error] An unexpected exception was thrown. Halting execution.
    Shutting down workbench.
    Error generating RMI code: RMIC Command returns RC = 1. The problems which stopp
    ed RMIC are displayed, and have also been recorded in the .log file in c:\accoun
    t\deploy\account-ejb._\.metadata.
    RMIC command was:
    -extdirs D:\Program Files\WebSphere\AppServer\java\jre\lib\core.jar;D:\Program F
    iles\WebSphere\AppServer\java\jre\lib\graphics.jar;D:\Program Files\WebSphere\Ap
    pServer\java\jre\lib\security.jar;D:\Program Files\WebSphere\AppServer\java\jre\
    lib\server.jar;D:\Program Files\WebSphere\AppServer\java\jre\lib\xml.jar;D:\Prog
    ram Files\WebSphere\AppServer\java\jre\lib\charsets.jar;D:\Program Files\WebSphe
    re\AppServer\java\jre\lib\ext;D:\Program Files\WebSphere\AppServer\java\lib;D:\P
    rogram Files\WebSphere\AppServer\classes;D:\Program Files\WebSphere\AppServer\li
    b;D:\Program Files\WebSphere\AppServer\lib\ext;D:\Program Files\WebSphere\AppSer
    ver\web\help;D:\Program Files\WebSphere\AppServer\deploytool\itp\plugins\com.ibm
    .etools.ejbdeploy\runtime;D:\Program Files\ibm\WebSphere MQ\Java\lib; -classpath
    c:\account\deploy\account-ejb._\account.jar\ejbModule;C:\account\deploy\account
    .jar -iiop -always -keep -d c:\account\deploy\account-ejb._\account.jar\ejbModul
    e -sourcepath c:\account\deploy\account-ejb._\account.jar\ejbModule com.fl.ac.EJ
    SRemoteStatelessAccountEJBHome_ca490e54 com.fl.ac.EJSRemoteStatelessAccountEJB_c
    a490e54
    BEAN SOURCE CODE IS
    ------------------Remote Interface -------------------------------
    package com.fl.ac;
    import java.rmi.*;
    import javax.ejb.*;
    public interface Account extends EJBObject     {
         public double withdraw(double balance,double amount) throws RemoteException;
         public double deposite(double balance,double amount) throws RemoteException;
    ------------------------ Home Interface -----------------------------------
    package com.fl.ac;
    import java.rmi.*;
    import javax.ejb.*;
    public interface AccountHome extends EJBHome     {
         public Account create() throws CreateException,RemoteException;
    ------------------------- Bean Class -----------------------------------------------
    package com.fl.ac;
    import java.rmi.*;
    import javax.ejb.*;
    public class AccountEJB implements SessionBean     {
         public void setSessionContext(SessionContext ctx)     {     }
         public void unsetSessionContext()     {     }
         public void ejbCreate()     {     }
         public void ejbActivate()     {     }
         public void ejbPassivate()     {     }
         public void ejbRemove()     {     }
         public double withdraw(double balance,double amount){
              return (balance - amount);
         public double deposite(double balance,double amount){
              return (balance+amount);
    ------------------------------ 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 id="ejb-jar_ID">
    <display-name>Account EJB</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>AccountEJB</ejb-name>
    <home>com.fl.ac.AccountHome</home>
    <remote>com.fl.ac.Account</remote>
    <ejb-class>com.fl.ac.AccountEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    PLZ HELP ME......
    francis

    Hi Gauarv,
    Did you not see my reply in the following post?
    Re: 502 service temporarily unavailable
    If I'm not mistaken, this is exactly the same question as you asked
    there.
    By the way, is there some reason you are still using OC4J version
    1.0.2.2? Is there something stopping you from upgrading to the later
    versions (9.0.2 and 9.0.3)?
    Good Luck,
    Avi.

  • How to use PropertyChangeSupport for a bean from another bean

    Hi all,
    I have a bean A that doesnot implements the PropertyChangeListener or have a PropertyChangeSupport as one of its member and I cant change its design. I want to fire an PropertyChangeEvent when a property is changed. I added A to PropertyChangeSupport of another bean B. The problem is that even if the Property of Bean A is changed it doesnot fire a event. Can anybody let me know how to do it?
    Thanks,
    Amit

    You need to wrap bean A inside another bean (B) that
    implements the accessor and mutator methods of Bean A
    and adds property change support in those methods
    where appropriate. You hide the actual instance of
    bean A inside an instance of bean B so no instances of
    bean A are visible to the application.This is OK, unless you don't want to change all places where A is referenced. You could subclass B from A, as long as the accessor and mutator methods are not final. Of course, instantation still has to know about B and you will have to cast to B, or use reflection, to add and remove the listeners.

  • Set value of variable in one bean from another bean

    Using JDeveloper 11.1.1.4, I thought this would be simple to do, but I haven't been able to figure out the correct syntax and am just learning java. In my view controller I have one bean set as pageflow scope, and another bean set as a request scope. How do I set the value of a variable in the first bean from the second bean? The first bean has setters and getters, but when I try to reference them in the second bean, it says it isn't allowed. The first bean looks like:
    public class ViewAmtsParameters {
        String asOfDateParam = null;
        public void setAsOfDateParam(String asOfDateParam) {
            this.asOfDateParam = asOfDateParam;
        public String getAsOfDateParam() {
            return asOfDateParam;
    }Thanks in advance,
    Troy

    for ur reference: go through entire docs.
    http://balusc.blogspot.com/2006/06/communication-in-jsf.html
    Edited by: Erp on Oct 7, 2011 9:12 PM

  • Calling a session bean from another bean

    Hi,
    Using weblogic server 6.1, I am trying to call a session bean, B, from a session bean A.
    After importing B's package, I have added the following code to A's implementation:
    try {
    Properties h = new Properties(); h.putContext.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001" );
    Context ctx = new InitialContext(h);
    Object tempHome = ctx.lookup(JNDI Name of B);
    BHome home;
    home = (BHome)javax.rmi.PortableRemoteObject.narrow(tempHome, BHome.class);
    catch(Exception e){...}
    I can compile the code successfully but when I run it,I get an error saying:"java.lang.NoClassDefFoundError: B.BHome"
    Can someone please tell me where I am going wrong?
    Thanks in advance,
    Fauzia

    I haven't used that web server but I have had the same kind of problem with ours.
    My guess is that you are compiling this in an environment where the home class is in the classpath. When you run it, though, this class cannot be resolved. Usually we have this problem when the class that is trying to get the bean is unable to find the remote jar.

  • Initialize a stateful session bean from another

    Hi,
    I am trying to create and initialize a stateful session bean from another stateful session bean. The code is as follows
    This method belongs to DefaultSessionBean where it creates the AdminSessionBean based on few checks and returns it to the client.
        public AdminSession getAdminSession() throws UnknownException, WarningException {
            checkSessionUser("getAdminSession");
            if (isAdmin()) {
                AdminSession adminSession;
                try {
                    final Context context = IToolsUtil.getInitialContext();
                    adminSession = (AdminSession)context.lookup("AdminSession");
                    System.out.println("Successfully created the adminsession bean");
                } catch (NamingException ne) {
                    ne.printStackTrace();
                    throw new UnknownException (new CatalogHelper("ITOOLS_100019", new Object[]{"Admin", ne.getMessage()}));
                System.out.println("adminsession will be returned");
                return adminSession;
            } else {
                throw new WarningException (new CatalogHelper("ITOOLS_000042", sessionUser.getUserhandle()));
        }Another method in DefaultSessionBean, creates its local interface and returns it.
        public DefaultSessionLocal getDefaultSessionLocal() {
            DefaultSessionLocal dsl = (DefaultSessionLocal)context.getBusinessObject(DefaultSessionLocal.class);
            System.out.println("local created.");
            return dsl;
        }Client call initialize method of the AdminSessionBean which is mentioned below:
        public void initialize(DefaultSession ds) throws WarningException, UnknownException {
            this.ds = ds.getDefaultSessionLocal();
            this.rfl = ReadFieldList.getInstance();
            this.fm = new FinderMethods();
        }The client code where it gets the adminSession and initializes is
       public static AdminSession getAdminSession(DefaultSession ds) throws ViewException {
            AdminSession as;
            try {
                as = ds.getAdminSession();
                System.out.println("got admin session");
            } catch (WarningException we) {
                 we.printStackTrace();
                throw new ViewException(we.getCatalogHelper());
            } catch (UnknownException ue) {
                ue.printStackTrace();
                throw new ViewException(ue.getCatalogHelper());
            } catch (OracleRemoteException ore) {
                ore.printStackTrace();
                throw new ViewException(new CatalogHelper("ITOOLS_050003", ore.getMessage()));
            // Initialize Admin Session
            try {
                System.out.println("before getting it.");
                as.initialize(ds);
                System.out.println("adminsession is initialized");
            } catch (WarningException we) {
                as.remove();
                as = null;
                throw new ViewException(we.getCatalogHelper());
            } catch (UnknownException ue) {
                as.remove();
                as = null;
                throw new ViewException(ue.getCatalogHelper());
            } catch (OracleRemoteException ore) {
                as.remove();
                as = null;
                throw new ViewException(new CatalogHelper("ITOOLS_050003", ore.getMessage()));
            System.out.println("got admin session");
            return as;
        }Apart from this I am using OC4J 10.1.3.1 tool test my application.
    When I am calling initialize method of the AdminSession I am getting the following error.
    06/10/24 12:26:08 Entered
    06/10/24 12:26:08 got default session
    06/10/24 12:26:08 Successfully created the adminsession bean
    06/10/24 12:26:08 adminsession will be returned
    06/10/24 12:26:08 got admin session
    06/10/24 12:26:08 before getting it.
    2006-10-24 12:26:08.156 WARNING J2EE RMI-00009 Exception returned by remote server: {0}
    06/10/24 12:26:08 com.itools.vs.view.exception.ViewException
    06/10/24 12:26:08      at com.itools.vs.view.util.ViewUtil.getAdminSession(ViewUtil.java:71)
    06/10/24 12:26:08      at com.itools.vs.view.backing.Admin.CreateUser.submit_action(CreateUser.java:182)
    06/10/24 12:26:08      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/10/24 12:26:08      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/10/24 12:26:08      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/10/24 12:26:08      at java.lang.reflect.Method.invoke(Method.java:585)
    06/10/24 12:26:08      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    06/10/24 12:26:08      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.AjaxActionComponent.broadcast(AjaxActionComponent.java:88)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405)
    06/10/24 12:26:08      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    06/10/24 12:26:08      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    06/10/24 12:26:08      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    06/10/24 12:26:08      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    06/10/24 12:26:08      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
    06/10/24 12:26:08      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
    06/10/24 12:26:08      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    06/10/24 12:26:08      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    06/10/24 12:26:08      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    06/10/24 12:26:08      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    06/10/24 12:26:08      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    06/10/24 12:26:08      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    06/10/24 12:26:08      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    06/10/24 12:26:08      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/10/24 12:26:08      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    06/10/24 12:26:08      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    06/10/24 12:26:08      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    06/10/24 12:26:08      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    06/10/24 12:26:08      at java.lang.Thread.run(Thread.java:595)
    06/10/24 12:26:08 ITOOLS_050003: Failed to get Admin Session.
    Exception is "Error marshalling objects, Not Serializable: java.io.NotSerializableException: DefaultSession_RemoteProxy_6nein01; nested exception is:
         java.io.NotSerializableException: DefaultSession_RemoteProxy_6nein01".
    [b/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Your remote client passes a DefaultSession to AdminSession.initialize(..). This DefaultSession has to be a remote type. In your client, how does it get DefaultSession?
    Did your client look up DefaultSession, and have it return a (sessionContext.getBusinessObject(DefaultSession.class))? If so, it should work.

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • Problem while loading security information (users/roles) from repository

    Iview have stopped connecting to our MDM, All repositories, all IViews Very strange
    Here is what I see in the logs.... Any ideas? Please if you have seen this before only
    Marty
    com.sap.mdm.extension.MetadataException: Problem while loading security information (users/roles) from repository 'PORTAL_CUSTOMERS'
    at com.sap.mdm.extension.MetadataManager.loadRoleCache(MetadataManager.java:559)
    at com.sap.mdm.extension.MetadataManager.internalGetRoleSet(MetadataManager.java:502)
    at com.sap.mdm.extension.MetadataManager.getRoleSet(MetadataManager.java:471)
    at com.sap.mdm.extension.MetadataManager.createMetadataKey(MetadataManager.java:464)
    at com.sap.mdm.extension.MetadataManager.getRepositorySchema(MetadataManager.java:197)
    at com.sap.mdm.uwl.MdmUwlConnector.createUserSessionContext(MdmUwlConnector.java:1463)
    at com.sap.mdm.uwl.MdmUwlConnector.new_retrieveItems(MdmUwlConnector.java:546)
    at com.sap.mdm.uwl.MdmUwlConnector.getItems(MdmUwlConnector.java:129)
    Caused by: com.sap.mdm.commands.CommandException: com.sap.mdm.net.ConnectionException: java.io.IOException: Unexpected socket read.  Result is -1.
    at com.sap.mdm.security.commands.GetUserListCommand.execute(GetUserListCommand.java:72)
    at com.sap.mdm.extension.MetadataManager.loadRoleCache(MetadataManager.java:526)
    Caused by: com.sap.mdm.net.ConnectionException: java.io.IOException: Unexpected socket read.  Result is -1.
    at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:102)
    at com.sap.mdm.security.commands.GetUserListCommand.execute(GetUserListCommand.java:69)
    at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:62)
    at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:497)
    at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:490)
    at com.sap.mdm.internal.net.ConnectionImpl.nextMessage(ConnectionImpl.java:629)
    at com.sap.mdm.internal.net.ConnectionImpl.receiveMessage(ConnectionImpl.java:572)
    at com.sap.mdm.internal.net.ConnectionImpl.send(ConnectionImpl.java:233)
    at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:99)
    com.sap.mdm.commands.CommandException: com.sap.mdm.net.ConnectionException: java.net.SocketException: There is no process to read data written to a pipe.

    Early this month we upgraded the MDM server to:
    MDM Server version: 5.5.63.57
    And the portal components:
    MDM 5.5 SP06 Technology Patch 3 (Build 5.5.63.57)
    MDM 5.5 SP06 Application Patch 3 (Build 5.5.63.57)
    MDM 5.5 SP06 Java API Patch 3 (Build 5.5.63.57)
    However the issue just began 2 days ago?
    We started intgrating MDM Workflow with UWL and assigned Roles and Iviews to the Universal Worklist Configuration
    It seems the Iviews work for a while and then after some time everything gives up? Very confounding
    And yes we are using standard Iviews (search, Result and detail)
    Thanks
    Edited by: Marty Monroe on Oct 31, 2008 3:07 PM

  • How to get and set a session variable from backing bean?

    Hi im using Jdev 11.1.1.2.0 and i need to set and get a session variable from backing Bean.
    Any idea?

    the class :
    package arq.resources;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpSession;
    public class SesionSigef {
    public FacesContext context;
    public HttpSession session;
    public SesionSigef() {
    super();
    context = FacesContext.getCurrentInstance();
    session = (HttpSession)(context.getExternalContext().getSession(true));
    public Object getVariableSesion(String atributo){
    return session.getAttribute(atributo);
    public void setVariableSesion(String atributo,Object valor){
    session.setAttribute(atributo, valor);
    the example of use :
    SesionSigef se = new SesionSigef();
    DatosRec da = new DatosRec();
    da.setDocumentoCip("Aprobar");
    se.setVariableSesion("DatosRec", da);
    thanks
    Joaquin

  • Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new

    Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new tab and Command W to close it, and my other tabs are visible.
    I have tried shutting down, closing tabs, with no success.  What's going on and how can I fix it?
    Thanks,
    Cindi B
    PS:  I'm not sure of the actual OS level, but I have not allowed it to upgrade to Maverick yet; concerned about it because of a few things I've read...

    A Safari extension or third party plugin may be causing the menu bar issue.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.
    As for which OS X is installed.
    Click the Apple () menu top left in your screen. From the drop down menu click About This Mac.
    The version is noted there.
    v10.6 Snow Leopard v10.7 Lion  v10.8 Mountain Lion
    It's your choice whether or not to upgrade to Mavericks. If you decide to do this, make sure your Mac meets the requirements noted here.

  • Injecting a bean in another bean in EJB3?

    Hello all,
    I am trying to inject a bean in another bean, then making a JUnit test for the parent bean. The problem is that it is displaying a nullpointerexception.
    Is the way of injection of a bean in another bean different from injecting a bean in JSF backing bean or any other client?
    I am using glassfish and EJB 3.
    Here is the code.
    JUnit Test
    @Test
        public void testReturnRequestURL() {
            List<String[]> listParameters = new ArrayList<String[]>();
            /* Assigning values for variables */
            ABean instance = new ABean();
            String result = instance.returnString(listParameters);
            System.out.println(result);
    Parent EJB
    @Stateless
    public class AccountsCheckingBean implements AccountsCheckingBeanInterface {
        @EJB
        private BBean bBean;
        public String returnString(List<String[]> listParameters) {
            String strNew = new String();
            strNew = bBean.appendXML("fileName.xml", listParameters); // *returns null here*
            return strNew;
    }What's going wrong here?

    Thanks for your reply. I am using the integrated WLS for this test.
    However, I think it might not be a previous deployment issue. I removed the dependency of ModelEJBOne on ModelEJBTwo and the application loads successfully.
    No new Session Bean was created or modified when the application failed to load. I only added a dependency that ties project ModelEJBOne to project ModelEJBTwo when it failed to load.

  • Creating a bean within another bean and JNDI

    Hello,
    I am trying to have one bean (a session bean) create another bean (entity
    bean). I keep getting a naming exception. Both beans are deployed in the
    same JAR file. Also, I can directly create the entity bean (from a client
    test app).
    Here is the code I have in the session bean:
    try
    Context initial = new InitialContext();
    Object objref = initial.lookup("java:comp/env/ejb/User");
    UserHome userHome =
    UserHome)PortableRemoteObject.narrow( objref, UserHome.class );
    user = userHome.create( username, password );
    catch( NamingException e )
    e.printStackTrace();
    The result is a naming exception, which is shown below. Why does the naming
    exception say "comp.env.ejb.User"?
    ***** Naming Exception *****
    javax.naming.NameNotFoundException: 'comp.env.ejb/User'; remaining name
    'ejb/Use
    r'
    at
    weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
    Compiled Code)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:143)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:143)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:143)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
    at
    weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
    ntextWrapper.java:29)
    at
    weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.j
    ava:117)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at
    com.ecocap.EcoCapSystemBean.authenticate(EcoCapSystemBean.java:51)
    at
    com.ecocap.EcoCapSystemBeanEOImpl.authenticate(EcoCapSystemBeanEOImpl
    .java:146)
    at
    com.ecocap.EcoCapSystemBeanEOImpl_WLSkel.invoke(EcoCapSystemBeanEOImp
    l_WLSkel.java:120)
    at
    weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java, Compiled Code)
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:77)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Mon Mar 19 17:02:58 EST 2001:<I> <EJB JAR deployment ecocap> Exception in
    non-tr
    ansactional EJB invoke:
    java.lang.Exception: NamingException
    at
    com.ecocap.EcoCapSystemBean.authenticate(EcoCapSystemBean.java:60)
    at
    com.ecocap.EcoCapSystemBeanEOImpl.authenticate(EcoCapSystemBeanEOImpl
    .java:146)
    at
    com.ecocap.EcoCapSystemBeanEOImpl_WLSkel.invoke(EcoCapSystemBeanEOImp
    l_WLSkel.java:120)
    at
    weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
    jectAdapter.java, Compiled Code)
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:77)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Mike

    thanks, but look at the new code i modified still given error on not resolving the class LoginBean in the class LoginDataBean. here is the new code.
    package webclass;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class LoginDataBean
         private Connection cn;
         private PreparedStatement addRecord;
         public LoginDataBean()throws Exception
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              cn = DriverManager.getConnection("jdbc:odbc:portal");
         public void addClient(LoginBean log)throws SQLException
              addRecord.executeUpdate("insert into clientprofile(firstname,middlename,lastname,address,occupation,organisation,gender,email,username,password)values('"+log.getFNfield()+"','"+log.getMDfield()+"','"+log.getLNfield()+"','"+log.getAdresfield()+"','"+log.getOrgfield()+"','"+log.getEmail()+"','"+log.getUsername()+"','"+(String)log.getPasword()+"'");
              addRecord.close();
              cn.close();

  • Problem while invoking popup from backing bean

    I am invoking a popup from backing bean method.
    The same backing bean method has the business logic which depends on the data collected from popup(user enters some data on popup).
    So I need the business logic to be executed after popup comes up.
    The popup is coming after the execution of return statement in backing bean method . How do i make popup trigger at earlier point in the method.
    <af:commandToolbarButton text="#{corePostupgradeuiBundle.SIGN_OFF_MIG}"
    id="socb52"
    partialSubmit="true"
    actionListener="#{viewScope.signoffBean.signOffAgents}"
    partialTriggers="t3"/>
    public void signOffAgents(ActionEvent event) throws SQLException {
    DCBindingContainer bc =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding summaryIter =
    bc.findIteratorBinding("Signoff1Iterator");
    showPopup("credentials"); //will get credential details from user and store in credential Bean
    //Following logic uses the data collected from popup
    EMCredentialReference credRef= credentialBean.getCredReference();
    submitJOb(credRef);
    public static void showPopup(String popupId) {
    FacesContext context = FacesContext.getCurrentInstance();
    StringBuilder script = new StringBuilder();
    script.append("AdfPage.PAGE.findComponent(\"").append(popupId).append("\").show();");
    ExtendedRenderKitService erks =
    Service.getService(context.getRenderKit(),
    ExtendedRenderKitService.class);
    erks.addScript(context, script.toString());
    UIComponent component = context.getViewRoot().findComponent(popupId);
    RequestContext.getCurrentInstance().addPartialTarget(component);
    }

    Well, your work flow is wrong.
    What you try to accomplish should work out of the box as
    1) user hit toolbar button
    2) this opens a popup "credentials" which have listeners for ok and cancel
    3) use fills in data in popup and hit ok or cancel
    4) one of the listeners gets fired
    5a) if OK listener you do your business logic
    5b) if cancel you do something else
    So all you have to do is the use a af:af:showPopupBehavioron the toolbar button, add a popup canel listener (if you need to act on canel) dependign on your popup design (dialog or simple button) add the appropriate listeners and in the listener method so your business logic.
    Timo

  • JNDI lookup of a Stateless Session bean from another stateless session bean

    Hi,
       I am working on SAP Netweaver. We have created a stateless session bean which is finally deployed as a webservice. From this stateless session bean we need to call another stateless session bean as a local reference.
        I have done the following.
    1. Added JNDI-Name to the ejb-j2ee-engine.xml.
    2. My lookup code is as follows
    Context context = null;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    context = new InitialContext(env);
    Object ejbObj =     context.lookup("MyBean");
    But i get the NamingException .Here MyBean is the jndi-name provided in the ejb-j2ee-engine.xml.
    Can somebody tell me what i am doing wrong.
    Thanks
    Priya

    Hi,
        Thanks for your replies.I did as you had suggested.I added ejb-local-ref to the ejb-jar.xml and i provided ejb-ref as MyBean.
    My lookup code uses the string
    ctxt.lookup("localejbs\MyBean");
    But still i get Naming Exception.
    I tried something different yesterday.
    I changed the code to use
    InitialContext ctxt = new InitialContext();
    ctxt.lookup("localejbs/"+ pathfromJNDIRegistry);
    and this time i did not get Naming exception but i got RemoteException saying there was error loading the class.
    Is there something i need to add somewhere for the classloader to be able to find and load this class in the second scenario.
    Please suggest me which method to go for amongst the two and what is the missing information i need to add.
    Thanks
    Priya

  • Connection problem while invoking remote method from client using oracle 8.1.6 server

    while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.

    r singh wrote:
    >
    I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
    the start up of the server.
    My settings:
    - WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
    - I created the connection pool for oracle with the following
    parameters:
    connection name: OracleConnectionPool
    url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
    driver class name: oracle.jdbc.driver.OracleDriver
    properties: user=scott
    password=tiger
    - I have also downloaded classes12.zip and nls_charset12.zip from
    Oracle.com
    and have placed under $WL_HOME/lib.
    - I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
    in
    front of the $CLASSPATH in the startWeblogic.sh script. The echoed
    classpath
    from the startup script is:
    /opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
    charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
    _sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
    - Still I get the error:
    <Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
    connection pool "Or
    acleConnectionPool" No suitable driver>
    Can somebody point me out if i am doing anything wrong here.
    Thanks.
    RamanandHi,
    Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
    not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
    Joe

Maybe you are looking for

  • USB 2.0 ports on MS-6398E board

    I'm new to the MSI forums so bear with me if my style of posting is not yet quite right. I've got an MS-6398E motherboard and in Win2K the Device Manager lists one USB 2.0 root hub and 3 USB root hubs (no numeric designation). When I check the proper

  • Does anybody know table for copy controls from Sales document to Delivery

    Hi, Does anybody know table for copy controls from Sales document to Delivery. Especially for item level. Regards, Praveen

  • Java.lang.nullpointerexception found while invoking services

    Hi, I am getting java.lang.nullpointerexception while invoking a simple web service(Hello World) from another service from BPEL.Soa suite 11.1.1.5 is used .The service1 WSDL reference is taken from the em console test page and bult a web service in c

  • Convert from int to char

    Hi, How can I convert from an int to char?

  • Exceuting work items from the outlook

    Hello, We use the MM release strategy triggering W item which are sent to outlook. When we double click on the work item, we receive the pop up for the login (sapgui shortcut-logon(sys id, client, lang,*swnwiex) the user id is defaulted but not the p