Failover for a stateful session EJB on a two node cluster results in java.io.StreamCorrupedException

          Stateful session EJB is deployed on cluster members A and B. Client calls a method
          on the bean and the request is routed to server A, then A is shut down. The client's
          next method invocation is routed to server B where the bean's state has been replicated.
          Server A re-joins the cluster and B is shut down, the request routed to A results
          in the following:
          java.rmi.NoSuchObjectException: Activation failed with: java.io.StreamCorruptedException:
          InputStream does not contain a serialized object
          at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:849)
          at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
          at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:33)
          at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:43)
          at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:54)
          at weblogic.ejb20.swap.PassivationUtils.read(PassivationUtils.java:50)
          at weblogic.ejb20.swap.ReplicatedMemorySwap.read(ReplicatedMemorySwap.java:111)
          at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:178)
          at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:236)
          at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:113)
          at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:148)
          at com.access360.enrole.apps.ejb.organization.SearchManagerBeanEOImpl.findAllPeople(SearchManagerBeanEOImpl.java:644)
          at com.access360.enrole.webclient.organization.person.PeopleList.getPeople(PeopleList.java:148)
          at com.access360.enrole.webclient.organization.person.PeopleListServlet.constructPeopleListXML(PeopleListServlet.java:284)
          at com.access360.enrole.webclient.organization.person.PeopleListServlet.service(PeopleListServlet.java:238)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
          at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:275)
          at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:183)
          at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.forwardToPeopleList(SubmitPersonAddServlet.java:134)
          at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.service(SubmitPersonAddServlet.java:114)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
          at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
          at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          We are certain that the EJB's entire object graph is Serializable. Any comments on
          this failover scenario?
          Alex Rodriguez
          Software Engineer, Access360
          [email protected]
          

          Rajesh,
          Thanks for the reply. We are running WL 6.0 SP2 with RP3. We cannot reproduce it
          consistently. In your reply you mention "... and EJB handles". Does that refer to
          another patch?
          As for the code, we will run tests with a scaled down version of the stateful bean
          and a simple client servlet. I will post the code asap. The high level call sequence
          is: servlet service() -> lookup ejb home -> get cluster aware stub from home -> put
          bean handle in http session -> call bean method -> server A goes down -> next call
          to the bean -> get handle from replicated http session -> get bean from handle ->
          request is routed to server B. java.io.StreamCorruptedException is thrown, sometimes,
          when server A re-joins the cluster and a request is routed to it (i.e. server B is
          shut-down). One thing I did not mention is that the bean is deployed on server A,
          and server A is also the Admin server. We are considering not using the Admin server
          to deploy the bean, however, but will add another Managed server.
          Will contact support about CR073917: can it be applied to WL 6.0 SP3 with RP3?
          Regards,
          Alex J. Rodriguez
          Rajesh Mirchandani <[email protected]> wrote:
          >
          >Alex,
          >
          >Are you able to consitently reproduce this? Could you post your code here?
          >
          >What version of the Server with Service pack are you using?
          >
          >If you are using WLS 6.1SP2 and EJB handles contact support and get a patch
          >for CR073917.
          >
          >
          >"Alex J. Rodriguez" wrote:
          >
          >> Stateful session EJB is deployed on cluster members A and B. Client calls
          >a method
          >> on the bean and the request is routed to server A, then A is shut down.
          >The client's
          >> next method invocation is routed to server B where the bean's state has
          >been replicated.
          >> Server A re-joins the cluster and B is shut down, the request routed to
          >A results
          >> in the following:
          >>
          >> java.rmi.NoSuchObjectException: Activation failed with: java.io.StreamCorruptedException:
          >> InputStream does not contain a serialized object
          >> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:849)
          >> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
          >> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:33)
          >> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:43)
          >> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:54)
          >> at weblogic.ejb20.swap.PassivationUtils.read(PassivationUtils.java:50)
          >> at weblogic.ejb20.swap.ReplicatedMemorySwap.read(ReplicatedMemorySwap.java:111)
          >> at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:178)
          >> at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:236)
          >> at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:113)
          >> at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:148)
          >> at com.access360.enrole.apps.ejb.organization.SearchManagerBeanEOImpl.findAllPeople(SearchManagerBeanEOImpl.java:644)
          >> at com.access360.enrole.webclient.organization.person.PeopleList.getPeople(PeopleList.java:148)
          >> at com.access360.enrole.webclient.organization.person.PeopleListServlet.constructPeopleListXML(PeopleListServlet.java:284)
          >> at com.access360.enrole.webclient.organization.person.PeopleListServlet.service(PeopleListServlet.java:238)
          >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
          >> at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:275)
          >> at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:183)
          >> at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.forwardToPeopleList(SubmitPersonAddServlet.java:134)
          >> at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.service(SubmitPersonAddServlet.java:114)
          >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
          >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
          >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
          >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          >>
          >> We are certain that the EJB's entire object graph is Serializable. Any
          >comments on
          >> this failover scenario?
          >>
          >> Alex Rodriguez
          >> Software Engineer, Access360
          >> [email protected]
          >
          

Similar Messages

  • Web Service-Client for stateful session EJB container

    Do you know, how to write a Web Service-Client to connect a stateful session EJB container?
    A stateful session EJB container ist created with Web Logic 8.1.
    Message was edited by n.t.c at Dec 14, 2004 6:09 AM

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • OC4J, Stateful Session EJB, & Session Timeout

    In my J2EE applications, I have a user authentication layer whereby when the user is authenticated against our LDAP repository after logging in, a Stateful Session EJB keeps that conversational state with the client at all times until the user logs out whereby the session is invalidated. This way I keep track of the user's authentication at all times throughout the whole session and for every operation performed (JSPs etc) by the user during the session. All this works fine through my implementation of the Session Facade and Business Delegate patterns.
    However, if OC4J times out the Session (set to one hour in the <session-config> <session-timeout> parameter of the web.xml), the user cannot re-login and proceed. The user has to close the whole browser and re-start a new browser, then login and proceed.
    This is causing us a few problems with the users who are complaining about having to do so. Is there an easy way around this problem?
    Regards
    Daniel

    Can you try in a different browser and see whether you can duplicate this ?
    Is this a problem with browser - cache ?
    regards
    debu

  • Problem using application client for local stateful session bean

    Hi,
    I have deployed a local stateful session bean in Sun J2EE 1.4 application server.
    On running the applclient for the stateful session bean application client i get the following error:
    Warning: ACC006: No application client descriptor defined for: [null]
    cant we use application client for local stateful session beans. becoz the application runs smoothly when i changed the stateful sesion bean to remote.

    Hi,
    No, an ejb that exposes a local view can only be accessed by an ejb or web component packaged within the same application. Parameters and return values for invocations through the ejb local view are passed by reference instead of by value. That can't work for an application client since it's running in a separate JVM.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Stateful session ejb life

    Hello,
    If I have a stateful session ejb used in a web application, what determines how long that ejb will stay alive or remain available? Specifically, if a user has a session and that user accesses the ejb, then there is a period of inactivity, yet the session remains open, does the ejb hang around? What controls this? I'm using WebSphere 6 as my application server.
    Thanks,
    -jeff

    There are 4 situations to consider....
    1) If client calls remove(), then stateful session bean is killed.
    2) If the resources are going low on the computer then the container can decide to passivate the bean.
    3) If there is a time out for the stateful session bean then
    3.1) If bean is in in ready state then the container can take a decision to kill the bean ...
    3.2) If the bean is in passivated state then also the container can kill the bean but this time with out calling ejbRemove().
    4) If the bean throws a system unchehecked exception then also it kills the bean.
    Message was edited by:
    Waves
    Message was edited by:
    Waves

  • How a stateful session ejb  invoke an entity ejb

    i have write a stateful session ejb and an entity ejb
    i want to invoke the method of the entity ejb in the session ejb.
    Do they should in the save package,and archive to a jar package?
    Thanks:)

    the choice is yours
    It not necessary that they shoule be in the same package
    Work both ways
    You make a call to it in the same way as you call it from a client
    i.e. to say that an EJB can invoke another in the same way as a client invoke it...make the home object et.al
    Regards
    Sanjay

  • Do I need 3 machines for Sun Two-Node Cluster HA for Apache?

    The vendor is trying to set up a Sun Cluster HA for Apache and said it requires a dedicated machine
    for monitoring purpose(The Sun Cluster HA for Apache probe??). Is this monitoring machine mandatory and have to be dedicated for that purpose? And can I use 1 machine to monitor more than 1 cluster? Because the vendor requires 2 extra machine to monitor 2 set of 2-node cluster..and the document I read from Sun only mentions the 3rd machine is required for admin console.
    Also, if I only have 2 node cluster, can I configure Apache as a scalable + failover service at the same time or I have to choose either one? Thanks!!

    Incorrect. You can set up a Solaris Cluster on a single node if you wish although two nodes give you redundancy. The probe for Apache runs from the node on which Apache is executing.
    If you have a two node cluster you could have multiple implementations of Apache: fail-over and scalable. You can mix them until you run out of resources: CPU, networking bandwidth, IP addresses, etc.
    Tim
    ---

  • Stateful Session Bean accesed by two JSPs.

    Hi there,
    We are having quite an issue; we have an application that stores session
    state in an stateful session bean. And we have noticed some parts of the
    application create a situation where is possible that two frames -and so two
    jsp- access the session bean at the same time. And, of course, it´s going to
    be the same instance of the session bean..... what will be the behaviour in
    this case?. Will the requests be serialized, an exception will be thrown or
    the EJB will be destroyed?. Not very sure of what would happen. I suppose
    there could be some problems with this-. I would appreciate any help.
    Many thanks. Best regards.

    Hrm. EJB spec is quite clear on what will happen (RemoteException thrown) if
    the second client attempts to use Stateful Session bean which is already in
    use (and the bean will not be destroyed - container will simply throw an
    exception after failing to acquire a lock on the bean instance without waiting
    (allow-concurrent-calls option in WebLogic allows client call to wait to acquire
    lock - this was probably added as a convinience feature for applications which
    use frames)).
    So, normally your application has to ensure that no 2 clients are able to use
    the same stateful session bean concurrently, or use allow-concurrent-calls option,
    which will do that for you, but the application will become non portable.
    Dimitri
    PS: Thanks. Maine Coon cats are the best. Ours is a 22-pound giant ;-)
    Pinklon Thomas <[email protected]> wrote:
    Hi Dimitri,
    Thnaks a lot for the help:one thing that I do not know if it´s an issue is
    that calls come from different JSPs; the strategy I have seen in another Web
    application servers is trying to activate the EJB in the middle of another
    transaction... In this situation, the container cannot activate the EJB,
    roolback the transaction and destroys the EJB.... Would Weblogic feature
    avoid this?. I will investigate on my part....
    Many many thnaks. Nice cats.
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]...
    In 6.1 you can set allow-concurrent-calls to true in this situation:
    <!--
    The allow-concurrent-calls specifies whether a stateful session bean
    instance will allow concurrent method calls. The value of this
    element may be either "True" or "False". The default value is
    "False". When a stateful session bean instance is currently in a
    method call and another (concurrent) method call arrives on the
    server, the EJB specification requires that the server throw a
    RemoteException. By default, allow-concurrent-calls is false, and the
    EJB container will follow the EJB specification. When this value is
    set to true, the EJB container will block the concurrent method call
    and allow it to proceed when the previous call has completed.
    Used in: stateful-session-descriptor
    -->
    Pinklon Thomas <[email protected]> wrote:
    Hi there,
    We are having quite an issue; we have an application that stores
    session
    state in an stateful session bean. And we have noticed some parts of the
    application create a situation where is possible that two frames -and sotwo
    jsp- access the session bean at the same time. And, of course, it´sgoing to
    be the same instance of the session bean..... what will be the behaviourin
    this case?. Will the requests be serialized, an exception will be thrownor
    the EJB will be destroyed?. Not very sure of what would happen. Isuppose
    there could be some problems with this-. I would appreciate any help.
    Many thanks. Best regards.--
    Dimitri

  • Can fiber channel be used for connect server to a storage in two nodes RAC

    I decided to have an Oracle RAC cluster with only two nodes.
    The storage I have is a sun 3510FC. Also have five fiber chanal ports. But my each server (Sunfire v240) has got one Ultra160SCSI multimode (SE/LVD) not any fiber chanal ports. I found that there is some FC card available to use but none fiber switch available. I want to install this FC cards to the servers and make a straight connection with fibre cable to the storage. Can this be asolution or do i have to have a fibre switch?

    Hi
    Irrespective of whether such a configuration is supported or not by Oracle.
    Has anybody got 10gR2 RAC working on
    a. 2 servers
    b. shared storage with HBA and fibre channel cables
    c. interconnect on LAN
    (yes we know it is not supported by Oracle...but again we are not going production on that....just for demo/training purposes)
    No FC switch
    No ethernet switch
    If anybody has got this working would be great to hear of 'issues to guard against'
    Thanks

  • In-Place Migration for a Two Node Cluster

    Hi
    Just after some advice. I am working with a 2 node failover cluster with shared storage (SAN) and have several VM’s running. Currently running on the nodes is Server 2008 R2 and they need to be upgraded to Server 2012 so I can take advantage of HyperV Replica
    I have found the following article that guides us through the process however, this is all done through Failover Cluster Manager
    http://technet.microsoft.com/en-us/library/dn530785.aspx#BKMK_CreateNewCluster
    As I have Virtual Machine Manager installed and working fine on the Cluster, can this be accomplished using that instead as from my understanding, VMM just sends Powershell commands to FCM.
    What would you recommend?
    Thanks

    This is done directly in FCM, not in VMM.
    If you had a 2012 R2 host managed by VMM, you could use VMM to export/import VMs to this node, and then add the other nodes (after installing 2012 R2 on them) to create a cluster. 
    -kn
    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )

  • Session ejb 3.0 stateful and same instance

    Hello,
    I'm using OC4J 10.1.3.3 and EJB 3.0/JSP
    In a jsp I do two different lookup for a STATEFUL
    session ejb 3.0, and I want two different instances
    of the ejb, instead I get the same one...
    Please help. Thanks.

    Hi,
    The code for stateful is perfectly fine and working in a normal way. The way you are trying to implement the stateful session bean in your application is wrong.
    think of binding the stateful session bean with HttpSession object.
    So that you will get a unique stateful session bean object.

  • Servicegen for stateless session EJB

    I've run into some minor trouble when I tried to generate
    web services for some stateless session EJBs with the
    servicegen Ant method. Note that expandMethods has been
    set to True. It appears that the generated web-services.xml
    file contains methods from the EJB's remote interface. When
    deploying the web service WLS will use the locale interface.
    If the remote interface has methods not found in the local
    interface WLS will refuse to deploy the web service. No big
    deal, since I could just add the missing methods to the
    local interface. But still, I think this is somewhat odd
    and inconsistent behavior. Is there anyway to get WLS to
    deploy the web services against the remote interfaces, or
    is this just a bad idea?
    /Björn

    Further information:
    According to metalink bug 3224465, this was a bug fixed in release 9.0.2.3.99 of the App Server. However, I am using 9.0.3.1 and still have the problem....

  • Stateful session local ejb problem

    Hi,
    I'm having problems with a stateful session ejb, which i am accessing using the local interface from a servlet. I get the local object and insert it in the session and retrieve it from the session in the following requests to this servlet.
    My questions are:
    Should local interfaces be used from servlets?, in the servlet descriptor you can use the <ejb-local-ref> to do this and it works.
    And if they can be used from servlets, what do i save in the session to preserve the ejb between requests?.
    Thanks
    Juan

    Hi,
    I'm having problems with a stateful session ejb, which i am accessing using the local interface from a servlet. I get the local object and insert it in the session and retrieve it from the session in the following requests to this servlet.
    My questions are:
    Should local interfaces be used from servlets?, in the servlet descriptor you can use the <ejb-local-ref> to do this and it works.
    And if they can be used from servlets, what do i save in the session to preserve the ejb between requests?.
    Thanks
    Juan

  • Metadata  for Session EJB whose  public interface extends EJBLocalHome?

    I would like to get meta data information for a local Session EJB implemented using
    EJBLocalHome and EJBLocalObject instead of EJBHome and EJBObject respectively.
    1. Is this possible, since EJBLocalHome do not define the method getEJBMetaData()
    that EJBHome does?
    2. Is there a way to get the meta data information for such local EJBs in WebLogic
    using any other mechanism?
    Thanks in advance & Regards,
    Sudhrity

    Hi Sitaro,
    Please refer to the following links... you will get information about how to lookup Local EJB3...
    http://jaysensharma.wordpress.com/ejbs_weblogic/
    http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/
    Here you will get the information of Customizing The JNDI name and to look them up.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com/  (WebLogic Wonders Are Here)

  • Cluster and Session EJB replication

              I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and Servlets.
              The Servlets do look ups for session EJBs, which are hosted on a separate box behind
              a firewall. My question is:
              If I implement clustering of the JSP/Servlet Weblogic Instance so that I have four machines in a cluster,
              does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub only so that in case server 1 crashes,
              Server 2 will be able to retrieve a handle to the session EJBs?
              Thanks,
              Paul Richardson
              

    If the handle is in the HttpSession, then the handle will be replicated. If
              the EJB server fails over in WL 5.1, the stateful session EJBs will be lost.
              WL 6.0 supports statefull session EJB replication for failover, but I
              suggest that you not use it unless you have a specific architectural reason
              to.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Paul Richardson" <[email protected]> wrote in message
              news:[email protected]..
              >
              > I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and
              Servlets.
              > The Servlets do look ups for session EJBs, which are hosted on a separate
              box behind
              > a firewall. My question is:
              >
              > If I implement clustering of the JSP/Servlet Weblogic Instance so that I
              have four machines in a cluster,
              > does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub
              only so that in case server 1 crashes,
              > Server 2 will be able to retrieve a handle to the session EJBs?
              >
              >
              > Thanks,
              > Paul Richardson
              

Maybe you are looking for

  • "Media kind" metadata not saved in file

    This has been noted in other threads, but I am wondering whether it is simply an iTunes bug, or whether there really isn't an ID3 tag associated with Media Kind. Are there any third-party tools that can modify this tag (and that iTunes will read on i

  • System Message "Multiple reports views are not permitted"

    Hi All, followed previous thread with this error but didn't seem to get anywhere, so thought I'd raise a separate Thread. I'm designing a crystal report in Crystal Reports Developer Edition XI and trying to view the report with the addon in 2007A PL4

  • Photo Sharing App

    Our company has 70 sites.  What I am looking for is an app that would allow for mulitple employees to upload photo's from their iPhones to the app and also let each of us the ability to view using one password and username.  Our goal is to upload ima

  • HT5278 1st generation ipad update

    when will apple put an update out for 1st generation ipads??  Until then most apps will not work anymore etc. 

  • Auto charged money from my account when i"m not buy anything??

    HI Apple, Please double check for me why Itunes auto charged money from my account? when I didn't buy any thing from last 2 day? I think that wrong,because i never buy music from itunes. If every day I check my account form bank see my money all gone