Using SQLJ in Session EJB  (WebLogic 6.1) - connection giving ClassCastError

Hi All
I have one SQLJ file which i have translated to a .java file and , its contents ( methods) have ben pasted in a Session bean , which is deployed in Weblogic 6.1 App Server .
Now in Session bean i am using the jndi lookup of my datasource in Weblogic and creating a conection to the database .
with this connection the normal jdbc methods connects to the databse , but the sqlj method gives a class cast error when i try to allocate the Connection Object to the DefaultContext .
*********************** CODE SNIP ********************
new sqlj.runtime.ref.DefaultContext m_dx = new sqlj.runtime.ref.DefaultContext(conn);
sqlj.runtime.ref.DefaultContext.setDefaultContext(m_dx);
"conn"is the jndi dsn's
DataSourse.getConnection ();
/*In the Method */
sqlj.runtime.ConnectionContext __sJT_connCtx = sqlj.runtime.ref.DefaultContext.getDefaultContext();
the bean compiles , and is deployed sucessfully , and after lookup the conn and m_dx objects are created sucessfully , but when the sqlj method runs it gives a class cast exception .
java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection
Is it that Weblogic will not support SQLJ translated code ?
Please help me out , Will i be able to use the Good features of SQLJ in my EJB beans to be Deployed in Weblogic 6.1 Application Server .
Thanks

Hi Nicolas,
Have you tried to turn on testOnReserve setting of the coneection pool?
Regards,
"Nicolas Devos" <[email protected]> wrote in message
news:3c5fa916$[email protected]..
>
Hi,
I am using weblogic 6.1 and oracle 8.1.6, and experiences
problems with connections pools and database crash.
When the database server crashes during an EJB transactions,
the connection used by that transaction seems to be lost and
is never rebuilt when the database server restarts, therefore
the number of connections within the pool shrinks thoroughly
if I have several connections used while the database crashes
or is shutdown for maintenance.
If this db crash takes time to recover, all connections
are destroyed and the pool become unusable.
As soon as all connections have been 'destroyed' I have
the following exception:
'connection pool - none available' when trying to get
a connection.
When I restart the database server, the pool does not rebuilt
itself.
(I am using a test table to test the presence of the database
with a frequency set to 60s)
I did the same operation without EJB transactions and the pool
could rebuilt itself after the database has been restarted.
I had that problem with weblogic 6.0 already and in the
release notes of 6.0_sp2, 2 issues are fixed concerning
the pool fail-over: 044223 and 041793.
I would like to know if these issues are fixed in 6.1 as well,
and if they are related to my problem (Their description is
quite short).
Thank you
Nicolas

Similar Messages

  • Unable to use SQLJ OCI driver in weblogic 5.1

    Hi,I am trying to use SQLJ OCI driver instead of JDriver on solaries but always get an error "java.sql.SQLException: Error while trying to retrieve text for error ORA-12545" when connection pool is being created.The same works fine if I use JDriver.Moreover when I try with a standalone application which loads SQLJ OCI Driver it also works fine. Is there anything to be done/added in weblogic properties file or startWeblogic.sh for this to work on solaries? ORACLE_HOME is set properly! if not JDRIVER would have thrown the same error!!On NT it works great!!

    To us, a JDBC driver is just a JDBC driver provided that it is JDBC complaint. Make sure that you have the ORACLE_HOME set to point to the base directory where the Oracle client is installed and LD_LIBRARY_PATH includes the $ORACLE_HOME/lib directory. If this still doesn't help, can you post the relevant section of the weblogic.properties file and the complete error message including the stack trace?
    Samprathi wrote:
    Hi,I am trying to use SQLJ OCI driver instead of JDriver on solaries but always get an error "java.sql.SQLException: Error while trying to retrieve text for error ORA-12545" when connection pool is being created.The same works fine if I use JDriver.Moreover when I try with a standalone application which loads SQLJ OCI Driver it also works fine. Is there anything to be done/added in weblogic properties file or startWeblogic.sh for this to work on solaries? ORACLE_HOME is set properly! if not JDRIVER would have thrown the same error!!On NT it works great!!

  • Stateless Session EJB hangs using URLConnection but WLS doesn't clean up

    Hi
    We have a stateless session EJB running under WLS 5.1 with service
    pack 10 on Solaris.
    The bean calls a remote HTTP server using the java.net.URLConnection
    class and forwards the response to the EJB client. The bean is largely
    working fine but some threads hang waiting on the HTTP response. Debug
    statements, which are written immediately after the response has been
    read and the connection has been closed, do not appear in our log for
    the hung threads. The WebLogic Console displays these threads as "in
    use" and a "netstat -an" displays the tcp connections as ESTABLISHED.
    However, the access logs of the remote Apache server show the HTTP
    connections of the threads in question completed successfully with
    HTTP code 200. The Apache server is using keep-alive connections.
    Some EJB threads are still waiting for something it seems.
    Has anyody else experienced this when using URLConnection from
    stateless session EJBs under WLS?
    The second problem is why doesn't WLS time these threads out after
    trans-timeout-seconds (we're using the default of 300 seconds)? The
    WLS log shows no error messages relating to this problem.
    I'm grateful for any info offered.
    Thanks in advance
    Steve

    If you suspect that WLS protocol handler is at fault (and quite often it is),
    one thing to try is (if you use Sun's JVM) to use Sun's HTTP protocol handler
    instead of WLS (the most common symptom is when code which makes HTTP requests
    works fine outside of WebLogic and you have problems getting it to work inside
    WebLogic) :
    replace
    URL url = new URL("http://...");
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    with
    URL url = new URL(null, "http://...", new sun.net.www.protocol.http.Handler());
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    You will have to edit weblogic.policy to allow your code to specify protocol
    handler.
    Also note that transaction timeout is only checked on method boundaries, or
    when your code attempts to do something with the database - it is not going to
    interrupt thread which is waiting for HTTP response.
    Steve Lock <[email protected]> wrote:
    Hi
    Thanks for the info. The remote HTTP server's access log shows that
    the requests were successfully processed. Doesn't this mean that the
    connection is then closed? I know the web server is using keep-alive
    connections but I thought this was transparent to the client...?
    Also why doesn't WLS remove the hung threads?
    Steve
    "Ignacio G. Dupont" <[email protected]> wrote in message news:<[email protected]>...
    We have had a problem like yours with Weblogic 6.1 SP2 on Linux
    The problem is sun's implementation of the HTTP connections doesn't have a
    timeout, so if the other peer doesn't close the connection your threads will
    be "locked" on the connection.
    We have found searching the web that the Jakarta project has a package
    called Jakarta commons that implements HTTP connections with an
    setSoTimeout(int timeout) method so you can open the connections with your
    desired timeout. You have to download the code from the CVS as the released
    version doesn't support the timedout sockets yet.
    When support for the JDK 1.4 version will be announced by Bea you could use
    one of its new features that will allow you to pass arguments to the JVM to
    specify the maximum socket connection stablising timeout and the max
    inactivity on the socket too.
    Hope it helps you.
    Dimitri

  • Using external util JAR from Session EJB

    I have a Stateless Session EJB that uses some classes packaged in a utility jar. How do I package the EJB jar with this util jar, and get the app server to recognize this utility jar? including a /lib dir with the utils jar in it, like you would with a WAR, doesn't work.
    I've temporarily got this to work by modifying the startup scripts for my app server to ensure my jar is included in the -classpath arg, but this cannot be the intended way. (cannot find details on this in the tutorial).
    Thanks in advance!

    Well, the answer depends a lot on which appserver you're using, because it obviously depends on how the vendor implemented the containers' ClassLoaders. What usually works is dependent upon a portion of the JVM spec regarding the MANIFEST.MF file. If you package your ejb.jar and library.jar in an .ear file, you can put the following in the ejb.jar MANIFEST.MF:
    ClassPath: library.jarNote that there must be at least one blank line at the end of the MANIFEST.MF file.
    This works on WebLogic, but, as an example, JBoss uses a single ClassLoader, so I'm not entirely sure how you'd go about the same thing there.
    And you're quite right - putting it in the JVM ClassPath is not a good idea...

  • Re: User Session using ServletSession and Stateful EJB in Cluster

              Sorry , I didn't use WLS 6.0, we use wls 5.1 in production.
              But in Wls 6.0, in some situations , the state of the stateful session bean can be lost. So it's not so reliable. You have to deal with it in the client code. Instead, servlet is a reliable solution.
              In order to test under wls6.0, you can store the handle of the EJBObject in the HttpSession, not in jndi, cos if the instance fails, all its objects will be removed by remaining instances from jndi. In another instance, you get the handle, and try to get the EJBObject.
              In wls5.1, some information like the server url must be embeded inside the handle. But in wls6.0, I don't know how they deal with it.
              I am looking forward to your results
              "Anuj Soni" <[email protected]> wrote:
              >
              >What kind of clustering problems you had with WL6.0 for Stateful session beans ? It will be helpful for me to know before hand.
              >
              >BTW, how were you able to test stateful session beans in a cluster under WL6.0 i.e. were you storing the Handle or EJBObject in HttpSession or did you store it in JNDI ?
              >
              >Thanks,
              >
              >Anuj
              >"Tao Zhang" <[email protected]> wrote:
              >>Although it's very advanced to take advantage of both http session and
              >>stateful session bean replication, but if you rely on the stateful session
              >>bean's state, you will be in trouble. Because the support of stateful
              >>session bean's replication is not perfect in wls6.0. We already chaned
              >>almost all stateful session beans into servlets or entity beans.
              >>
              >>I am not sure about the handle of the EJBObject. I think it should be able
              >>to reconstruct for us otherwise we can't use the handle any more.
              >>
              >>You can do a test. BTW, could you tell me the result?
              >>
              >>Thanks.
              >>
              >>Anuj Soni <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> Hi,
              >>>
              >>> I am designing the workflow for my web application using a Stateful
              >>session bean. As Weblogic 6.0 supports clustering of stateful session bean
              >>and HttpSession(in-memory replication), I want to use the combination of
              >>both techniques to provide load-balancing and fail-over safety for user
              >>sessions and their corresponding workflows.
              >>>
              >>> The question I have is that, Is Handle obtained using
              >>EJBObject.getHandle(), fail-over safe (for a clusterable stateful bean), so
              >>that I can reconstruct the reference to EJBObject on the secondary server
              >>incase of primary server crash.
              >>>
              >>> My understanding is that I should store Handle in the HttpSession as it is
              >>Serializable not the EJBObject. The weblogic 6.0 document only talks about
              >>the replica-awareness of EJBObject.
              >>>
              >>> If my above assumption is incorrect, Can you tell me how else I can
              >>achieve my goal ?
              >>>
              >>> Thanks in advance.
              >>>
              >>> Anuj Soni
              >>
              >>
              >
              

    Any one tested this scenario yet? i.e: storing the handle to an EJB object and then trying to re-use after the HttpSession is restored?
              Thanks.
              

  • Error during deployment of stateless session EJB using EJB 3.0

    having trouble deploying a stateless session bean to app server 10.1.3.1 oc4j container.
    deceided to go through oracles demo: How-To Develop a Stateless Session EJB using EJB 3.0 (http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-stateless-ejb/doc/how-to-ejb30-stateless-ejb.html).
    the demo encounters the same issue. so i assume there is something wrong with the app server set up, and not my source code.
    here is the deployment log:
    [Jul 1, 2009 11:59:25 AM] Application Deployer for test_ws STARTS.
    [Jul 1, 2009 11:59:25 AM] Copy the archive to C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear begins...
    [Jul 1, 2009 11:59:25 AM] Unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Done unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear ends...
    [Jul 1, 2009 11:59:25 AM] Starting application : test_ws
    [Jul 1, 2009 11:59:25 AM] Initializing ClassLoader(s)
    [Jul 1, 2009 11:59:25 AM] Initializing EJB container
    [Jul 1, 2009 11:59:25 AM] Loading connector(s)
    [Jul 1, 2009 11:59:26 AM] Starting up resource adapters
    [Jul 1, 2009 11:59:26 AM] Processing EJB module: ejb30ws-ejb.jar
    [Jul 1, 2009 11:59:26 AM] application : test_ws is in failed state
    [Jul 1, 2009 11:59:26 AM] Operation failed with error: java.lang.NoClassDefFoundError
    the opmn log reveals the same error, but no more detail.
    any ideas???
    /stuck

    I am having exactly the same issue. Was this issue resolved? If so, please share the resolution and if not can someone please suggest what could be wrong.
    Thanks

  • Defining Business Operations using remote session EJBs for WLI2.1

    Hello all,
    I'm having a deployment issue with WLI 2.1. Is it true that in order to define
    a Business Operation in WLI 2.1 that uses a session EJB, the EJB MUST be deployed
    in the same JNDI tree (WLS instance) that WLI is running on? Is everyone just
    running one admin server that hosts WLI and all other applications on the same
    instance?
    I'd like to have WLI running on one machine and have my applications running on
    another, but at this point seems unobtainable because you cant supply a t3 URL
    to that separate machine when defining Business Operations...
    Any help would be appreciated,
    Jon

    I am new to WLPI and have run across this problem as well. Could you
    provide more detail your proxy session bean and maybe include some
    example code? Thanks.
    Regards,
    Rick H.
    "Paul Rooney" <[email protected]> wrote:
    >
    I have come accross the same problem - solved it by using a "proxy" session
    bean
    that knows how to call out to all the Remote EJBS that I need. This "proxy"
    session
    bean is deployed with wlpi application.
    "Erik Godding Boye" <[email protected]> wrote:
    We would like to define business operations in WLI calling EJBs on a
    remote machine.
    It seems like the EJB have to be deployed locally to appear in the (JNDI)
    drop-down
    list when defining the business operation.
    Is the only way to achieve this functionality to write (or generate)
    some kind
    of wrapper EJB that will be deployed locally, or do you have other suggestions?
    Regards,
    E
    PS: We're using WLI 2.1 running on WLS 6.1 SP1

  • Deploying the SQLJ files used by the Rentals EJB

    In a previous section of the documentation for acmevideo demo, we
    address the issue of deployment of the Rentals EJB. This contains
    the rentals.sqlj file.
    Due to an issue with the current versio of Oracle 8i(8.1.5), a
    workaround must be deployed to explicitly deploy the *.ser file
    used by the Rentals EJB to the Oracle 8i database. (I don't know
    or understand what the issue is - can someone explain ?)
    Anyway, I am using Oracles suggested workaround and the
    deployment fails.
    Here is the text:
    *** Invoking the Oracle JDeveloper deployment utility ***
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    Writing archive...done
    *** Invoking the Oracle8i deployment utility ***
    interrupted by user
    <The dialog in JDeveloper displays>:
    Cannot load java classes into database
    Any suggestions or tips how to get this working ?
    Regards,
    Mark Battersby
    null

    Mark,
    I had the same problem. Have you increased your Java_pool and
    your shared pool? That and having the right classpath/path
    helped. Also, I think that there are some SQL prep scripts that
    need to be run.
    Todd Kromann
    mark tomlinson (guest) wrote:
    : You might try using the command line version of the deployejb
    : tool and see if you can get a more verbose error message
    : (Jdeveloper might be 'eating' the errors coming back). I have
    : seen that happen when the loadjava portion of deployment would
    : fail (i.e. not getting back an error).
    null

  • Deploying session Ejbs 1.1 in Weblogic 6

    I am deploying a session EJB 1.1 in Weblogic 6.0, this ejb contains a class that it connects to a JMS queue, this works perfectly in weblogic 5.1 but when I try to deploying in weblogic 6.1 the exception weblogic.rmi.extensions.UnknownHostIDException arises. I'd checked the weblogic.jar file, in fact this file do not contain that class, why should I do to deploy my EJB in weblogic 6.1?

    Alex,
    Are you experiencing the problem on 6.1 or 6.0? Your posting is confusing regarding which version of the server you are trying to deploy the bean on. Have you rebuilt the ejb, or are you trying to deploy the bean directly without rebuilding it from 5.1?
    Glenn Dougherty
    Developer Relations Engineer
    BEA Support
    Alex wrote:
    I am deploying a session EJB 1.1 in Weblogic 6.0, this ejb contains a class that it connects to a JMS queue, this works perfectly in weblogic 5.1 but when I try to deploying in weblogic 6.1 the exception weblogic.rmi.extensions.UnknownHostIDException arises. I'd checked the weblogic.jar file, in fact this file do not contain that class, why should I do to deploy my EJB in weblogic 6.1?

  • Weblogic-ejb-jar.xml for a Session EJB

    The weblogic-ejb-jar.xml generated for a Session EJB with local interfaces has a jndi-name element instead of local-jndi-name.
    1. Create a Session EJB.
    Select Include Local Interfaces.
    2. In the META-INF directory select New>General>Deployment Descriptors>weblogic-ejb-jar.xml
    The deployment descriptor generated has a jndi-name element.
    For a Session EJB with local interfaces the element should be local-jndi-name.
    thanks,
    Deepak

    weblogic-ejb-jar.xml jndi-name (instead of local-jndi-name) is with JDeveloper version 10.1.2 & 10.1.3

  • RollbackException using UserTransaction when calling EJB in separate server

    I'm using WL 6.1 on Solaris and am calling a stateless session EJB that
              is running in a separate server. I'm looking up the remote EJB using
              JNDI and calling through it's home interface. This works fine but if
              the client code begins a UserTransaction, then calls the EJB that's in
              the separate server, and then calls commit on the transaction, I get the
              following:
              weblogic.transaction.RollbackException: Aborting prepare because some
              resources could not be assigned - with nested exception:
              [javax.transaction.SystemException: Aborting prepare because some
              resources could not be assigned]
              The code that works looks like:
              rgData =
              HomeHolder.ROUTING_GUIDE_MGR_HOME.create().getResourceOptions(qd);
              whereas the code that fails is:
              UserTransaction transaction = new UserTransaction();
              transaction.begin();
              rgData =
              HomeHolder.ROUTING_GUIDE_MGR_HOME.create().getResourceOptions(qd);
              transaction.commit();
              If I put the EJB in the same server as the client, I don't get the
              exception so it seems to be related to running it in the separate server
              and using the UserTransaction. The deployment descriptor of the EJB
              states that it "Supports" transactions.
              Any ideas?
              Thanks,
              John
              

    Yes, actually we are using:
              AppServerTransaction transaction = new AppServerTransaction();
              which is a wrapper which does what you say:
              Context ctx = new InitialContext(...); // connect to another WLS
              UserTransaction tx = (UserTransaction)ctx.lookup("java:comp/UserTransaction");
              and our HomeHolder does what you say as well:
              Homexxx home = ctx.lookup(...);
              Any ideas why surrounding the EJB call by a UserTransaction causes a problem when
              committing?
              Thanks,
              John
              Dimitri Rakitine wrote:
              > John Hanna <[email protected]> wrote:
              > > I'm using WL 6.1 on Solaris and am calling a stateless session EJB that
              > > is running in a separate server. I'm looking up the remote EJB using
              > > JNDI and calling through it's home interface. This works fine but if
              > > the client code begins a UserTransaction, then calls the EJB that's in
              > > the separate server, and then calls commit on the transaction, I get the
              > > following:
              >
              > > weblogic.transaction.RollbackException: Aborting prepare because some
              > > resources could not be assigned - with nested exception:
              > > [javax.transaction.SystemException: Aborting prepare because some
              > > resources could not be assigned]
              >
              > > The code that works looks like:
              >
              > > rgData =
              > > HomeHolder.ROUTING_GUIDE_MGR_HOME.create().getResourceOptions(qd);
              >
              > > whereas the code that fails is:
              >
              > > UserTransaction transaction = new UserTransaction();
              >
              > It's an interface, how did this work? Assuming that you do not want
              > distributed tx, does this work:
              >
              > Context ctx = new InitialContext(...); // connect to another WLS
              > UserTransaction tx = (UserTransaction)ctx.lookup("java:comp/UserTransaction");
              > Homexxx home = ctx.lookup(...);
              > tx.begin();
              > home.create().getResourceOptions(qd);
              > tx.commit();
              >
              > ?
              >
              > > transaction.begin();
              > > rgData =
              > > HomeHolder.ROUTING_GUIDE_MGR_HOME.create().getResourceOptions(qd);
              > > transaction.commit();
              >
              > > If I put the EJB in the same server as the client, I don't get the
              > > exception so it seems to be related to running it in the separate server
              > > and using the UserTransaction. The deployment descriptor of the EJB
              > > states that it "Supports" transactions.
              >
              > > Any ideas?
              >
              > > Thanks,
              >
              > > John
              >
              > --
              > Dimitri
              

  • 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
              

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

  • Private field in a stateless session EJB

    Hi guys,
    I have a question about the design of a stateless session EJB.
    I would like to know :
    Does it make sense to put a private field in a stateless session bean???
    Imagine the following sitiation:
    I have a stateless session bean.
    Its job is to delegate the clients calls to some services (Java objects).
    These services are held in the private field and instatiated when WebLogic invokes
    the ejbCreate method.
    So I would like these services (Java objects) be instantiated before the clients
    invoke the bean's method for delegation - I mean, when WebLogic
    decides to create beans and put it in the pool (on the server startup for example).
    But what happens when the same bean once having finished its job is used by a
    different client???
    Are the services once instatiated available to the new client or WebLogic invokes
    the ejbCreate() method and the services are instatiated one more time???(which
    would be a performence killer)
    I must mention that in order to make the instatiation of the services possible,
    I presume I must implement the ejbCreate() method on the bean implementation class
    which invokes a private method doing the instatiation.
    So, do you think these design is a good design and what is its impact on the performence
    of the stateless session EJB ???
    Thank you.
    Freddy

    Rob Woollen <[email protected]> wrote:
    Freddy wrote:
    Hi guys,
    I have a question about the design of a stateless session EJB.
    I would like to know :
    Does it make sense to put a private field in a stateless session bean???
    Sure
    Imagine the following sitiation:
    I have a stateless session bean.
    Its job is to delegate the clients calls to some services (Java objects).
    These services are held in the private field and instatiated when WebLogicinvokes
    the ejbCreate method.
    So I would like these services (Java objects) be instantiated beforethe clients
    invoke the bean's method for delegation - I mean, when WebLogic
    decides to create beans and put it in the pool (on the server startupfor example).
    But what happens when the same bean once having finished its job isused by a
    different client???
    Are the services once instatiated available to the new client or WebLogicinvokes
    the ejbCreate() method and the services are instatiated one more time???(which
    would be a performence killer)
    WLS keeps the bean instances around in a pool. See
    http://edocs.bea.com/wls/docs81/ejb/session.html#1118700
    I must mention that in order to make the instatiation of the servicespossible,
    I presume I must implement the ejbCreate() method on the bean implementationclass
    which invokes a private method doing the instatiation.
    So, do you think these design is a good design and what is its impacton the performence
    of the stateless session EJB ???It's fine and a pretty common pattern.
    -- Rob
    Thank you.
    Freddy
    Thank you very much Rob.
    Freddy

  • Session EJB & JavaMail

    Hi all,
    I have a stateless session EJB that looks up for a mail session object. As shown in the example, lookup(MAIL_SESSION_JNDI) should return a Session object, but I get a com.sun.enterprise.deployment.MailConfiguration instead.
    Does anyone know what is happening, and what should I do to get it working?
    Thanks,
    Dan

    Hi,
    I was wondering if someone could direct me as to using JavaMail within Weblogic. Does it provide a SMTP service of some sort? How do I provide a SMTP server. And where do I get more info on:
    weblogic.resource.MailSession.mail.Session
    I couldn't find it in the docs.
    Thanks.
    Nils Winkler <[email protected]> wrote:
    I remember having the same problem. Try creating the MailSession in
    one line (without the "\"s). I think that solved it for me IIRC. Like
    this:
    weblogic.resource.MailSession.mail.Session=mail.from=[email protected],mail.host=netmail.home.com
    Hope that helps,
    Nils
    On Tue, 8 Aug 2000 08:21:50 -0600, "Greg Hamel" <[email protected]>
    wrote:
    I'm using a Session EJB to send mail using JavaMail, however the mail
    session doesn't seem to find it's properties...
    I've setup the Mail session properties as follows, from weblogic.properties.
    # MAIL SUBSYSTEM PROPERTIES
    weblogic.resource.MailSession.mail.Session=\
    mail.from=[email protected], \
    mail.host=netmail.home.com
    My Session EJB looks up the MailSession successfully via JNDI, but when it
    attempts to actually send,
    the mailhost somehow always resolves to 'localhost', instead of the value
    specified.
    Note that this occurs within the context of a web archive.
    Any suggestions?
    Greg Hamel
    Nils Winkler
    iXL, Inc.
    [email protected]

Maybe you are looking for

  • Setting different top margin for first page

    I have been trying to set a 5cm top margin for the first page of a thesis chapter and a 2.5 cm top margin for the rest of the pages to conform to requirements. I have set a section break and gone into Inspector to make first page different but I stil

  • Auto updated from 7.1 to 7.2 now it wont open OS X

    did an auto update this morning for various applications that were available and now neither itunes or quick time will even load up. please help

  • Drag and Drop from LR to other applications

    There was a thread going on D&D from LR to explorer. The other appliation problem I have is the apparent inability to drag and drop from lightroom into a file transfer window (e.g., file upload with SmugMug). The quick collection is an awesome way to

  • Handling multi-value parameters in VS 2005 / Crystal 2008

    In my program I am trying to handle a multi-value parameter using the following code, passing it an array of type string with the values that the user selected, but using the following code returns a 'Missing parameter values' error.     For Each crP

  • Editing User Management Properties (sapum.properties)

    Hi all, Can some one tell me how to edit the sapum.properties file?? This is very urgent. Thanks, Narahari