Error in looking up a session bean from simple client

Hi,
I have the following problem: (*+{color:#008000}Urgent problem my project depends on this problem to solve please help{color}+*)
I completed the "Create a Simple EJB Session Bean" example from cue cards tutorials from jdeveloper 11 g final release, and run the "HelloWorldSession" and waiting for server to finish its initialization.
Note:
Session bean code:
import javax.ejb.*;
+@Stateless(name = "HelloWorldSession", mappedName = "SessionEJB-SessionEJB")+
+@Remote+
+public class HelloWorldSessionBean implements HelloWorldSession {+
+public HelloWorldSessionBean() {+
< <em>public String sayHello(String name) {+
return "Hello " name;+
+}+
HelloWorldSessionClient code:
+public class HelloWorldSessionClient {+
< <em>public static void main(String[] args) {+
+try {+
final Context context = getInitialContext();
HelloWorldSession helloWorldSession =
+(HelloWorldSession)context.lookup("*SessionEJB-SessionEJB#eg.com.efinance.HelloWorldSession*");+
System.out.println(helloWorldSession.sayHello("world"));
+} catch (Exception ex) {+
ex.printStackTrace();
< <em>+
< <em>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://127.0.0.1:7101");
return new InitialContext(env);
+}+
Then on HelloWorldSessionClient right click then run I got the following errors:
*{color:#ff0000}"C:\Program Files\Java\jdk1.6.0_06\bin\javaw.exe" -client -classpath "C:\Documents and Settings\Mohamed_Taman.HEADQ\Desktop\SessionEJB\Project1\classes;C:\Oracle_Middleware_11g\modules\javax.ejb_3.0.1.jar;C:\Oracle_Middleware_11g\wlserver_10.3\server\lib\weblogic.jar" -DproxySet=false eg.com.efinance.HelloWorldSessionClient{color}*
*{color:#ff0000}Exception in thread "main" java.lang.AssertionError: java.lang.ClassNotFoundException: eg.com.efinance.HelloWorldSession{color}*
*{color:#ff0000} at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:57){color}*
*{color:#ff0000} at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.readObject(RemoteBusinessIntfProxy.java:205){color}*
*{color:#ff0000} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method){color}*
*{color:#ff0000} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39){color}*
*{color:#ff0000} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25){color}*
*{color:#ff0000} at java.lang.reflect.Method.invoke(Method.java:597){color}*
*{color:#ff0000} at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329){color}*
*{color:#ff0000} at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329){color}*
*{color:#ff0000} at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351){color}*
*{color:#ff0000} at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197){color}*
*{color:#ff0000} at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564){color}*
*{color:#ff0000} at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193){color}*
*{color:#ff0000} at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62){color}*
*{color:#ff0000} at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240){color}*
*{color:#ff0000} at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348){color}*
*{color:#ff0000} at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259){color}*
*{color:#ff0000} at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source){color}*
*{color:#ff0000} at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392){color}*
*{color:#ff0000} at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380){color}*
*{color:#ff0000} at javax.naming.InitialContext.lookup(InitialContext.java:392){color}*
*{color:#ff0000} at eg.com.efinance.HelloWorldSessionClient.main(HelloWorldSessionClient.java:12){color}*
*{color:#ff0000}Caused by: java.lang.ClassNotFoundException: eg.com.efinance.HelloWorldSession{color}*
*{color:#ff0000} at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151){color}*
*{color:#ff0000} at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.loadClass(RemoteBizIntfClassLoader.java:96){color}*
*{color:#ff0000} at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:54){color}*
*{color:#ff0000} ... 26 more{color}*
*{color:#ff0000}Process exited with exit code 1.{color}*

Hello
The problem is beacause weblogic doesn't allow blank spaces in the CLASS PATH, so try that in your path doesn't exit blank spaces like these:
C:\Documents and Settings

Similar Messages

  • Accessing the same stateful session bean from multiple clients in a clustered environment

    I am trying to access the same stateful session bean from multiple
              clients. I also want this bean to have failover support so we want to
              deploy it in a cluster. The following description is how we have tried
              to solve this problem, but it does not seem to be working. Any
              insight would be greatly appreciated!
              I have set up a cluster of three servers. I deployed a stateful
              session bean with in memory replication across the cluster. A client
              obtains a reference to an instance of one of these beans to handle a
              request. Subsequent requests will have to use the same bean and could
              come from various clients. So after using the bean the first client
              stores the handle to the bean (actually the replica aware stub) to be
              used by other clients to be able to obtain the bean. When another
              client retrieves the handle gets the replica aware stub and makes a
              call to the bean the request seems to unpredictably go to any of the
              three servers rather than the primary server hosting that bean. If the
              call goes to the primary server everything seems to work fine the
              session data is available and it gets backed up on the secondary
              server. If it happens to go to the secondary server a bean that has
              the correct session data services the request but gives the error
              <Failed to update the secondary copy of a stateful session bean from
              home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              to the primary server will not reflect changes made on the secondary
              and vice versa. If the request happens to go to the third server that
              is not hosting an instance of that bean then the client receives an
              error that the bean was not available. From my understanding I thought
              the replica aware stub would know which server is the primary host for
              that bean and send the request there.
              Thanks in advance,
              Justin
              

              If 'allow-concurrent-call' does exactly what you need, then you don't have a problem,
              do you?
              Except of course if you switch ejb containers. Oh well.
              Mike
              "FBenvadi" <[email protected]> wrote:
              >I've got the same problem.
              >I understand from you that concurrent access to a stateful session bean
              >is
              >not allowed but there is a
              >token is weblogic-ejb-jar.xml that is called 'allow-concurrent-call'
              >that
              >does exactly what I need.
              >What you mean 'you'll get a surprise when you go to production' ?
              >I need to understand becouse I can still change the design.
              >Thanks Francesco
              >[email protected]
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Get the fix immediately from BEA and test it. It would be a shame to
              >wait
              >until
              >> December only to get a fix - that doesn't work.
              >>
              >> As for stateful session bean use - just remember that concurrent access
              >to
              >a stateful
              >> session bean is not allowed. Things will work fine until you go to
              >production
              >> and encounter some real load - then you will get a surprise.
              >>
              >> Mike
              >>
              >> [email protected] (Justin Meyer) wrote:
              >> >I just heard back from WebLogic Tech Support and they have confirmed
              >> >that this is a bug. Here is their reply:
              >> >
              >> >There is some problem in failover of stateful session beans when its
              >> >run from a java client.However, it is fixed now.
              >> >
              >> >The fix will be in SP2 which will be out by december.
              >> >
              >> >
              >> >Mike,
              >> >Thanks for your reply. I do infact believe we are correctly using
              >a
              >> >stateful session bean however it may have been misleading from my
              >> >description of the problem. We are not accessing the bean
              >> >concurrently from 2 different clients. The second client will only
              >> >come into play if the first client fails. In this case we want to
              >be
              >> >able to reacquire the handle to our stateful session bean and call
              >it
              >> >from the secondary client.
              >> >
              >> >
              >> >Justin
              >> >
              >> >"Mike Reiche" <[email protected]> wrote in message
              >news:<[email protected]>...
              >> >> You should be using an entity bean, not a stateful session bean
              >for
              >> >this application.
              >> >>
              >> >> A stateful session bean is intended to be keep state (stateful)
              >for
              >> >the duration
              >> >> of a client's session (session).
              >> >>
              >> >> It is not meant to be shared by different clients - in fact, if
              >you
              >> >attempt to
              >> >> access the same stateful session bean concurrently - it will throw
              >> >an exception.
              >> >>
              >> >> We did your little trick (storing/retrieving handle) with a stateful
              >> >session bean
              >> >> on WLS 5.1 - and it did work properly - not as you describe. Our
              >sfsb's
              >> >were not
              >> >> replicated as yours are.
              >> >>
              >> >> Mike
              >> >>
              >> >> [email protected] (Justin Meyer) wrote:
              >> >> >I am trying to access the same stateful session bean from multiple
              >> >> >clients. I also want this bean to have failover support so we want
              >> >to
              >> >> >deploy it in a cluster. The following description is how we have
              >tried
              >> >> >to solve this problem, but it does not seem to be working. Any
              >> >> >insight would be greatly appreciated!
              >> >> >
              >> >> >I have set up a cluster of three servers. I deployed a stateful
              >> >> >session bean with in memory replication across the cluster. A client
              >> >> >obtains a reference to an instance of one of these beans to handle
              >> >a
              >> >> >request. Subsequent requests will have to use the same bean and
              >could
              >> >> >come from various clients. So after using the bean the first client
              >> >> >stores the handle to the bean (actually the replica aware stub)
              >to
              >> >be
              >> >> >used by other clients to be able to obtain the bean. When another
              >> >> >client retrieves the handle gets the replica aware stub and makes
              >> >a
              >> >> >call to the bean the request seems to unpredictably go to any of
              >the
              >> >> >three servers rather than the primary server hosting that bean.
              >If
              >> >the
              >> >> >call goes to the primary server everything seems to work fine the
              >> >> >session data is available and it gets backed up on the secondary
              >> >> >server. If it happens to go to the secondary server a bean that
              >has
              >> >> >the correct session data services the request but gives the error
              >> >> ><Failed to update the secondary copy of a stateful session bean
              >from
              >> >> >home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              >> >> >to the primary server will not reflect changes made on the secondary
              >> >> >and vice versa. If the request happens to go to the third server
              >that
              >> >> >is not hosting an instance of that bean then the client receives
              >an
              >> >> >error that the bean was not available. From my understanding I
              >thought
              >> >> >the replica aware stub would know which server is the primary host
              >> >for
              >> >> >that bean and send the request there.
              >> >> >
              >> >> >Thanks in advance,
              >> >> >Justin
              >>
              >
              >
              

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • Exception while i m looking up my session bean from Client

    hi,
    actully i try to make a simple session bean ok
    first i make a seession bean and make his deployment discriptor
    and put all thing a jar file and deployee this file on Server its successfuly
    loaded and deploed.
    ok the problem is when i make a client bean and try to run it. it give me this exception
    javax.naming.NoInitialContextException:
    Need to specify class name in environment or system property, or as an applet parameter,
    or in an application resource file: java.naming.factory.initial      
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:643)      
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)      
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)      
    at javax.naming.InitialContext.lookup(InitialContext.java:350)      
    at HelloClient.main(HelloClient.java:15)
    Process Exit...
    i where i right the machine name where my appserver is runing. inside lookup method
    client bean code is
    =====================
    import java.rmi.*;
    import javax.naming.*;
    import java.util.*;
    import HASSSAN.*;
    public class HelloClient {
         public static void main(String arg[]) {
         try {
              javax.naming.Context ctx =
              new javax.naming.InitialContext(System.getProperties());
              Object obj = ctx.lookup("HelloBean");
              HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
              Hello hello =home.create();
              System.out.println(hello.sayHello());
              hello.remove();
              System.out.println("Success");
         }catch(Exception e) {
              e.printStackTrace();
    }

    Two hints:
    Need to specify class name in environment or system
    property, or as an applet parameter,
              javax.naming.Context ctx = new javax.naming.InitialContext(System.getProperties());This means you need to check what you're putting on your command line in the way of "-D" settings.
    or in an application resource file:You can get this from the methodology jgongo mentions.

  • Looking up of a stateless session bean from an MDB

    Hi,
    I have been trying to invoke a method on a stateless session bean from an MDB on receipt of a message from a queue. The bean receives the message. Then it gets the initial context, but after this the following message appears:
    javax.naming.NamingException: Error instantation environment context for Message DrivenBean MyMDB: No location specified and no suitable instance of the type 'MySessionRemote' found for the ejb-ref <mySessionBean> at com.evermind.server.ejb.MessageDrivenHome.getEnvironmentContext(MessageDrivenHome.java:559)
    The session bean is in a seperate ear file. These are the deployment descriptors of the MDB:
    ejb-jar:
    <ejb-jar>
         <description>A Message-Driven Beans</description>
         <enterprise-beans>
         <message-driven>
              <description></description>
              <ejb-name>MyMDB</ejb-name>
              <ejbclass>MyMDB</ejb-class>
              <message-driven-destination>
              <jms-destination-type>javax.jms.Queue</jms-destination-type>
              </message-driven-destination>
              <ejb-ref>
              <ejb-ref-name>MySessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <home>MySessionEJBHome</home>
              <remote>MySessionRemote</remote>
              </ejb-ref>
         </message-driven>
         </enterprise-beans>
         <assembly-descriptor>
         </assembly-descriptor>
    </ejb-jar>
    orion-ejb-jar
    <orion-ejb-jar>
    <enterprise-beans>
              <message-driven-deployment name="QueueProcessor" destination-location="jms/theQueue" connection-factory-location="jms/theQueueConnectionFactory">
              </message-driven-deployment>
         </enterprise-beans>
         <assembly-descriptor>
         </assembly-descriptor>
    </orion-ejb-jar>
    The lookup name which I give in MDB is:
    java:comp/env/MySessionEJB

    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

  • JNDI Naming Problem accessing Session Bean from Message Driven Bean

    Hi,
         I am facing a very strange problem in JNDI look up accessing a Session Bean from a Message Driven Bean. I have a session fa�ade bean(Remote Bean) which is being called from Struts Action class getting the home reference from the ServiceLocator (I have implemented ServiceLocator pattern to obtain JNDI reference for all EJBs). When I am calling the session fa�ade EJB from the Struts Action class everything is working fine.
         But when I am trying to call the same EJB from my Message Driven Bean, I am getting a JNDI exception (NameNotFoundException - No Object bound to name �java:comp/env/ejb/EJBJNDIName�). I am trying to get the remote reference from the same ServiceLocator which is successfully providing me a reference while calling from the struts action class. But the same ServiceLocator is not able to provide me a reference while calling from the Message Driven Bean. If I use the JNDI name directly like �EJBJNDIName� in the lookup it is working fine. The lookup for the name is working fine and I am able to call the Session Fa�ade bean with that reference.
         I am really not sure what exactly the problem is. If I have any problem in the ServiceLocator, it should have given me the same error while calling from Struts Action class. But it is working fine with the full name �java:comp/env/ejb/EJBJNDIName� calling from the struts action class. I am not sure whether Message Driven Bean has something to do with it. Why I am not able to get a reference of the EJB with the full name? Please Help.
    Thanks
    Amit

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

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

  • Problem when calling session bean from main.

    Hi everyone
    I get the following error when calling a session bean from main(String args[]).
    Sep 3, 2008 9:11:13 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    java.lang.NullPointerException
    at databasetest.Main.main(Main.java:26)
    Here is my code beneath.
    I'm using netbeans and glassfish application server.
    Everything is in the same project, called DatabaseTest, I also have deployed the application before running the client.
    I'm running the client as follows, right click on the DatabaseTest-app-client and select run.
    The client:
    package databasetest;
    import com.test.UsersFacadeRemote;
    import javax.ejb.EJB;
    import com.test.Users;
    public class Main {
        @EJB
        private static UsersFacadeRemote usersFacade;
        public static void main(String[] args) {
            Users users = new Users(12, 34);
            usersFacade.create(users);
    }The remote facade I'm calling:
    package com.test;
    import java.util.List;
    import javax.ejb.Remote;
    @Remote
    public interface UsersFacadeRemote {
        void create(Users users);
        void edit(Users users);
        void remove(Users users);
        Users find(Object id);
        List<Users> findAll();
    }The stateless bean:
    package com.test;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless
    public class UsersFacade implements UsersFacadeRemote {
        @PersistenceContext
        private EntityManager em;
        public void create(Users users) {
            em.persist(users);
        public void edit(Users users) {
            em.merge(users);
        public void remove(Users users) {
            em.remove(em.merge(users));
        public Users find(Object id) {
            return em.find(com.test.Users.class, id);
        public List<Users> findAll() {
            return em.createQuery("select object(o) from Users as o").getResultList();
    }

    looks like you're banging your head against the same brick wall as [I have done|http://forums.sun.com/thread.jspa?forumID=13&threadID=5317110] and [others have in the past|http://forums.sun.com/thread.jspa?forumID=136&threadID=5259913] if that's any consolation.
    Funny thing is, mine did actually work in the debugger but not when running!
    Strange thing that.
    I did initially interest someone from the developers but they couldn't really help, ended up saying : try instantiating your beans the EJB 2.1 way and see where that gets you. Yes that works but they promised us "hey no more dopey xml deployment descriptors just some cool annotations" didn't they?
    I've got the feeling were' missing something really obvious!
    Edited by: sebthebike on 03-Sep-2008 12:21

  • Error in updating secondary stateful session bean

              Hi all,
              I have set up a cluster of 2 managed servers with WebLogic 6.1. I have a
              stateful session bean and several stateless session beans. the stateful
              session bean keeps user info and limited cached objects, all are
              serializable. it seems working fine, even after killing any one of the
              servers, as long as one is alive. a java application client creates a
              stateful session bean first, then calls stateless session beans with the
              remote interface of the stateful bean as a method parameter. No problem
              when stateful session bean is created. However, each stateless bean method
              generates the following error message if I turn the debug on (level 64). No
              exception stack traces, and all methods execute successfully.
              <Error> <EJB> <Failed to update the secondary copy of a stateful session
              bean from home:clientsession>
              I wonder what causes the error, and why it tries to update the stateful
              session bean. in all stateless session beans, only read into the stateful
              bean.
              Thank you,
              Fujin
              

    This has been fixed in WLS 6.1 SP2.
              jagdip Talla wrote:
              > Hi Fujin,
              > please let me know, if u were able to solve the problem..
              >
              > hi guys,
              > appreciate if you could give me some clues
              > how to solve this problem ?
              >
              > i hv 2 WLS instances in a cluster,
              > when one server instance is shut down, i keep getting these errors ?
              > is it normal ?
              > <Feb 19, 2002 2:57:53 PM SGT> <Error> <EJB> <Failed to update the secondary copy of a stateful session bean from home:ejb/xyzrel1_2/xxxxHome>
              >
              > appreciate if u can let me know, if u could solve it..?
              >
              > thanks n regads
              > jagdip
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support
              

  • HowTo talk to a Session bean from an Applet sample app. problem

    Hi!
    When I push the "Call EJB" button in the sample application I get the following exception:
    2005.02.20. 15:49:27 com.evermind.server.rmi.RMIClient createRemoteInvocationHandlerFactory
    WARNING: com.evermind.server.ejb.EJBRemoteInvocationHandlerFactory
    java.lang.ClassNotFoundException: com.evermind.server.ejb.EJBRemoteInvocationHandlerFactory
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.evermind.server.rmi.RMIClient.createRemoteInvocationHandlerFactory(RMIClient.java:427)
         at com.evermind.server.rmi.RMIClient.initHandlerFactories(RMIClient.java:415)
         at com.evermind.server.rmi.RMIClient.<init>(RMIClient.java:61)
         at com.evermind.server.rmi.RMIClient.getInstance(RMIClient.java:464)
         at com.evermind.server.rmi.RMIInitialContext.<clinit>(RMIInitialContext.java:48)
         at oracle.j2ee.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:58)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at oracle.otnsamples.EJBCaller.getInitialContext(Unknown Source)
         at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
         at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
         at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 43 more
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
         java.net.ConnectException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:183)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
         at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
         at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:394)
         at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:80)
         at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:250)
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:154)
         ... 26 more
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
         java.net.ConnectException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:183)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
         at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
         at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:394)
         at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:80)
         at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:250)
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:154)
         ... 26 more
    Thanks!

    Refer to the following link for a list of tutorials that will guide you through the steps you have queried about: http://www.oracle.com/technology/tech/java/ejb30.html
    Also, if you are attempting to call a session bean from your applet code you may run into firewall issues depending on your corporate infrastructure. RMI does not run over the ever popular port 80 and therefore is not always open on company firewalls. If you run into trouble you may have to use HTTP Tunneling. A better alternative maybe to call your session bean as a web service which is provided to you by default in the EJB 3.0 spec.

  • How call session bean from Client side

    Hi
    calling session bean from client side it gives Lookup erroe, it gives JNDI error
    how we know session bean is working. in Admin tree bean statis is reb Flaf, and ID is "Down" how we activate it..
    null

    If you can make a connection using sess_sh, then you know that you have configured your database and listener properly. If it is not working, read the manuals that you can download from technet. They are pretty good, and if you follow the directions, you should see success.
    Good Luck!
    Brad

  • Trying to call stateless session bean from MDB

    Folks,
    Am working on RAD and WAS 8.
    I have an MDB. And a stateless session bean (AOBean under EJB project).
    While the listener listens to the messages from queue, it also tries to persist to db. I want to achieve this via a method of AOBean (through instantiating session bean or by injection).
    I have been sucessful by invoking a method from AOBean class -  that method just returns a string (without any objects being passed)
    Problem:
    I am getting IllegalStateException when I try to invoke a method of AOBean class, that has an object as a parameter
    For eg:
    MDB
    @EJB(name="ejb/TransactionMgrAOBean", mappedName="ejb/TransactionMgrAOBean")
    ITransactionMgrAO tranAO;
        public void onMessage(Message message) {
         TextMessage textMessage = (TextMessage) message;
         boolean status = false;
      try {
       TransactionVO tranVO =  getTransactionVO();//Here building the object to be passed to session bean
       String status1  = tranAO.getVersion(tranVO);
      }catch(Exception e){
    AOBean
    @Stateless
    @Remote({ ITransactionMgrAO.class })
    @WebService
    public class TransactionMgrAOBean {
    public String getVersion(TransactionVO tranVO) throws Exception{
      try{
    //business logic 
      } catch(Exception e){
      throw e;
      return true;
    TransactionVO implements Serializable has also inner static classes that are not Serializable.
    EXCEPTION: At runtime we are getting exception saying that the inner classes are not serialized.
    REASON why we are invoking session bean from MDB? We found that if we invoke any service from AOBean the transaction management was successful. We are using sessionContext.setRollBackonly when an exception occurs. Tranasactions are not rolled back when any db exception occurs if we invoke business logic methods from Model layer of another NON-EJB package.
    Hope I have provided enough information!

    My concret problem is that I want to call an ejb session contained in an ejb project from a session bean in a different web project. When I include the code in my web session bean I get the error adjunted:
    - Code:
    @EJB
    private UserRemote userSessionBean;
    - Error:
    Exception Details: javax.naming.NameNotFoundException
    pac.UserRemote#pac.UserRemote not found
    Possible Source of Error:
    Class Name: com.sun.enterprise.naming.TransientContext
    File Name: TransientContext.java
    Method Name: doLookup
    Line Number: 216
    Any suggestion?

  • 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                                                                                                                                                                                                                               

  • Injecting session bean from different EAR

    Dear all,
    I am using ejb3. i have ejb.ear and web.ear. both deploy in same weblogic server.
    i want to inject session bean from ejb.ear inside web.ear.
    With Regards,
    WP

    hi,
    Currently, we want to separate it. Because may be we will deploy in different server in the future.
    So far, i can inject it using remote interface.
    How about local interface? is it possible to use local interface? because so far both deploy on same server.
    As far as i know, glassfish can't. isn't it?
    it is j2ee standard or server specific?
    With Regards,
    WP

  • EXCEL VBA: Inserting rows code returns error "2147417848 The object invoked has disconnected from its clients"

    I was executing the following code in Excel 2013 that is linked to a button I use to add multiple rows in a chosen section of a worksheet
    Sub Add_Rows_dc()
    Sheet53.Unprotect ("xxx")
    X = Range("C1").Value + 1 'Section Counter
    Y = ListSheet.Range("I" & X).Value 'Existing rows counter
    Z = ListSheet.Range("H" & X).Value 'Position counter
    Righe = InputBox("How many rows would you like to add?", , "1")
    If Righe < 1 Then GoTo err ' test for invalid row number
    RigheSheet.Rows(X).Copy
    Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
    GoTo Fine
    err:
    Mess = MsgBox("PLEASE INSERT A VALID NUMBER OF ROWS", vbCritical)
    Fine:
    'Formulas update
    Z = ListSheet.Range("H" & X).Value 'Position counter update
    Range("U" & Z - Righe - 2 & ":AF" & Z - 2).FillDown
    Sheet53.Protect "xxx", , , , , True
    End Sub
    From time to time it returns me the error "2147417848 The object invoked has disconnected from its clients" and the debug point out the line
    Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
    I cannot find any specific reason due to the fact that the error seems randomic, sometimes the code is perfectly executed, sometimes not.
    I wrote this piece of code in Excel 2010 and never encountered such problem before reusing it in Excel 2013
    Has someone an insight or a suggestion?
    Thank you very much

    Re:  strange error
    Try it this way...
    (might work, might not)
    Sub Add_Rows_dc_R1()
     Dim X As Double
     Dim Y As Double
     Dim Z As Double
     Dim Righe As Variant
     Dim Mess As Long
        Sheet53.Unprotect ("xxx")
        X = Range("C1").Value + 1 'Section Counter
        Y = ListSheet.Range("I" & X).Value 'Existing rows counter
        Z = ListSheet.Range("H" & X).Value 'Position counter
        Righe = InputBox("How many rows would you like to add?", , "1")
        If Righe < 1 Then GoTo errX  ' test for invalid row number
         RigheSheet.Rows(X).Copy
         Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
        GoTo Fine  
    Fine:
    'Formulas update
     Z = ListSheet.Range("H" & X).Value 'Position counter update
     Range("U" & Z - Righe - 2 & ":AF" & Z - 2).FillDown
     Sheet53.Protect "xxx", , , , , True
    Exit Sub
    errX:
    Mess = MsgBox("PLEASE INSERT A VALID NUMBER OF ROWS", vbCritical)
    End Sub
    Jim Cone
    Portland, Oregon USA
    free & commercial excel programs (n/a xl2013)
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

Maybe you are looking for

  • "Can't establish a secure connection to server" Ne...

    Since moving to BT on 22nd Oct none of my Apple devices, laptop, phone or desktop are able to access Dropbox, iCal (cloud synced calander) or iCloud (Apple's cloud service). I get a message that "a secure connection to the server could not be establi

  • Time Machine problem after 10.6 upgrade

    Hi Guys, After I installed the snow leopard, I got a prompt regarding the time machine: "cancel backup" "create new backup" "replace backup". I clicked on "create new backup" but that seemed to have been the wrong choice. The time machine said that t

  • Satellite A660-18N - Powers off after waking from sleep mode

    My Satellite A660-18N powers off 2-3 seconds after waking from sleep mode. I upgraded the memory from 4GB to 8GB, using Crucial's website, so I know it's compatible. BIOS is updated to 2.00. Not sure what to do, how can I fix this without turning off

  • Query builder 10g

    Hi Friends, I want to teach end users make their own reports using QUERY BUILDER 10g. Where do I download this software? Is this stand alone? Thanks a lot

  • Getting hold of emails

    We changed an hour ago from  BTYahoo to BT Total Broadband. Everything is working but we have lost the old emails, folders etc. . When we phoned up for the Broadband I was told that we should be able to receive emails send to our old address. Tried t