EJB Handle return remote ref fails??

Having a problem getting a remote reference on an EJB using a handle. Create a remote ref to an EJB and store three items and display said items - okay
Get a handle to the remote ref and serialize and store - okay
Deserialize - okay
Cast to remote ref - NOT okay wants a home ref?
This example is, by and large, similar to the example in section 6.8 of the EJB 2.0 Spec.
Need to know why I cannot get the remote ref returned? Is there an OC4J issue? Please let me know when you can as would like to use this in a class.
THANKS - Ken Cooper
public class CartClient {
public static void main(String[] args) {
CartClient cartClient = new CartClient();
try {
Context context = getInitialContext();
CartHome cartHome = (CartHome) PortableRemoteObject.narrow(context.lookup(
"Cart"), CartHome.class);
Cart cart;
// Use one of the create() methods below to create a new instance
cart = cartHome.create();
// Call any of the Remote methods below to access the EJB
// cart.getItems( );
// cart.addItems( java.lang.String p );
cart.addItems("Truck");
cart.addItems("Car");
cart.addItems("Boat");
System.out.println(cart.getItems());
// Serialize and store in C:\cartHandle
Handle cartHandle = cart.getHandle();
FileOutputStream out = new FileOutputStream("C:/cartHandle");
ObjectOutputStream so = new ObjectOutputStream(out);
so.writeObject(cartHandle);
so.flush();
System.out.println("Serialized");
// Deserialize from C:\cartHandle
FileInputStream in = new FileInputStream("C:/cartHandle");
ObjectInputStream si = new ObjectInputStream(in);
cartHandle = (Handle) si.readObject();
System.out.println("DeSerialized");
Cart cart2 = (Cart) PortableRemoteObject.narrow(cartHandle.getEJBObject(),
Cart.class);
System.out.println("Second: " + cart2.getItems());
} catch (Throwable ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL,
"ormi://localhost:23891/current-workspace-app");
return new InitialContext(env);
OUTPUT AND ERROR FROM EXECUTION
C:\JDev9031\jdk\bin\javaw.exe -ojvm -classpath C:\JDev9031\jdev\mywork\del15aug\Project4\classes;......
Start: TruckCarBoat
Serialized
DeSerialized
com.evermind.server.rmi.OrionRemoteException: Error looking up EJBHome at location 'Cart'
javax.ejb.EJBObject com.evermind.server.ejb.StatefulSessionHandle.getEJBObject()
StatefulSessionHandle.java:56
void mypackage4.CartClient.main(java.lang.String[])
CartClient.java:53 (NOTE: The highlighted line above is line 53)

Thank you all guys for your suggests, and sorry for my (long) silence: i was at home with hard cough. I think that unfortunally the problem is more in deep. This because:
1) at the beginnnig, in my (many) attempts I've tried to give the server url in a lot of ways:
a) only the IP;
b) http://<IP>;
c) http://<IP>: <port>;
d) http://<server-name>;
e) http://<server-name>:<server-port>;
b) iiop://<IP>;
c) iiop://<IP>: <port>;
d) iiop://<server-name>;
e) iiop://<server-name>:<server-port>;
In this cases, using init.put(org.omg.CORBA.ORBInitialHost,<param-value>) (init is Java Properties object), I didn't get what I would: always AppServer running on Win2000 responded me, instead of the one running on Linux.
Using instead using init.put(Context.PROVIDER_URL,<param-value>) , in case a) I got the error message Root exception is java.net.MalformedURLException: no protocol:<IP-number>. In case b), c), d) and e) I got invalid url - connection refused error message (Invalid URL: http://gandalf.engiweb.com. Root exception is java.net.ConnectException: Connection refused: connect).
A collegue of mine is using WebSphere and everything seems to work correctly. I'm afraid that there is a problem (of misconfiguration?) in the Borland Application Server. This is a problem, because, if I have (suppose) server gandalf running, with the correct EJB, and the server Saruman running too, but with the scorrect EJB, or the ejb container down, always respond me Saruman, not Gandalf: my tests gave me this result.
At the moment I don't know what to do, except migrate to WebSphere, or another Application Server.
Thank you a lot for your interest. Bye!

Similar Messages

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • Error connecting to an EJB 3.0 Remote on OC4J 10.1.3.2 from Tomcat

    Hi, I want to connect to a Remote Session Bean running on the OC4J 10.1.3 and it doesn´t work.
    I have connected to it from a java standalone application using:
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    System.out.println(sessionEJB.mergeEntity(""));
    System.out.println( "hola" );
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Standalone OC4J connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "passw" );
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/ejb3jar");
    return new InitialContext( env );
    with this application-client.xml file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Model-app-client</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
    <ejb-link>SessionEJB</ejb-link>
    </ejb-ref>
    thats works fine, but when I try to use the same solution from a jsf proyect running on a Tomcat 5.5.20, it fails with this error:
    Caused by: java.lang.RuntimeException: Error while creating home.
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:32)
         at ar.com.mcd.fawkes.ui.locator.ServiceLocator$1.get(ServiceLocator.java:12)
         at net.sf.opentranquera.web.jsf.locator.ServiceLocatorBean.get(ServiceLocatorBean.java:42)
         at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
         ... 80 more
    Caused by: javax.naming.NameNotFoundException: Name ejb is not bound in this Context
         at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at ar.com.mcd.fawkes.ui.locator.EJB3Locator.get(EJB3Locator.java:28)
         ... 87 more
    Could you please help me with any tip?
    Mauricio
    Message was edited by:
    Mauricio

    Hi, Rick
    Thanks for your help.
    I deleted de application-client.xml file, added the following lines to the web.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
         </ejb-ref>
    and now I´m using oracle.j2ee.rmi.RMIInitialContextFactory
    there is no error, and it doesn´t throw any exception but the following line returns null.
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    Its seems the lookup method finds the remote ejb because it doesn´t fail, but it returns null.
    Any idea what is wrong?
    Mauricio.

  • SJSAS 9.1 does not expose EJB 3.0 remote Interface via JNDI

    I have successfully deployed a simple Stateful EJB 3.0 bean (CartBean, like the one in the Java EE 5 tutorial remote interface Cart) on SJSAS 9.1, located on machine host1.
    After I deployed the CartBean, I browsed the SJSAS and noticed the existence of the following JNDI entries:
    ejb/Cart
    ejb/Cart__3_x_Internal_RemoteBusinessHome__
    ejb/Cart#main.Cart
    ejb/mgmt
    ejb/myOtherEJB_2_x_bean ( +myOtherEJB_2_x_bean+ is a different 2.x bean that I have deployed as well)So, I am trying to access the remote interface of the CartBean from a remote machine, host2. The client application is a Java-standalone client.
    I am using the Interoperable Naming Service syntax: corbaname:iiop:host1:3700#<JNDI name>
    The problem is that the remote interface of the bean does NOT seem to be available via JNDI. I get the javax.naming.NameNotFoundException when I try to do a lookup like:
    corbaname:iiop:host1:3700#ejb/Cart
    On the other hand, the following lookups succeed:
    corbaname:iiop:host1:3700#ejb/mgmt
    corbaname:iiop:host1:3700#myOtherEJB_2_x_bean
    and also the following succeeds:
    corbaname:iiop:host1:3700#ejb/Cart__3_x_Internal_RemoteBusinessHome__So it seems like the Remote interface is not available via JNDI, rather only some internal SJSAS implementation (the object returned from the ejb/Cart__3_x_Internal_RemoteBusinessHome__ lookup is of type: com.sun.corba.se.impl.corba.CORBAObjectImpl
    Why is this happening? I know there used to be a bug in Glassfish, but I thought it had been fixed since 2006.
    Many thanks in advance, any help would be greatly appreciated.

    The EJB 3.0 Remote Business references are not directly stored in CosNaming. EJB 3.0 Remote references do not have the cross-vendor interoperability requirements that the EJB 2.x Remote view had.
    You can still access Remote EJB references from a different JVM as long as the client has access to SJSAS naming provider. Please see our EJB FAQ for more details :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Error trying to deserialize EJB HomeHandle and EJB Handle classes

    I get the following exception when I try to deserialize both a javax.ejb.HomeHandle and a javax.ejb.Handle.  I serialize and immediately deserialize within the same application using the same classloader so there are not alot of external variables that may cause the problem.  Any ideas on why I can't deserialize an ejb handle?
    The reason I am doing this is to try and get around the need to reference another application just to call a remote method in that application.  I want to serialize the remote home interface handle or the remote component interface handle and deserialize it using my local application classloader.  Does anybody know if this would work?
    #1#java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class turtle.registry.SBRegistryRemoteHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at turtle.common.util.SerializationHelper.convertObject(SerializationHelper.java:43)
         at turtle.common.server.connect.RemoteFactory.getRemoteSAPWAS(RemoteFactory.java:206)
         at turtle.common.server.connect.RemoteFactory.getRemote(RemoteFactory.java:46)
         at turtle.common.server.connect.RemoteProxyFactory.getRemote(RemoteProxyFactory.java:99)
         at turtle.common.server.connect.RemoteProxyFactory.create(RemoteProxyFactory.java:91)
         at turtle.common.server.connect.RemoteProxyFactory.createProxy(RemoteProxyFactory.java:52)
         at turtle.server.runtime.registry.RegistryFacade.connectToRegistry(RegistryFacade.java:932)
         at turtle.server.runtime.registry.RegistryFacade.getGenericRegistryBI(RegistryFacade.java:987)
         at turtle.server.runtime.registry.RegistryFacade.unbindObjectsInProject(RegistryFacade.java:857)
         at turtle.registry.ProjectRegistrar$1$1.run(ProjectRegistrar.java:130)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at turtle.common.security.auth.AuthenticatorBase.doAs(AuthenticatorBase.java:387)
         at turtle.registry.ProjectRegistrar$1.run(ProjectRegistrar.java:172)
         at java.util.TimerThread.mainLoop(Timer.java:512)
         at java.util.TimerThread.run(Timer.java:462)

    Has anyone been able to get this to work?  Or can anyone confirm that this is a bug?
    As a simpler test, I modified the UserManagementBean of the Car Rental example application.  I added some code in the register method that serializes and deserializes the Handle object obtained from the SessionContext.getEJBObject().getHandle() method.  The serialization completes without issue.  However, I get the same error when trying to deserialize the Handle object:
    java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class com.sap.engine.examples.epf.ejb.controller.customer.UserManagementHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1917)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1841)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deSerialize(SerializationUtils.java:33)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deepClone(SerializationUtils.java:59)
         at com.sap.engine.examples.epf.ejb.controller.customer.UserManagementBean.register(UserManagementBean.java:75)

  • EJB Handle deserialization ....

    Hi,
    I am running Weblogic Server 8 SP2 with the supplied ejb20_basic_statefulSession example.
    <p>
    My client is a webapp installed on Tomcat and is using the ejb20_basic_statefulSession_client.jar, together with the WebLogic's wlclient.jar. I can successfully invoke the methods (buy, sell, getBalance) and get back the expected results.
    <p>
    Now the problem. I am storing an object containing an EJBHandle to the Trader SFSB in a HTTPSession. Upon HTTPSession passivation, the EJB Handle is serialized out. However, upon HTTPSession activation, deserialization fails and I am getting the following exception:
    <p>
    Error deserializing Session 5E343833AA1183690C6895162B69E1D1.localhost:8005: java.lang.ClassNotFoundException: <b>examples.ejb20.basic.statefulSession._Trader_Stub</b>
    <p>
    The funny thing is that I cannot find the class <b>examples.ejb20.basic.statefulSession._Trader_Stub</b> anywhere. It is not generated by wlappc.
    <p>
    I have tried writeObject()/readObject() and HttpSessionBindingListener's valueBound()/valueUnbound(), but I am still getting the same error.
    Would appreciate any input. Thanks.
    Regards,
    Eric

    Hi getting the below error deserilising the EJBObject after serilizaion.
    Below is the code to obtain it
    ==============================================
    FileInputStream fis = new FileInputStream ("d:/beaexam/serial");
    ObjectInputStream ois = new ObjectInputStream(fis);
    SecondLocal learnLocal1 = null;
    Handle handle = (Handle)ois.readObject();
    ==============================================
    java.lang.ExceptionInInitializerError
    at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:99)
    at java.io.ObjectInputStream.readExternalData(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at EJBClientHandle.main(EJBClientHandle.java:14)
    Caused by: java.lang.NullPointerException
    at weblogic.rmi.utils.io.RemoteObjectReplacer.<clinit>(RemoteObjectRepla
    cer.java:47)
    ... 6 more

  • EJB Handles & Clustering

    I'm just curious about what happens when I use an ejb handle for a stateful session
    bean in a clustered environment. Does the reference I get back when I use the
    handle point me back to the exact bean I was using or does it pick a clone of
    the bean on any one of the servers? Assume that the stateful bean replication
    has been enabled.
    Many Thanks,
    Ron

    Jason Pringle wrote:
              > Since serialization of the handle is not supported under clustering, how do
              > I get the servlet to "find" the same stateful bean instance on subsequent
              > invocations?
              Our docs should be more clear here. Our current version doesn't support
              fail-over on handles in a cluster. So if you create a handle on server A
              and server A goes down you will not be able to re-create the bean currently.
              This is a known bug, and it should be fixed by the EJB 1.1 release (the final
              release not the beta(s))
              As long as the server where the handle was created and where the stateful
              session bean lives are alive, handles will work fine.
              -- Rob
              > I'm ok with having it die if the server goes down (my session
              > will still exist, I'll get an "object not found" error and have the user
              > restart the operation), but would like to be able to use stateful session
              > EJBeans across servlet invocations.
              >
              > Thanks for any input!
              >
              > --Jason
              

  • Catch javax.ejb.EJBException: Could not activate; failed to restore state

    Software
    JDK 1.5
    Jboss 4.0.5GA
    Problem
    I am getting
    DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
    javax.ejb.EJBException: Could not activate; failed to restore state
    I know this error is as my bean is getting passivated and then when I try to use the Remote Interface that bean this error is thrown
    I require a method by which I can catch this error and create a new bean whenever required. Does anyone knows of any way by which I will catch this specific error and create a new Stateful bean.
    I mean to say some way by using the Remote Interface to find out whether the bean is active or has been vanished form the memory
    Thanks in advance
    CSJakharia

    This is the stack trace in the log file which I could see. I cannot understand the reason why it could not activate the Entity Class
    2007-02-27 18:45:47,816 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:45:47,816 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=4
    2007-02-27 18:45:47,816 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582147816, maxLifeAfterPassivation=1200000
    2007-02-27 18:45:47,826 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:45:54,546 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 18:47:54,759 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:47:54,759 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2007-02-27 18:47:54,759 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582274759, maxLifeAfterPassivation=1200000
    2007-02-27 18:47:54,759 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:50:46,396 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:50:46,396 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 18:50:46,396 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582446396, maxLifeAfterPassivation=1200000
    2007-02-27 18:50:46,396 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:52:12,169 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:52:12,169 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 18:52:12,169 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582532169, maxLifeAfterPassivation=1200000
    2007-02-27 18:52:12,279 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:52:20,401 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:52:20,401 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 18:52:20,401 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582540401, maxLifeAfterPassivation=1200000
    2007-02-27 18:52:20,401 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:53:24,553 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 18:57:10,578 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:57:10,578 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 18:57:10,578 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582830578, maxLifeAfterPassivation=1200000
    2007-02-27 18:57:10,578 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 18:59:45,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 18:59:45,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2007-02-27 18:59:45,050 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172582985050, maxLifeAfterPassivation=1200000
    2007-02-27 18:59:45,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:00:54,560 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:02:25,471 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:02:25,471 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 19:02:25,471 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172583145471, maxLifeAfterPassivation=1200000
    2007-02-27 19:02:25,471 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:04:09,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:04:09,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 19:04:09,050 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172583249050, maxLifeAfterPassivation=1200000
    2007-02-27 19:04:09,050 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:08:15,694 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:08:15,694 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 19:08:15,694 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172583495694, maxLifeAfterPassivation=1200000
    2007-02-27 19:08:15,694 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:08:24,757 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:17:11,645 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:17:11,645 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=12
    2007-02-27 19:17:11,645 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584031645, maxLifeAfterPassivation=1200000
    2007-02-27 19:17:11,675 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:17:11,685 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:17:54,767 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:17:54,767 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2007-02-27 19:17:54,767 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584074767, maxLifeAfterPassivation=1200000
    2007-02-27 19:17:54,767 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:20:46,404 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:20:46,414 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=2
    2007-02-27 19:20:46,414 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584246414, maxLifeAfterPassivation=1200000
    2007-02-27 19:20:46,414 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:22:12,177 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:22:12,177 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:22:12,177 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584332177, maxLifeAfterPassivation=1200000
    2007-02-27 19:22:12,177 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:22:20,409 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:22:20,409 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:22:20,409 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584340409, maxLifeAfterPassivation=1200000
    2007-02-27 19:22:20,409 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:24:41,682 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:27:10,586 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:27:10,586 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:27:10,586 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584630586, maxLifeAfterPassivation=1200000
    2007-02-27 19:27:10,586 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:29:45,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:29:45,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2007-02-27 19:29:45,058 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584785058, maxLifeAfterPassivation=1200000
    2007-02-27 19:29:45,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:32:11,689 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:32:25,479 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:32:25,479 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:32:25,479 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172584945479, maxLifeAfterPassivation=1200000
    2007-02-27 19:32:25,479 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:34:09,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:34:09,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:34:09,058 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172585049058, maxLifeAfterPassivation=1200000
    2007-02-27 19:34:09,058 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:38:15,703 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:38:15,703 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=1
    2007-02-27 19:38:15,703 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172585295703, maxLifeAfterPassivation=1200000
    2007-02-27 19:38:15,703 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:39:41,696 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:41:04,445 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
    javax.ejb.EJBException: Could not activate; failed to restore state
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:343)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:113)
         at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:457)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:129)
         at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:123)
         at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:236)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:954)
         at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
         at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.io.FileNotFoundException: E:\jboss-4.0.5.GA\server\default\tmp\sessions\com\common\IDerivedLastNoEntity-eyoauehf-c\eyocxhho-p.ser (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.run(StatefulSessionFilePersistenceManager.java:526)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.open(StatefulSessionFilePersistenceManager.java:535)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:323)
         ... 29 more
    2007-02-27 19:41:23,322 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
    javax.ejb.EJBException: Could not activate; failed to restore state
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:343)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:113)
         at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:457)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:129)
         at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:123)
         at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:236)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:954)
         at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
         at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.io.FileNotFoundException: E:\jboss-4.0.5.GA\server\default\tmp\sessions\com\prathamwoods\ITransProductionEntity-eyoauek7-d\eyocxrao-x.ser (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.run(StatefulSessionFilePersistenceManager.java:526)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.open(StatefulSessionFilePersistenceManager.java:535)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:323)
         ... 29 more
    2007-02-27 19:42:22,968 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
    javax.ejb.EJBException: Could not activate; failed to restore state
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:343)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:113)
         at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:457)
         at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:129)
         at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:123)
         at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:236)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:954)
         at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
         at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.io.FileNotFoundException: E:\jboss-4.0.5.GA\server\default\tmp\sessions\com\prathamwoods\ITransProductionEntity-eyoauek7-d\eyocxrao-x.ser (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.run(StatefulSessionFilePersistenceManager.java:526)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.open(StatefulSessionFilePersistenceManager.java:535)
         at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:323)
         ... 29 more
    2007-02-27 19:47:12,514 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2007-02-27 19:47:12,534 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
    2007-02-27 19:47:13,566 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2007-02-27 19:47:13,666 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1172585833646, maxLifeAfterPassivation=1200000
    2007-02-27 19:47:13,716 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done
    2007-02-27 19:47:54,775 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTaskThanks in advance
    CSJakharia

  • Can a Weblogic ejb access a remote non-tuxedo orb via iiop?

    Hi, A few years back I had a java client using the Weblogic Enterprise CORBA client
    call a remote non Tuxedo ORB via rmi-iiop. Now I am wondering whether I can have
    a Weblogic ejb call a remote non tuxedo ORB via rmi-iiop. From the documentation
    all that I can find is how to call into Websphere with an idl client, and how
    to use rmi-iiop to a remote, I am assuming, Websphere server. The only reference
    I can find is at http://e-docs.bea.com/wls/docs70/faq/server.html#287901, but
    it does not detail how the client finds the object.
    In my java client example I had a string ior which I passed to string_to_object().
    This returns an "object" that when I invoke a method of, the CORBA client miniorb
    would then send via IIOP to the remote orb. I implemented something similar in
    an ejb (using a string ior and calling string_to_object) and compiled it with
    my stubs. When I run it, it appears that it works fine until the actual _invoke()
    where it calls calls out via iiop and I get the following exception: org.omg.CORBA.COMM_FAILURE:
    minor code: 1398079491 completed: No at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:987)
    at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:76)
    at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:91)
    at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:158)
    at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:198)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:459) at com.unisys.otm.InteropTest._OTMSvcStub.sayHello(_OTMSvcStub.java:37)
    at com.unisys.otm.WOTest.HelloBean.sayHello(HelloBean.java:71) at com.unisys.otm.WOTest.HelloBean_3p5ifg_EOImpl.sayHello(HelloBean_3p5ifg_EOImpl.java:77)
    It would be helpful to know where I can look up the minor code to determine if
    there is a meaningful explanation. I am assuming that it is not getting out to
    the network, because the destination machine shows no request being received.
    If anyone has had experience with this and could offer me some insight, I would
    appreciate it.

    "elizabeth roush" <[email protected]> writes:
    [snip]
    see my response on interest.wtc
    andy

  • Super interfaces on EJB 3.0 Remote interface in OC4J 10.1.3

    We are implementing (on OC4J 10.1.3) an EJB 3.0 Stateless Session Bean with 2 business interfaces (remote and local) both of which extend an inteface we have defined in our system.
    When we look up the local interface we see our interface in the bean.
    When we look up the remote interface we do not see our interface in the bean.
    Any ideas?
    Thanks,
    Ed Dirago
    Computer Sciences Corp.
    FAA TFMS System

    The EJB 3.0 Remote Business references are not directly stored in CosNaming. EJB 3.0 Remote references do not have the cross-vendor interoperability requirements that the EJB 2.x Remote view had.
    You can still access Remote EJB references from a different JVM as long as the client has access to SJSAS naming provider. Please see our EJB FAQ for more details :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Processing data for a remote command failed with the following error message: Error occurred during the Kerberos reponse.

    Hi!
    We have 5 Exchange 2013 servers and when I’m trying to run a script that includes the cmd-let Get-MessageTrackinglog with StartDate = the first of the month and with EndDate = the end of the month I get the following error message after
    a couple of hours. The script is run on the server SERVER01 and goes through the Message Tracking logs of all Exchange servers. I have tried the script on other servers and get the same result.
    Processing data for a remote command failed with the following error message: Error occurred during the Kerberos reponse.
    [Server=SERVER01, TimeStamp = 918/2014 19:32:34]
    For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo         
    : OperationStopped: (server01.domain.com:String) [], PSRemotingTransportException
        + FullyQualifiedErrorId : JobFailure
        + PSComputerName       
    : server01.domain.com
    I have gone through “about_Remote_Troubleshooting Help topic”, but can’t find anything related to my issue. There is nothing in the Application or the Windows PowerShell log either.
    /Henrik

    Hi Henado 
    Check the time on your Exchange server(s) relative to the DCs and ensure they are in correct sync
    Use another account which is assigned the Organization Management permission and log to to the server run the command in shell and see the results
    Run 
    Add-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.E2010
    Set-Adserversettings -ViewEntireForest $True and then run message tracking command and see the results
    If none of the above helps you may need to remove and re-install the WinRM and see the results
    Good Luck :)
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com

  • Function call returned in ref cursor

    We have a ref cursor that calls a function in a package. When ODP.NET reads the cursor, it can't see what the function is returning. OO4O works fine, and if I take the sql that populates the ref cursor and put it into a temporary table, then select from that temporary table to return the ref cursor to ODP, it works fine. Anyone else seen this issue? Any help would be appreciated. Thanks.
    Eric Schrauth
    [email protected]

    Did you set the parameter direction to be ParameterDirection.Input when you created the parameter? Post your code.

  • "Returned mail: Message failed to pass through virus scanner"

    We have a large number of this mail (see below) on our OCS1 cause by virus like MyDoom:
    From: "Mail Delivery Subsystem" <[email protected]>
    To: [email protected]
    Mime-Version: 1.0
    Content-Type: multipart/report;
         report-type=delivery-status; BOUNDARY="----ORCL_ES6_BOUNCE_1095724----"
    Date: Fri, 22 Oct 2004 09:52:32 +0200
    Subject: Returned mail: Message failed to pass through virus scanner
    ------ORCL_ES6_BOUNCE_1095724----
    Content-Type: text/plain
    The original message was received at Fri, 22 Oct 2004 09:51:21 +0200
    from <[email protected]>
    ----- The following addresses had delivery problems -----
    <[email protected]> (unrecoverable error)
    ----- Transcript of session follows -----
    Message failed to pass through virus scanner
    ------ORCL_ES6_BOUNCE_1095724----
    content-type: message/delivery-status
    Reporting-MTA: dns; maildb.italtbs.com
    Final-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.7.7
    Diagnostic-Code: smtp; Message failed to pass through virus scanner
    ------ORCL_ES6_BOUNCE_1095724----
    Content-Type: message/rfc822
    Return-Path: <[email protected]>
    Received: from mailas.italtbs.com by maildb.italtbs.com
         with ESMTP id 10957241098431481; Fri, 22 Oct 2004 09:51:21 +0200
    Received: from italtbs.com
         by mailas.italtbs.com with SMTP id i9M7pJJ06571
         for <[email protected]>; Fri, 22 Oct 2004 09:51:19 +0200
    Message-Id: <[email protected]>
    From: [email protected]
    To: [email protected]
    Subject: Found
    Date: Fri, 22 Oct 2004 09:50:40 +0200
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_NextPart_000_0007_0000355F.0000439E"
    X-Priority: 3
    X-MSMail-Priority: Normal
    ------ORCL_ES6_BOUNCE_1095724------
    On MAILAS.italtbs.com are installed infrastructure, sendmail and Symantec Scan Engine.
    On MAILDB.italtbs.com are installed storage database and midtier.
    Can I stop this useless messagges?
    Thanks and regard
    Matteo

    Are you still unable to send email?  What client are you using?  Do you see your job represented on ePrintCenter?
    Although I am an HP employee, I am speaking for myself and not for HP

  • When i add menu bar in my user interface gives me error that this handle is not a panel handle(return value -42)

    i have 3 panels in my application and parent panel is displayed first then i display other two panels which come to the front then on entering correct password i discard the child panel and then you can see parent panel , but there is an issue when i add menu to my parent panel i dont know whats wrong when i add menu bar in my user interface (parent panel)  gives me error that this handle is not a panel handle(return value -42) for a child panel. when i dont open and display child panel then its fine , and even without menu added to my parent panel all my panels and my application works perfactly

    Hello smartprogrammer,
    some more informations are needed in order to properlu help you in this situation:
    - Are you adding menus dynamically at runtime or in the UIR editor? If dynamically: how are you loading the menu bar?
    - Are you dynamically tailoring the menu bar at runtime (adding or deleting menu items, dimming / undimming some of them or checking / unchecking)?
    - Can you post the code where you are getting the error, documenting variables and scope (local to the function, global to the source file, global to the project)?
    You can look at uirview.prj example that ships with CVI for an example of LoadMenuBar (the exampl eis in <CVI samples>\userint folder): in that project, the menu bar is shown as a context menu when you right-click on a tree element (see DeferredMenuCB callback).

  • Elom Java Console "Connect to remote host Fail"

    Hi,
    I'm accessing an elom over the https interface, which works fine, however when trying to launch the Java console, the app starts but a dialogue box appears stating "Connect to remote host Fail!", and quits when I click ok. I'm using:
    Kubuntu 9.10
    Firefox 3.5.5
    Java 1.6.0_15
    Elom firmware version 2.70
    I've also tried running against JRE 1.5, and tried saving the jnlp file and running that directly from javaws, all attempts produce the same result. I am able to connect to port 8890 from my machine. An strace seems to suggest that it sends and receives from port 8890 but then gets a Connection reset by peer.
    Furthermore I've also tried running it through localhost using an ssh tunnel to the elom, again, same result.
    I've now run out of ideas of what could be causing this issue, any help would be greatly appreciated.
    TIA
    Regards
    Craig

    SOLVED
    FYI, I downloaded the debian package of libstdc++5 from http://ftp.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_i386.deb
    After installing that on Kubuntu, the console works fine.

Maybe you are looking for