WebLogic 6.1 SP2 stateful EJB handle serialization problem
I try to serialize and later deserialize the handle of a stateful
session bean in WebLogic 6.1 SP2. This works on the client, but not on
the server. In WebLogic 6.1 SP1, it worked on both server and client.
The test code:
try {
InitialContext context = new InitialContext();
InfSessionHome sessionHome = (InfSessionHome)
InfEJBUtil.getInfEJBHome
(context, InfJNDINames.INFSESSION_EJBHOME,
InfSessionHome.class);
infSession1 = sessionHome.create();
// serialize
ObjectOutputStream objector = new ObjectOutputStream(byteStream);
objector.writeObject(infSession1.getHandle());
objector.flush();
objector.close();
byte[] ejbKeyBytes = byteStream.toByteArray();
// deserialize
ByteArrayInputStream byteInStream = new
ByteArrayInputStream(ejbKeyBytes);
ObjectInputStream objStream = new ObjectInputStream(byteInStream);
Handle ejbHandle = (Handle) objStream.readObject();
objStream.close();
InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
if (!infSession2.equals(infSession1)) {
throw new IllegalStateException("not equal: " + infSession2);
} catch (Exception e) {
e.printStackTrace();
I get the following stack trace in the readObject() call:
java.io.InvalidClassException:
weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
class
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
I suppose that WebLogic uses a different handle on the server
(LocalServerRef class, handle local to it's EJB) than on the client.
I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
suppose that more people are running into the same problem.
Does anybody know of a workaround?
Tom
Just a small addition/clarification to what Cameron said on serialization.
- The no argument constructor is required in the first non-serializable class in the object hierarchy for de-serialization process. If your class extends form Object class(which has a no arg constructor), you need not have a no-arg constructor. refere to http://64.49.216.133/faq/view.jsp?EID=251942 for more details.
- Also I suggest using the api
isIdentical(...)
instead of equals method in the code if you are trying to establish whether the two objects represent the same EJBObject or not
- Rajeev
Cameron Purdy <[email protected]> wrote in message news:[email protected]...
A no-argument constructor is required for a class to be deserialized. It
sounds like a BEA bug from the stack trace, but make sure you don't have
something extra that you are serializing on something of yours that should
be transient. (It's hard to imagine how, but you never know ...)
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Tom Gerber" <[email protected]> wrote in message
news:[email protected]...
I try to serialize and later deserialize the handle of a stateful
session bean in WebLogic 6.1 SP2. This works on the client, but not on
the server. In WebLogic 6.1 SP1, it worked on both server and client.
The test code:
try {
InitialContext context = new InitialContext();
InfSessionHome sessionHome = (InfSessionHome)
InfEJBUtil.getInfEJBHome
(context, InfJNDINames.INFSESSION_EJBHOME,
InfSessionHome.class);
infSession1 = sessionHome.create();
// serialize
ObjectOutputStream objector = new ObjectOutputStream(byteStream);
objector.writeObject(infSession1.getHandle());
objector.flush();
objector.close();
byte[] ejbKeyBytes = byteStream.toByteArray();
// deserialize
ByteArrayInputStream byteInStream = new
ByteArrayInputStream(ejbKeyBytes);
ObjectInputStream objStream = new ObjectInputStream(byteInStream);
Handle ejbHandle = (Handle) objStream.readObject();
objStream.close();
InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
if (!infSession2.equals(infSession1)) {
throw new IllegalStateException("not equal: " + infSession2);
} catch (Exception e) {
e.printStackTrace();
I get the following stack trace in the readObject() call:
java.io.InvalidClassException:
weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
class
atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
atjava.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
atjava.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
at java.lang.reflect.Method.invoke(Native Method)
atjava.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
atweblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
I suppose that WebLogic uses a different handle on the server
(LocalServerRef class, handle local to it's EJB) than on the client.
I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
suppose that more people are running into the same problem.
Does anybody know of a workaround?
Tom
[att1.html]
Similar Messages
-
Problems clustering a Weblogic Stateful EJB 3.0
Hello!
I'm developing a Stateful EJB 3.0 with clustering configuration for weblogic 11G. My client gets a reference to the RemoteInterface, invoke a method and it's working. Then I shutdown the server where the EJB was created and the client reinvoke (using the same reference) a method and get's this error:
javax.ejb.EJBException: Exception waiting for response; nested exception is:
java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
java.io.EOFException: Connection closed by peer
at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
javax.ejb.EJBException: Exception waiting for response; nested exception is:
java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
at $Proxy0.getMas(Unknown Source)
at com.ibermatica.pruebas.pruebaEJB30SF.getPrueba(pruebaEJB30SF.java:79)
at com.ibermatica.pruebas.pruebaEJB30SF.main(pruebaEJB30SF.java:26)
Caused by: java.io.EOFException: Connection closed by peer
at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
The description of my test is:
+I have a Weblogic cluster (c1, c2)
+I have developed an 3.0 Stateful EJB (configurated for replication)
+My client gets an EJB Instance from c1 and invoke one method (debugging)
+I stops my client
+I shutdown my server (c1)
+My client invokes another EJB method end gets the error described before.
It seems like the Server don't replicate the EJB.
My replicatión ejb deployment descriptor is (weblogic.xml):
<weblogic-enterprise-bean>
<ejb-name>Session30EJBSFBean</ejb-name>
<stateful-session-descriptor>
<stateful-session-clustering>
<!--<home-is-clusterable>true</home-is-clusterable>
<home-load-algorithm>random</home-load-algorithm>
<replication-type>InMemory</replication-type>-->
<use-serverside-stubs>true</use-serverside-stubs>
<replication-type>InMemory</replication-type>
</stateful-session-clustering>
</stateful-session-descriptor>
</weblogic-enterprise-bean>
My ejb bean class is:
@Stateful(name = "Session30EJBSF", mappedName = "clustering30-cluster301-Session30EJBSF")
@Remote
public class Session30EJBSFBean implements Session30EJBSF {
private SessionContext _context;
private int contador= 0;
private String user="";
public Session30EJBSFBean() {
public void inicio(String user){
this.user= user;
contador=0;
public void mas(){
contador++;
public int getMas(){
return contador;
public String getUser(){
return this.user;
My Remote EJB:
import javax.ejb.Remote;
@Remote
public interface Session30EJBSF {
public void inicio(String user);
public void mas();
public int getMas();
public String getUser();
My client:
public class pruebaEJB30SF {
public pruebaEJB30SF() {
super();
public static void main(String[] args) {
pruebaEJB30SF pruebaEJB30SF = new pruebaEJB30SF();
try {
pruebaEJB30SF.getPrueba();
} catch (Exception e) {
e.printStackTrace();
public Context getInitialContext() throws NamingException {
//String url="t3://c1:8001";
String url="iiop://c1:8001";
String user="any";
String password="any";
Properties p= new Properties();
//p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,url);
p.put(Context.SECURITY_PRINCIPAL,user);
p.put(Context.SECURITY_CREDENTIALS,password);
return new InitialContext(p);
public void getPrueba() throws NamingException, RemoteException,
CreateException {
// <PROFILING>
Context ctx= getInitialContext();
//2.0 Stateful
Object ref= ctx.lookup("clustering30-cluster301-Session30EJBSF#.Session30EJBSF");
Session30EJBSF home= (Session30EJBSF)PortableRemoteObject.narrow(ref, Session30EJBSF.class);
Session30EJBSF ejb=home;
ejb.inicio("User1");
ejb.mas();
System.out.println( ejb.getMas());// I put here a breakpoint and I shutdown the serer c1
ejb.mas();
System.out.println( ejb.getMas());
ejb.mas();
System.out.println( ejb.getMas());//Caida
ejb.mas();
System.out.println( ejb.getMas());
I have developed a EJB 2.1 and a EJB 2.1 client and it's working. The most important change betwin ejb 3.0 client and my 2.1 client is that in 2.1 I use the getHandle method and a Home, not a Remote.
Please, can anyone help me.
Thanks.Hi,
Please change your Client Code as below: URL must be pointing to the comma Separated address of your ManagedServers Address/Port which are part of Cluster like For Example Suppose you have 2 managedServers in ClusterA ..... t3://MS1Host:8003,MS2Host:8005
public Context getInitialContext() throws NamingException {
<strike><font color=red>String url="t3://c1:8001";</font></strike>
<b>String url="t3://ManagedServer1HostName:port,ManagedServer2HostName:port";</b>
String user="any";
String password="any";
Properties p= new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,url);
p.put(Context.SECURITY_PRINCIPAL,user);
p.put(Context.SECURITY_CREDENTIALS,password);
return new InitialContext(p);
Thanks
Jay SenSharma
http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here) -
Hi all,
In our production environment, we're getting the following exception when client requesting the transaction from EJB but it is not happening all the time. It just happens a couple time on day. I assume that it happens 5 out 100 requests.
Here is the exception...<br>
<b>================================<br>
Exception occurred during commit of transaction Name=[EJB com.xxx.xxx.ejb.MappingTrlsBean.getTranslation(java.math.BigDecimal,java.math.BigDecimal,java.math.BigDecimal,java.sql.Date,java.sql.Date)],Xid=BEA1-48F084989933A1C25F07(31980664),Status=Rolled back. [Reason=oracle.jdbc.xa.OracleXAException],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=76,seconds left=60,XAServerResourceInfo[DS35Pool]=(ServerResourceInfo[DS35Pool]=(state=rolledback,assigned=TTMsvr),xar=DS35Pool),XAServerResourceInfo[DS11Pool]=(ServerResourceInfo[DS11Pool]=(state=rolledback,assigned=TTMsvr),xar=DS11Pool),SCInfo[TTM+TTMsvr]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.bcbsmn.mappingtrls.ejb.MappingTrlsBean.getTranslation(java.math.BigDecimal,java.math.BigDecimal,java.math.BigDecimal,java.sql.Date,java.sql.Date)]}),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=TTMsvr+172.16.208.50:6333+TTM+t3+, XAResources={},NonXAResources={})],CoordinatorURL=TTMsvr+172.16.208.50:6333+TTM+t3+): oracle.jdbc.xa.OracleXAException
<br>...............<br><br>
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'DS35Pool - with nested exception:
[oracle.jdbc.xa.OracleXAException]
<br>==============================</b><br>
I have a couple of connection pools setup called DS35Pool and DS11Pool.
The configuration of the both driver is
1)Driver Classname:oracle.jdbc.xa.client.OracleXADataSource
using ojdbc14.jar from weblogic 8.1 sp2
2)Remove Infected Connections Enabled is checked
3)Allow Shrinking is checked with 900 seconds
4)Test Reserved Connections is checked
5)Keep XA Connection Till Transaction Complete is checked
6)Supports Local Transaction is checked.
Thank you in advance for any help!!!That appears to be a bug in the console. You might try the command-line tool java weblogic.Deployer for deploying apps. java weblogic.Deployer -examples will give detailed usage info.
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
Weblogic 8.1 SP2 does not support 'Order by' clause in EJB-QL
It seems that Weblogic 8.1 SP2 does not support 'Order by' clause in EJB-QL. EJB 2.1 spec supports 'Order by' clause in EJB-QL. Am I right when I say that it indicates : "Weblogic 8.1 SP2 does not support EJB 2.1" ? In that case, what can be the alternative since I am using Weblogic 8.1 and I require 'Order by' clause in Ejb-QL as well.
In WL 8.1 SP4 I can use the ORDERBY just fine.
Try ORDERBY instead of Order by -
Stateful bean handle in HttpSession
Hi ,
I have environment where i create a pool of stateful EJB's and I store the pool
in the servlet context. For each requests I obtain the refernce to the ejbhandle
from the pool and exceute the method on the stateful bean. I use this ejbhandle till
the session is ended. Is there any problem with this sort of design in the clustering
environment?
As per the httpsession replication after the state of the object stored in the sesion
is changed , setAttribute method has to be called for the replication. So is it the
same for ejbhandle also?
After I call some methos on the SFEJB (getting a reference via EJBHandle in the session),
do I have to call set sttaribute and pass the ejb handle for the replication?
Any amount of feed back is appreciated.
Thanks,
sri
The handle is serializable and portable. You can put it into the HTTP
session. If you don't use setAttribute, the data won't get replicated. For
example:
Object[] ao = new Object[10];
session.putAttribute("test", ao);
// replication occurs
... later ...
Object[] ao = (Object[]) session.getAttribute("test");
ao[3]="hello world";
// no replication occurs
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"sri" <[email protected]> wrote in message
news:[email protected]...
>
> Hi ,
>
> I have environment where i create a pool of stateful EJB's and I store
the pool
> in the servlet context. For each requests I obtain the refernce to the
ejbhandle
> from the pool and exceute the method on the stateful bean. I use this
ejbhandle till
> the session is ended. Is there any problem with this sort of design in
the clustering
> environment?
>
> As per the httpsession replication after the state of the object stored in
the sesion
> is changed , setAttribute method has to be called for the replication. So
is it the
> same for ejbhandle also?
> After I call some methos on the SFEJB (getting a reference via EJBHandle
in the session),
> do I have to call set sttaribute and pass the ejb handle for the
replication?
>
> Any amount of feed back is appreciated.
>
> Thanks,
> sri
>
-
How to get the TransactionManager in a stateful EJB (using JPA toplink)
I use weblogic 10.3
This is my stateful EJB and I need to get the TransactionManager because I want to suspend my transaction...
Here it is ok for the UserTransaction ut but I got an error with the TransactionManager
EJB Code
//@Stateless(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
@Stateful(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
@TransactionManagement(TransactionManagementType.BEAN)
@Remote
@Local
public class MyFacadeEJBBean implements MyFacadeEJB, MyFacadeEJBLocal, Serializable {
@Resource javax.transaction.UserTransaction ut;
@Resource javax.transaction.TransactionManager tm;
Error Message at the deploy EJB
Unable to deploy EJB: MyFacadeEJB from PocJTA-PEJB-ejb:
[EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'test.ejb.MyFacadeEJBBean/tm' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:639)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:247)Chpruvos,
Hi, I ran into a similar issue when specifying WebLogic specific descriptors in ejb-jar.xml and the corresponding weblogic-ejb-jar.xml. I no longer use this approach in our example code - we just use annotations. see: http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Tutorial_Source
My session bean is stateless - I don't know how much it will help with your statefull bean managed config but here are copies of the ejb.jar configuration xml I used to use. All the resource*ref elements (see the resource-description* element) ended up in the weblogic specific weblogic-ejb-jar.xml descriptor file.
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd]" version="3.0">
*<enterprise-beans>*
*<session>*
*<ejb-name>ApplicationService</ejb-name>*
*<ejb-class>org.eclipse.persistence.example.unified.business.ApplicationService</ejb-class>*
*<session-type>Stateless</session-type>*
+<!-- default to CMP Container managed transations not BMP -->+
+<!-- transaction-type>Bean</transaction-type-->+
+<!-- resource-env-ref id="ResourceEnvRef_1080980284303">+
+<resource-env-ref-name>localOracle10RemoteDS</resource-env-ref-name>+
+<resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>+
+</resource-env-ref-->+
+<!-- resource-ref>+
+<res-ref-name>localOracle10RemoteDS</res-ref-name>+
+<res-type>javax.sql.DataSource</res-type>+
+<res-auth>Application</res-auth>+
+</resource-ref-->+
*</session>*
*</enterprise-beans>*
</ejb-jar>
weblogic-ejb-jar.xml
<?xml version="1.0"?>
<weblogic-ejb-jar>
*<weblogic-enterprise-bean>*
*<ejb-name>ApplicationService</ejb-name>*
*<stateless-session-descriptor>*
*<pool>*
*<max-beans-in-free-pool>8</max-beans-in-free-pool>*
*<initial-beans-in-free-pool>2</initial-beans-in-free-pool>*
*</pool>*
*</stateless-session-descriptor>*
{color:#008000}<resource-description>
<res-ref-name>localOracle10RemoteDS</res-ref-name>
<jndi-name>localOracle10RemoteDS</jndi-name>
</resource-description>
<resource-env-description>
<resource-env-ref-name>localOracle10RemoteDS</resource-env-ref-name>
<jndi-name>localOracle10RemoteDS</jndi-name>
</resource-env-description>
{color}+<!-- jndi-name>localOracle10RemoteDS</jndi-name-->+
*</weblogic-enterprise-bean>*
</weblogic-ejb-jar>
thank you
/michael
[http://www.eclipselink.org|http://www.eclipselink.org/]
Edited by: michael_obrien on Feb 26, 2009 9:56 AM -
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,
EricHi 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 -
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,
RonJason 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
-
Classes, Stateful EJBs and EJB Container
Hi,
We have several doubts about classes, servlets, and EJBs.
We have been told that the instance of non-static classes from JSPs or servlets
can be a problem if we have a big number of clients connecting to weblogic (or
any other app server). Would it be a problem? Is it a better practice to instantiate
those classes from EJBs?
We have been told that EJBs are managed by the EJB container, and it uses a pool
for serving them to clients, passivating and activating them. This would include
the classes instantiated inside them. Is it true?
If all our guesses are true, the better way to implement a search with pagination
would be a stateful EJB, using handlers to save it in the client's session. But
we've heard that stateful EJBs are really bad for server's perfomance. Is it true?
We are using Weblogic 7.0. If so, what are they useful for???
If they can be a problem, how to build that searching using stateless EJBs?
Best regards,
Ignacio SanchezYou're right, the concrete tag to use seems to be:
<replication-type>InMemory</replication-type>
Anyway, do you have any further explanation on Stateful's behaviour with many
clients and pagination implementation?
"Stanley Beamish" <[email protected]> wrote:
>
"Ignacio Sanchez" <[email protected]> wrote in message
news:[email protected]...
Thanks for your replies.
Anyway, I still have some questions about stateful EJBs. In a clusteredenvironment,
we've been told that stateful EJBs are only balanced before create()method. So,
if we have already "created" the Remote interface, we're using it,and the
server
fails and must be balanced to another instance, what will happen? Willwe
lost
that Remote interface and data included in it?
Not necessarily, you can enable replication, which means that your stateful
EJB's state (values of i-vars) can be replicated across nodes in a cluster.
Search through the WLS cluster documentation for details.
SB
And about your suggestion on pagination using stateless. Could youplease
explain
it in more detail? I haven't understood it well.
Thank you very much for your attention.
"Sri" <[email protected]> wrote:
Hi,
Look below for my coments.
S
"Ignacio Sanchez" <[email protected]> wrote:
Hi,
We have several doubts about classes, servlets, and EJBs.
We have been told that the instance of non-static classes from JSPsor
servlets
can be a problem if we have a big number of clients connecting to
weblogic
(or
any other app server). Would it be a problem? Is it a better practice
to instantiate
those classes from EJBs?It all boils down to your architecture. If you have a lot of clients
connecting
to web container then and if each client needs objects stored in session
then
you have to refactor your object distribution. But this could be avoided
by separating
static content from dynamic content (using proxies, load balancersetc),
having
more web containers etc. It's not necessary to instantiate these classes
in EJBs
always (then you are increasing your memory footprint). The generalguidelne
is
to do more heavy duty work as you go deeper into tiers hopefully handling
less
connections etc.
We have been told that EJBs are managed by the EJB container, and
it
uses a pool
for serving them to clients, passivating and activating them. Thiswould
include
the classes instantiated inside them. Is it true?
True.
If all our guesses are true, the better way to implement a search
with
pagination
would be a stateful EJB, using handlers to save it in the client'ssession.
But
we've heard that stateful EJBs are really bad for server's perfomance.
Is it true?
We are using Weblogic 7.0. If so, what are they useful for???
True if misused as stateful EJBs, just like HTTP sessions could bereplicated
and could be activated/passivated.
If they can be a problem, how to build that searching using stateless
EJBs?
You could cache searchs and pass identity and page numbers to theSLSB.
Best regards,
Ignacio Sanchez -
Wegain4.5 & weblogic 6.1 sp2
Can I use EJB QL (2.0) standard if I want to defind find method in CMP with Webgain
4.5 and 6.1 sp2 toolsDoes Weblogic 6.1 (SP2) clustering work better on Sun Solaris than Windows 2000?
Yes.
... but that's a misleading answer because Weblogic in general works better
on Sparc/Solaris than on x86/Windows. The clustering implementation is Java,
so the same code runs on both Windows and Solaris, and works well on each.
The benefits that Solaris provides are seen primarily in terms of ability to
handle load more gracefully and in its overall stability -- once you get it
configured correctly anyway.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Sam" <[email protected]> wrote in message
news:3c508b7e$[email protected]..
-
Which version of jdbc thin driver should i use to achieve distributed transaction
with oracle 8.1.5 in weblogic 6.1 sp2
right now if iam using the driver classes provided in weblogic.jar iam gettig the
following Exception
AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
in the transaction branch start(
) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
'OracleXAPool': null
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown Source)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy126.create(Unknown Source)
at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Regards
Ranga Rao
Oracle Server 8.1.5 does not provide support for 2PC.
Full XA support is provided from version 8.1.7.
Sergi
"Lawrence" <[email protected]> wrote:
>
>Ranga,
>Please use classes12.zip for this.If you still find problem, please let
>me know.
>Thanks
>Lawrence
>
>"Ranga Rao" <[email protected]> wrote:
>>
>>
>>Which version of jdbc thin driver should i use to achieve distributed transaction
>>with oracle 8.1.5 in weblogic 6.1 sp2
>>
>>right now if iam using the driver classes provided in weblogic.jar iam
>gettig
>>the
>>following Exception
>>
>>////////////////////////////////////////////////////////////////////////////////////////////
>>AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
>>java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
>has
>>occured
>>in the transaction branch start(
>>) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
>>'OracleXAPool': null
>> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
>> at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
>> at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
>> at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
>> at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
>> at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
>> at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown
>>Source)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
>> at java.lang.reflect.Method.invoke(Native Method)
>> at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
>> at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
>> at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
>> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
>>Source)
>> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
>> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
>> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
>> at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
>> at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
>> at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
>> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
>> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
>> at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
>> at $Proxy126.create(Unknown Source)
>> at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
>> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
>> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
>>Source)
>> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
>> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
>> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>>/////////////////////////////////////////////////////////////////////////////////
>>
>>Regards
>>Ranga Rao
>>
>>
>
-
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) -
Problem with Stateful EJB in JBOSS
Hi,
J have a problem with invoking stateful EJB methods from my web application deployed in Jboss 4.0.5.GA both. The same EJB with WebLogic functions perfectly, instead with Jboss it often throws the following exception:
ERROR [org.jboss.ejb.plugins.LogInterceptor]
EJBException in method: public abstract java.lang.String
infrastruttura.server.ejb.sessionproxy.SessionProxy.getCodiceGruppo() throws
java.rmi.RemoteException:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
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.GeneratedMethodAccessor79.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.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy83.getCodiceGruppo(Unknown Source)
at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
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:96)
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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
2008-02-27 20:19:54,458 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[PitagoraOlo].[jsp]]
Servlet.service() for servlet jsp threw exception
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
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.GeneratedMethodAccessor79.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.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy83.getCodiceGruppo(Unknown Source)
at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
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:96)
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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.ejb.EJBException: Application Error: tried to enter Stateful
bean with different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
... 47 more
Is there someone can help me?
thanks forward.We got resolved it through bea. This is a know problem of WLS6.1 Sp4. Bea has provided
us with a patch, after which every thing seems to be working fine.
Please open a case with bea mentioning the CR092146. You can read the description
of this CR on internet.
This will certainly solve your problem.
Bob Butkus <[email protected]> wrote:
>We are experiencing the same issue. Did you ever get this resolved?
-
Hi,
When monitoring Stateful EJBs the first column, "Cached Beans Current Count",
assume negative values.
Why this happens?
Thanks,
Denis MacedoHi,
if you give some number in <max-beans-in-cache>number</max-beans-in-cache>.Then Weblogic Server going to create that many number of objects initially .
In case of statefull SessionBeans, If you give 3 ,Then Server creates 3 objects for that bean to provide service to the 3 clients at a time .
Whenever it receives the 4 requests at a time then three request's will be served at a time and 4th request will wait until the server passivate any object out of 3 in some persistant storage and create the object for 4th client.
it will not throw any exception or error if we sent more than number of requests which we were mention in max-beans-in-cache.
----Anilkumar kari -
Double submission problem in J2EE application under Weblogic 8.1 SP2 server
Hi,
We are facing double submission problem in our J2EE application which is running under Weblogic 8.1 SP2 and for the same we already implemented or added the below preventive solutions.
1. We disable the SUBMIT button once the user clicks it.
2. We preventated pressing 'F5' button and clicking 'Refresh' button in the browser.
3. Also we tried to prevent by declaring the idempotent is 'true' under weblogic-ejb-jar.xml as below.
<stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idempotent>
So please somebody help us on this issue like how to prevent in some other way.
Regards,
Dinesh.I have no idea why you would think changing your EJB configuration would have anything to do with preventing double submission at your servlet layer.
One technique I've seen for preventing double submission was first used in the Struts framework several years ago. When a page is "prepared" for display, a token value is created and stored in the session. The page is displayed with a hidden field containing that value. When the page is submitted, the value of the hidden field is compared with the value stored in the session. If they're not equal, the submission is ignored.
Maybe you are looking for
-
Xp 64 bit no longer works with AMI bios 1.2?!
Hi, Having managed to get XP 64 bit working ok on my new machine I thought I should upgrade my AMI bios on my K8t Neo Fis2r MoBo. I upgraded from 1.1 to 1.2 and now XP 64 bit will not boot! It will work in safety mode but not normal, so I suspected a
-
How do I get a PUK code if my cell phone carrier and iPad carrier are 2 different carriers?
My iPad says it's an AT&T carrier but my cell phone is a verizon carrier. So, how am I supposta get a PUK code for my iPad?
-
CO Obj Reposting Error in ECC 6
Hi, Document split is active in the company code, I am trying to repost cost from one cost center to another cost center. I am getting an error "Acct for acct determ. xxxx / xxx (chart of accts xxxx) missing" Where do we need to assign this auto acco
-
My Time Capsule says disc Error
I bought my time Capsule over two years ago but did not use it except on two occasions. When I really got down to using it, it displays DISC ERROR. What are the possible causes and what is the best remedy?
-
Can not turn on WLAN on my Satellite A60
i have a satelite a60 notebook. i coludnt turn on wireless lan. anything seems in there. how can i do it ?