Session Beans  and TIBCO E4JMS and Weblogic JMS 8.1

          Setup:-
          Weblogic Server 8.1 SP2 on Linux
          TIBCO E4JMS 3.1.2
          I have a two Staeless Session Beans which are deployed in both sides of the cluster
          - Cluster is made up of two servers(ManagedServer1 and ManagedServer2) on the
          same machine. The beans have container managed transaction and trans-type set
          to required. The JMS Server is on ManagedServer1. The session bean publishes 100
          messages to TIBCO JMS and Weblogic JMS and calls the second bean which again publishes
          100 messages to TIBCO JMS and Weblogic JMS .
          The connection factories used are XAQueueConnectionFactories.
          This seems to work under the following conditions:-
          a) The session beans are deployed just in ManagedServer1
          b) The WL load balancing scheme manages to run both the beans on ManagedServer1
          c) If I don't publish onto Weblogic JMS( It runs successfully on ManagedServer1
          and ManagedServer2)
          It does not seems to work :-
          When the The WL load balancing scheme manages to run both the beans on ManagedServer2.I
          put debug statements on the beans and it seems to publish everything but fails
          during the commit
          murali@dbuslinux1:~/SessionBeanExample> ant run
          Buildfile: build.xml
          run:
          [java] Run : 0
          [java] InitialContextFactory weblogic.jndi.WLInitialContextFactory
          [java] Provider Url t3://myhost.mycompany.com:18003,myhost.mycompany.com:18005
          [java] javax.transaction.TransactionRolledbackException: Exception while
          commiting Tx : Name=[EJB Case463495.StatelessBean.sendMessageWrap(java.lang.Integer,java.lang.Integer,java.lang.String,boolean,boolean)],Xid=BEA1-000649EC8876A0032A5E(160401684),Status=Rolled
          back. [Reason=javax.transaction.xa.XAException],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
          since begin=3,seconds left=30,XAServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN1TCF]=(ServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN1TCF]=(state=rolledback,assigned=ManagedServer2),xar=weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource@a0181b0),XAServerResourceInfo[JMS_MyJMS
          File Store]=(ServerResourceInfo[JMS_MyJMS File Store]=(state=rolledback,assigned=ManagedServer1),xar=null),XAServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN2TCF]=(ServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN2TCF]=(state=rolledback,assigned=ManagedServer2),xar=weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource@98f6821),SCInfo[E4JMSDOMAIN+ManagedServer1]=(state=rolledback),SCInfo[E4JMSDOMAIN+ManagedServer2]=(state=rolledback),properties=({weblogic.transaction.name=[EJB
          Case463495.StatelessBean.sendMessageWrap(java.lang.Integer,java.lang.Integer,java.lang.String,boolean,boolean)]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=ManagedServer2+myhost.mycompany.com:18005+E4JMSDOMAIN+t3+,
          XAResources={},NonXAResources={})],CoordinatorURL=ManagedServer2+myhost.mycompany.com:18005+E4JMSDOMAIN+t3+):
          javax.transaction.xa.XAException
          [java] at com.tibco.tibjms.TibjmsXAResource.end(Ljavax.transaction.xa.Xid;I)V(TibjmsXAResource.java:157)
          [java] at weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource.end(Ljavax.transaction.xa.Xid;I)V(Unknown
          Source)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.end(Lweblogic.transaction.internal.ServerTransactionImpl;Ljavax.transaction.xa.Xid;I)V(XAServerResourceInfo.java:1124)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.internalDelist(Lweblogic.transaction.internal.ServerTransactionImpl;I)V(XAServerResourceInfo.java:325)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.delist(Lweblogic.transaction.internal.ServerTransactionImpl;IZ)V(XAServerResourceInfo.java:255)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.delistAll(IZ)V(ServerTransactionImpl.java:1408)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.delistAll(I)V(ServerTransactionImpl.java:1396)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare()V(ServerTransactionImpl.java:1932)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.internalCommit()V(ServerTransactionImpl.java:252)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.commit()V(ServerTransactionImpl.java:221)
          [java] at weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.interfaces.InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:289)
          [java] at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.interfaces.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:141)
          [java] at Case463495.Stateless_soycq8_EOImpl.sendMessageWrap(Ljava.lang.Integer;Ljava.lang.Integer;Ljava.lang.String;ZZ)V(Stateless_soycq8_EOImpl.java:112)
          [java] at Case463495.Stateless_soycq8_EOImpl_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown
          Source)
          [java] at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;)V(BasicServerRef.java:477)
          [java] at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;)V(ReplicaAwareServerRef.java:108)
          [java] at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicServerRef.java:420)
          [java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(AuthenticatedSubject.java:353)
          [java] at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManager.java:144)
          [java] at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.InboundRequest;)V(BasicServerRef.java:415)
          [java] at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.ExecuteThread;)V(BasicExecuteRequest.java:30)
          [java] at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
          [java] at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
          [java] at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown
          Source)
          [java] ; nested exception is:
          [java] javax.transaction.xa.XAException
          [java] at weblogic.rjvm.BasicOutboundRequest.sendReceive()Lweblogic.rmi.spi.InboundResponse;(BasicOutboundRequest.java:108)
          [java] at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Lweblogic.rmi.extensions.server.RemoteReference;Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang.reflect.Method;)Ljava.lang.Object;(ReplicaAwareRemoteRef.java:284)
          [java] at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Ljava.rmi.Remote;Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang.reflect.Method;)Ljava.lang.Object;(ReplicaAwareRemoteRef.java:244)
          [java] at Case463495.Stateless_soycq8_EOImpl_812_WLStub.sendMessageWrap(Ljava.lang.Integer;Ljava.lang.Integer;Ljava.lang.String;ZZ)V(Unknown
          Source)
          [java] at Case463495.Client.run()V(Client.java:103)
          [java] at Case463495.Client.sendMessage()V(Client.java:132)
          [java] at Case463495.Client.main([Ljava.lang.String;)V(Client.java:195)
          [java] Caused by: javax.transaction.xa.XAException
          [java] at com.tibco.tibjms.TibjmsXAResource.end(TibjmsXAResource.java:157)
          [java] at weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource.end(Unknown
          Source)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.end(XAServerResourceInfo.java:1124)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.internalDelist(XAServerResourceInfo.java:325)
          [java] at weblogic.transaction.internal.XAServerResourceInfo.delist(XAServerResourceInfo.java:255)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.delistAll(ServerTransactionImpl.java:1408)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.delistAll(ServerTransactionImpl.java:1396)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1932)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:252)
          [java] at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
          [java] at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:289)
          [java] at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:141)
          [java] at Case463495.Stateless_soycq8_EOImpl.sendMessageWrap(Stateless_soycq8_EOImpl.java:112)
          [java] at Case463495.Stateless_soycq8_EOImpl_WLSkel.invoke(Unknown Source)
          [java] at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
          [java] at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
          [java] at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
          [java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
          [java] at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
          [java] at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
          [java] at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
          [java] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          [java] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          [java] at java.lang.Thread.startThreadFromVM(Unknown Source)
          Apologies in advance if this need to be posted in the JTA news group..
          Any ideas?
          Murali
          

Posting to the transaction newsgroup would probably also be helpful.
          Can you post the code for the session bean so we can see how you're
          enlisting Tibco in the transaction? It looks like you're using the JMS
          provider wrappers from 8.1, which do the transaction enlistment for you, so
          you shouldn't need to mess with JTA at all in your code. Still, something
          weird is going on and it'd be nice to see exactly what your code looks like.
          greg
          "L Muralidharan" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Setup:-
          >
          > Weblogic Server 8.1 SP2 on Linux
          >
          > TIBCO E4JMS 3.1.2
          >
          > I have a two Staeless Session Beans which are deployed in both sides of
          the cluster
          > - Cluster is made up of two servers(ManagedServer1 and ManagedServer2) on
          the
          > same machine. The beans have container managed transaction and trans-type
          set
          > to required. The JMS Server is on ManagedServer1. The session bean
          publishes 100
          > messages to TIBCO JMS and Weblogic JMS and calls the second bean which
          again publishes
          > 100 messages to TIBCO JMS and Weblogic JMS .
          >
          > The connection factories used are XAQueueConnectionFactories.
          >
          > This seems to work under the following conditions:-
          >
          > a) The session beans are deployed just in ManagedServer1
          > b) The WL load balancing scheme manages to run both the beans on
          ManagedServer1
          > c) If I don't publish onto Weblogic JMS( It runs successfully on
          ManagedServer1
          > and ManagedServer2)
          >
          > It does not seems to work :-
          >
          > When the The WL load balancing scheme manages to run both the beans on
          ManagedServer2.I
          > put debug statements on the beans and it seems to publish everything but
          fails
          > during the commit
          >
          > murali@dbuslinux1:~/SessionBeanExample> ant run
          > Buildfile: build.xml
          >
          > run:
          > [java] Run : 0
          > [java] InitialContextFactory weblogic.jndi.WLInitialContextFactory
          > [java] Provider Url
          t3://myhost.mycompany.com:18003,myhost.mycompany.com:18005
          > [java] javax.transaction.TransactionRolledbackException: Exception
          while
          > commiting Tx : Name=[EJB
          Case463495.StatelessBean.sendMessageWrap(java.lang.Integer,java.lang.Integer
          ,java.lang.String,boolean,boolean)],Xid=BEA1-000649EC8876A0032A5E(160401684)
          ,Status=Rolled
          > back.
          [Reason=javax.transaction.xa.XAException],numRepliesOwedMe=0,numRepliesOwedO
          thers=0,seconds
          > since begin=3,seconds
          left=30,XAServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEA
          N1TCF]=(ServerResourceInfo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN1
          TCF]=(state=rolledback,assigned=ManagedServer2),xar=weblogic.deployment.jms.
          WrappedXAResource_com_tibco_tibjms_TibjmsXAResource@a0181b0),XAServerResourc
          eInfo[JMS_MyJMS
          > File Store]=(ServerResourceInfo[JMS_MyJMS File
          Store]=(state=rolledback,assigned=ManagedServer1),xar=null),XAServerResource
          Info[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN2TCF]=(ServerResourceIn
          fo[E4JMSDOMAIN.ManagedServer2.JMSXASessionPool.BEAN2TCF]=(state=rolledback,a
          ssigned=ManagedServer2),xar=weblogic.deployment.jms.WrappedXAResource_com_ti
          bco_tibjms_TibjmsXAResource@98f6821),SCInfo[E4JMSDOMAIN+ManagedServer1]=(sta
          te=rolledback),SCInfo[E4JMSDOMAIN+ManagedServer2]=(state=rolledback),propert
          ies=({weblogic.transaction.name=[EJB
          >
          Case463495.StatelessBean.sendMessageWrap(java.lang.Integer,java.lang.Integer
          ,java.lang.String,boolean,boolean)]}),OwnerTransactionManager=ServerTM[Serve
          rCoordinatorDescriptor=(CoordinatorURL=ManagedServer2+myhost.mycompany.com:1
          8005+E4JMSDOMAIN+t3+,
          >
          XAResources={},NonXAResources={})],CoordinatorURL=ManagedServer2+myhost.myco
          mpany.com:18005+E4JMSDOMAIN+t3+):
          > javax.transaction.xa.XAException
          > [java] at
          com.tibco.tibjms.TibjmsXAResource.end(Ljavax.transaction.xa.Xid;I)V(TibjmsXA
          Resource.java:157)
          > [java] at
          weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource.
          end(Ljavax.transaction.xa.Xid;I)V(Unknown
          > Source)
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.end(Lweblogic.transaction
          .internal.ServerTransactionImpl;Ljavax.transaction.xa.Xid;I)V(XAServerResour
          ceInfo.java:1124)
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.internalDelist(Lweblogic.
          transaction.internal.ServerTransactionImpl;I)V(XAServerResourceInfo.java:325
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.delist(Lweblogic.transact
          ion.internal.ServerTransactionImpl;IZ)V(XAServerResourceInfo.java:255)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.delistAll(IZ)V(ServerTra
          nsactionImpl.java:1408)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.delistAll(I)V(ServerTran
          sactionImpl.java:1396)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.globalPrepare()V(ServerT
          ransactionImpl.java:1932)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.internalCommit()V(Server
          TransactionImpl.java:252)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.commit()V(ServerTransact
          ionImpl.java:221)
          > [java] at
          weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.interfaces.
          InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:289)
          > [java] at
          weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.interf
          aces.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:141)
          > [java] at
          Case463495.Stateless_soycq8_EOImpl.sendMessageWrap(Ljava.lang.Integer;Ljava.
          lang.Integer;Ljava.lang.String;ZZ)V(Stateless_soycq8_EOImpl.java:112)
          > [java] at
          Case463495.Stateless_soycq8_EOImpl_WLSkel.invoke(ILweblogic.rmi.spi.InboundR
          equest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.s
          pi.OutboundResponse;(Unknown
          > Source)
          > [java] at
          weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.server.
          RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.O
          utboundResponse;)V(BasicServerRef.java:477)
          > [java] at
          weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(Lweblogic.rmi.extensions.s
          erver.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi
          .spi.OutboundResponse;)V(ReplicaAwareServerRef.java:108)
          > [java] at
          weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicServerRe
          f.java:420)
          > [java] at
          weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.
          subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang
          .Object;(AuthenticatedSubject.java:353)
          > [java] at
          weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.inter
          nal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubjec
          t;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManag
          er.java:144)
          > [java] at
          weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.Inbound
          Request;)V(BasicServerRef.java:415)
          > [java] at
          weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.ExecuteTh
          read;)V(BasicExecuteRequest.java:30)
          > [java] at
          weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(Exe
          cuteThread.java:197)
          > [java] at
          weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
          > [java] at
          java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown
          > Source)
          > [java] ; nested exception is:
          > [java] javax.transaction.xa.XAException
          > [java] at
          weblogic.rjvm.BasicOutboundRequest.sendReceive()Lweblogic.rmi.spi.InboundRes
          ponse;(BasicOutboundRequest.java:108)
          > [java] at
          weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Lweblogic.rmi.extensions.s
          erver.RemoteReference;Lweblogic.rmi.extensions.server.RuntimeMethodDescripto
          r;[Ljava.lang.Object;Ljava.lang.reflect.Method;)Ljava.lang.Object;(ReplicaAw
          areRemoteRef.java:284)
          > [java] at
          weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(Ljava.rmi.Remote;Lweblogic
          .rmi.extensions.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang
          .reflect.Method;)Ljava.lang.Object;(ReplicaAwareRemoteRef.java:244)
          > [java] at
          Case463495.Stateless_soycq8_EOImpl_812_WLStub.sendMessageWrap(Ljava.lang.Int
          eger;Ljava.lang.Integer;Ljava.lang.String;ZZ)V(Unknown
          > Source)
          > [java] at Case463495.Client.run()V(Client.java:103)
          > [java] at Case463495.Client.sendMessage()V(Client.java:132)
          > [java] at
          Case463495.Client.main([Ljava.lang.String;)V(Client.java:195)
          > [java] Caused by: javax.transaction.xa.XAException
          > [java] at
          com.tibco.tibjms.TibjmsXAResource.end(TibjmsXAResource.java:157)
          > [java] at
          weblogic.deployment.jms.WrappedXAResource_com_tibco_tibjms_TibjmsXAResource.
          end(Unknown
          > Source)
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.end(XAServerResourceInfo.
          java:1124)
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.internalDelist(XAServerRe
          sourceInfo.java:325)
          > [java] at
          weblogic.transaction.internal.XAServerResourceInfo.delist(XAServerResourceIn
          fo.java:255)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.delistAll(ServerTransact
          ionImpl.java:1408)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.delistAll(ServerTransact
          ionImpl.java:1396)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTran
          sactionImpl.java:1932)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTra
          nsactionImpl.java:252)
          > [java] at
          weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransaction
          Impl.java:221)
          > [java] at
          weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:289)
          > [java] at
          weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.jav
          a:141)
          > [java] at
          Case463495.Stateless_soycq8_EOImpl.sendMessageWrap(Stateless_soycq8_EOImpl.j
          ava:112)
          > [java] at
          Case463495.Stateless_soycq8_EOImpl_WLSkel.invoke(Unknown Source)
          > [java] at
          weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
          > [java] at
          weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
          :108)
          > [java] at
          weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
          > [java] at
          weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
          t.java:353)
          > [java] at
          weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
          > [java] at
          weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
          > [java] at
          weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
          0)
          > [java] at
          weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
          > [java] at
          weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
          > [java] at java.lang.Thread.startThreadFromVM(Unknown Source)
          >
          >
          > Apologies in advance if this need to be posted in the JTA news group..
          >
          > Any ideas?
          >
          > Murali
          >
          

Similar Messages

  • How to lookup a EJB 3.0 session bean which is deployed in WebLogic 10.3

    Now Jdeveloper 11.1.1, is giving WebLogic server 10.3.
    With internal WebLogic server, when I created a Sample client, it generated code as:
    private static Context getInitialContext() throws NamingException {
        Hashtable env = new Hashtable();
        // WebLogic Server 10.x connection details
        env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
        env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101");
        return new InitialContext( env );
    public static void main(String [] args) {
        try {
            final Context context = getInitialContext();
            DefaultSession defaultSession = (DefaultSession)context.lookup("property-DefaultSession#com.vs.property.model.session.DefaultSession");
        } catch (Exception ex) {
    }How to update the above code to lookup the EJB 3.0 session beans with an external WebLogic server 10.3?
    Is there any documentation available on how to install weblogic, troubleshoot, debug, WebLogic server 10.3?
    regds
    -raju

    Raju,
    Hi, to start, here is a tutorial on a quickstart web application using an EJB 3.0 stateless session bean that fronts a container managed EclipseLink JPA entity manager on WebLogic 10.3, you will find references there to other general WebLogic documentation.
    [http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial]
    using @EJB injection on the client instead of a JNDI lookup as below
    [http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1417411]
    1) in your second env.put I noticed that your t3 port is 7101, I usually use the default 7001 - but It looks like this port is valid for the JDeveloper embedded version of WebLogic server runs - just verify that it matches the port of your server.
    2) your name#qualified-name lookup looks ok. Verify that the jndi-name element is set in your weblogic-ejb-jar.xml for non injection clients like the following
    &lt;weblogic-ejb-jar&gt;
    &lt;weblogic-enterprise-bean&gt;
    &lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;
    &lt;jndi-name&gt;ApplicationService&lt;/jndi-name&gt;
    3) as a test outside of your application - launch the WebLogic admin console and goto the testing tab of your bean in [Home &gt; Summary of Deployments &gt; "application" &gt; "session bean name"
    thank you
    /michael : http://www.eclipselink.org                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • WLS10 and Stateless Session Bean

    I tried to create EJB3 application example.
    1. Created Stateless Session Bean that implements Remote and Local interfaces:
    Session Bean code:
    package com.session;
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    @Stateless(mappedName="SessionBeanService")
    @Remote(ISessionBeanRemote.class)
    @Local(ISessionBeanLocal.class)
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class SessionBean implements ISessionBeanLocal,
    ISessionBeanRemote
    public String reply(){
    return "MySessionBean - success !!!";
    Remote Interface code :
    package com.session;
    public interface ISessionBeanRemote
    public String reply();
    Local Interface code:
    package com.session;
    public interface ISessionBeanLocal
    public String reply();
    application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/application_5.xsd"
         version="5">
         <display-name>EJB3 Sample Application</display-name>
         <module>
         <ejb>beans.jar</ejb>
         </module>
    </application>
    weblogic-application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-application PUBLIC
         "-//BEA Systems, Inc.//DTD WebLogic Application 8.1.0//EN"
         "http://www.bea.com/ns/weblogic/90/weblogic-application.xsd">
    <weblogic-application>
              <classloader-structure>
                   <module-ref>
                        <module-uri>beans.jar</module-uri>
                   </module-ref>
              </classloader-structure>
    </weblogic-application>
    2. I packaged classes into EAR file and deployed to WLS10.
    I didn't include any weblogic specific XML descriptors besides weblogic-application.jar.
    My client code lookes as follows:
    public void test(){
    Context context = getMyServerContext();
    // THIS JNDI NAME I SEE ON MY SERVER JNDI TREE
    String jndiName = "sessionbeansbeans_jarSessionBean_ISessionBeanRemote";
    Object obj;
    obj = context.lookup(jndiName);
    System.out.println(" obj class : " + obj.getClass().getName());
    ISessionBeanRemote remote = (ISessionBeanRemote) PortableRemoteObject.narrow(
    obj, ISessionBeanRemote.class );
    String res = remote.reply();
    System.out.println("res : "+res);
    I get an Exception:
    Exception occurred!
    java.lang.ClassCastException: Cannot narrow remote object to com.session.ISessionBeanRemote
         at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:242)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.runTest(GlFacadeTest.java:91)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.<init>(GlFacadeTest.java:53)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.main(GlFacadeTest.java:151)
    java.lang.ClassCastException: Cannot narrow remote object to com.session.ISessionBeanRemote
    My server console have the following output:
    Root cause of ServletException.java.lang.NoClassDefFoundError: com/session/SessionBean_7pp7ls_ISessionBeanRemot
    eIntf
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericCla
    ssLoader.java:338)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:291)
    Truncated. see log file for complete stacktrace
    Server logs a problem already on the line when I do lookup
    on JNDI name even before narrow();
    It looks like my EAR was missing something. But server never complained during deployment.
    May be someone can direct me to a real sample of Weblogic10-ejb3.0 application, since examples that come with WLS 10 intallation combersome and do not follow
    docmentation.
    Thanks in advance for any suggestion.

    Hello Freind
    The main different b\w stateful and statless is that stateful maintain state of method conversation means it has record that which method call before this method
    but in case of stateless conversation state does not saved second different we can say that create method in stateless having no parameter but statefull having parameter I think u can understand easily
    With Best Regards
    Rajesh Pandey
    email :[email protected]
    url :-- http://www.sixthquadrant.com
    Mob :-- 9811903737
    Delhi India

  • Problem with JMS from session bean

     

    My guess is that in your effort to work around the
    clustering/ejb/jndi problems, you have a producer
    sending on one topic, and a consumer listening on
    another topic. You can check to see if they are the
    same destination using the (uncompiled) code snippets
    below at both the producer and consumer ends.
    import weblogic.jms.common.DestinationImpl;
    Topic topic;
    DestinationImpl destination = (DestinationImpl) topic;
    System.out.println("name = " + destination.getServerName() + "/" +
    destination.getName());
    System.out.println("back-end id = " + destination.getBackEndId());
    System.out.println("destination id = " + destination.getDestinationId());
    _sjz.
    "Malcolm Robbins" <[email protected]> wrote in message
    news:[email protected]...
    >
    This was also posted to the EJB newsgroup and was asked to post the secondissue
    here. Please focus on the second issue, but the first providesbackground.
    >
    >
    I have discovered two significant problems in WLS6.0 with JNDi and JMSthat do
    not occur in the Sun Reference implementation (1.3 Beta).
    Attached is some code you can try to see the problem.
    I have developed a JmsClient that simply looks up a session bean andpasses it
    a string to publish. The session bean is meant to publish to a JMS topic.
    However I have discovered two problems:
    1) In teh ejbCreate() method I look up the topic connection factory andtopic
    in JNDI. These are referenced as "java:comp/env/jms/JmsConnectionFactory"and
    "java:comp/env/jms/JmsTopic" respectively. Here's a fragment of theejb-jar
    descriptor
    <resource-ref>
    <description>The (probably durable) Topic Connection Factory to connectto</description>
    <res-ref-name>jms/JmsConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-env-ref>
    <description>The Jms Source Topic to publish to</description>
    <resource-env-ref-name>jms/JmsTopic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
    </resource-env-ref>
    As you can see they are resource references and resoruce environmentreferences
    respectively. The weblogic-ejb-jar maps these to the real JNDI names"TopicConnectionFactory"
    amd "SchemaTopic" respectively as shown below by the fragment:
    <weblogic-ejb-jar>
    ...etc...
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jms/JmsConnectionFactory</res-ref-name>
    <jndi-name>TopicConnectionFactory</jndi-name>
    </resource-description>
    <resource-env-description>
    <res-env-ref-name>jms/JmsTopic</res-env-ref-name>
    <jndi-name>SchemaTopic</jndi-name>
    </resource-env-description>
    </reference-descriptor>
    Now here's the first problem. When this is deployed the resourceenvironment
    "logical" name (JNDI linkref) for the topic is not defined. The code willhappily
    find the connection factory (presuming you've set these administeredobjects at
    the console).
    2) The second problem now arises. In the code I have ahcked it so thatwhen
    the JNDI lookup fails it tries looking up the real topic in JNDI(SchemaTopic)
    directly.
    This works and teh bean now appears to work, albeit with a directlyhardcoded
    JNDI reference in it. However, if you hook up a standard JMS consumer tothat
    topic it will not consuem the message that is published!!! While thestats clock
    up at the console the message appears to go into a black hole. I canprovdie
    a stadnard consumer if you need one.
    I have the code working fine as-is in teh Sun Reference implementation soI presume
    these are bugs with WL6.0.
    Can anyone advise workarounds and/or fix the problem?

  • How to run a client program in Session bean using weblogic 8.1

    Hi
    I am new to weblogic server 8.1. I sucessfully deployed session ejb Session Bean. I created sessionbean jar file and put it it classpath also.
    and also i created sessiobeanclient jar file, it included in class path.
    While running client program it throws exception like noclass def found exception
    plz tell me the right way to run the session ejb program.
    bye

    Hi,
    You have to follow the given steps before you are going to run the client program that invokes the session bean .
    1)set the Weblogic Environment using the tool setWLSEnv
    2)place the Session bean jar file in classpath
    3)run the client program
    Note:If the client has to execute on remote machine we need to copy client class,remote interface, home interface and other classes which are used as
    parameters and return types.
    Regards
    Anilkumar kari

  • Making AQ usage transactional across session beans, using mosly JMS syntax

    I need to determine what I need to have in place in order for JMS/AQ messages to be "fully transactional".
    I have a J2EE server application that will send JMS/AQ messages to a queue. I have a standalone application that reads messages from the queue, does some work, and then makes calls on multiple session beans (hosted in the original J2EE server application). Actually, it would likely be multiple calls to the same session bean method.
    Once the standalone application reads a message from the queue, I need to ensure that if any action performed as a result of that message fails, that all the operations performed, including the removal of the message from the queue, are rolled back.
    First of all, if I use an Oracle XA-compliant datasource, if one of the session bean calls fail, I can rollback the current transaction, but will this properly roll back any work that earlier session bean calls (made on the same transaction) did, even if they were successful (at the time)? Note that I have two JVMs, one running the J2EE application, and the other a standalone application reading from the queue.
    Second, on committing or rolling back the message retrieval itself, I noticed from examples in the Oracle AQ Application Developer's Guide that if I create my QueueSessions with "AQDriverManager.createAQSession()", that I can pass a Connection object, and then later "commit" or "rollback", manually, perhaps if I got an EJBException from a session bean call.
    However, I am trying to write my JMS/AQ code so that it uses as little of the direct AQ api as possible, staying with the standard JMS api. As a result, I'm using the JMS version of this, which is "QueueConnection.createQueueSession()". When I do this, however, it seems as if I lose control over the transaction.

    Ok, I think I've answered some of this for myself, but I still have some concerns.
    I see that the QueueSession object that I get back from "queueConnection.createQueueSession()" is likely going to actually be an instance of the "AQjmsSession" class, so I can cast to that, and then I can call "commit" or "rollback".
    What is unclear from the javadoc description is what happens when "close()" is called on the session object. Does this do an implicit "commit()", perhaps unless "rollback()" has already been called?
    I'm still a little uncertain about whether the scope of my transaction will be wide enough to protect everything that needs to be protected.
    For instance, I assume that my transaction starts when my consumer (not in an application server) reads the message from the queue. At that point, my consumer does some "screen-scraping" work. When it's done, it will call a session bean on the application in the application server (separate JVM, in other words), which will create some EJB entity objects and also insert raw database rows. The session bean will then return, and then the original method which read a message from the queue will be completed.
    What I need to know is what will happen if ANYTHING in that process fails, either in the external consumer, or in the session bean, or creating EJB entities? That is, will the entire transaction be rolled back, undoing the EJB entity creations AND the removal of the message from the message queue?
    If this can possibly work, I'm assuming this would be utilizing an XA datasource, or a non-emulated data source (which I think means the same thing).

  • My weblogic 7 can not run stateful session bean??

    Hi,all
    I create a stateful session bean in jbuilder 7 and deploy it to weblogic 7,it
    successed.The Home interface have a method like this:
    public TestRemote create(int var) throws RemoteException, CreateException;
    But the client test bean call the create(int var) method throwing
    a exception :
    java.lang.IllegalArgumentException: wrong number of arguments
    Start server side stack trace:
    java.lang.IllegalArgumentException: wrong number of arguments
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at weblogic.rmi.internal.OIDManager.makeActivatableServerReference(OIDManager.java:203)
         at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:129)
         at weblogic.common.internal.RemoteObjectReplacer.getReplacement(RemoteObjectReplacer.java:265)
         at weblogic.common.internal.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:107)
         at weblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:53)
         at weblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:239)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:323)
         at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:107)
         at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:82)
         at com.berserk.ejb.Test_a6z4o8_HomeImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:762)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:295)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    End server side stack trace
    -- Failed: create(0)
         at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127)
         at com.berserk.ejb.Test_a6z4o8_HomeImpl_WLStub.create(Unknown Source)
         at com.berserk.ejb.TestClient1.create(TestClient1.java:102)
         at com.berserk.ejb.TestClient1.main(TestClient1.java:199)
    -- Return value from create(0): null.
    Then I deploy it to the borland application server 4.5,it did work!!
    Somebody can help me ?thx

    Try throwing a CreateException in ejbCreate (int var).
    Jackie wrote:
    hi,Sabha:
    My source codes is like this.
    the home interface:
    import java.rmi.*;
    import javax.ejb.*;
    public interface TestHome extends EJBHome
    public TestRemote create(int var) throws RemoteException, CreateException;
    the remote interface :
    import java.rmi.*;
    import javax.ejb.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2002</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public interface TestRemote extends EJBObject
    public void saycool() throws java.rmi.RemoteException;
    the stateful bean:
    import java.rmi.*;
    import javax.ejb.*;
    public class Test implements SessionBean
    private SessionContext sessionContext;
    private int m_var;
    public void ejbCreate(int var)
    this.m_var=var;
    public void ejbRemove()
    public void ejbActivate()
    public void ejbPassivate()
    public void setSessionContext(SessionContext sessionContext)
    this.sessionContext = sessionContext;
    public void saycool() throws java.rmi.RemoteException
    System.out.println("so cool");
    the client test class:
    import javax.naming.*;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2002</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public class TestClient1
    static final private String ERROR_NULL_REMOTE = "Remote interface reference
    is null. It must be created by calling one of the Home interface methods first.";
    static final private int MAX_OUTPUT_LINE_LENGTH = 100;
    private boolean logging = true;
    private TestHome testHome = null;
    private TestRemote testRemote = null;
    //Construct the EJB test client
    public TestClient1()
    long startTime = 0;
    if (logging)
    log("Initializing bean access.");
    startTime = System.currentTimeMillis();
    try
    //get naming context
    Context ctx = getInitialContext();
    //look up jndi name
    Object ref = ctx.lookup("TestRemote");
    //cast to Home interface
    testHome = (TestHome) PortableRemoteObject.narrow(ref, TestHome.class);
    if (logging)
    long endTime = System.currentTimeMillis();
    log("Succeeded initializing bean access.");
    log("Execution time: " + (endTime - startTime) + " ms.");
    catch(Exception e)
    if (logging)
    log("Failed initializing bean access.");
    e.printStackTrace();
    private Context getInitialContext() throws Exception
    String url = "t3://lettam:7001";
    String user = null;
    String password = null;
    Properties properties = null;
    try
    properties = new Properties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    properties.put(Context.PROVIDER_URL, url);
    if (user != null)
    properties.put(Context.SECURITY_PRINCIPAL, user);
    properties.put(Context.SECURITY_CREDENTIALS, password == null
    ? "" : password);
    return new InitialContext(properties);
    catch(Exception e)
    log("Unable to connect to WebLogic server at " + url);
    log("Please make sure that the server is running.");
    throw e;
    // Methods that use Home interface methods to generate a Remote interface
    reference
    public TestRemote create(int var)
    long startTime = 0;
    if (logging)
    log("Calling create(" + var + ")");
    startTime = System.currentTimeMillis();
    try
    testRemote = testHome.create(var);
    if (logging)
    long endTime = System.currentTimeMillis();
    log("Succeeded: create(" + var + ")");
    log("Execution time: " + (endTime - startTime) + " ms.");
    catch(Exception e)
    if (logging)
    log("Failed: create(" + var + ")");
    e.printStackTrace();
    if (logging)
    log("Return value from create(" + var + "): " + testRemote + ".");
    return testRemote;
    // Methods that use Remote interface methods to access data through the bean
    public void saycool()
    if (testRemote == null)
    System.out.println("Error in saycool(): " + ERROR_NULL_REMOTE);
    return ;
    long startTime = 0;
    if (logging)
    log("Calling saycool()");
    startTime = System.currentTimeMillis();
    try
    testRemote.saycool();
    if (logging)
    long endTime = System.currentTimeMillis();
    log("Succeeded: saycool()");
    log("Execution time: " + (endTime - startTime) + " ms.");
    catch(Exception e)
    if (logging)
    log("Failed: saycool()");
    e.printStackTrace();
    public void testRemoteCallsWithDefaultArguments()
    if (testRemote == null)
    System.out.println("Error in testRemoteCallsWithDefaultArguments():
    " + ERROR_NULL_REMOTE);
    return ;
    saycool();
    // Utility Methods
    private void log(String message)
    if (message == null)
    System.out.println("-- null");
    return ;
    if (message.length() > MAX_OUTPUT_LINE_LENGTH)
    System.out.println("-- " + message.substring(0, MAX_OUTPUT_LINE_LENGTH)
    + " ...");
    else
    System.out.println("-- " + message);
    //Main method
    public static void main(String[] args)
    TestClient1 client = new TestClient1();
    client.create(0);
    // Use the client object to call one of the Home interface wrappers
    // above, to create a Remote interface reference to the bean.
    // If the return value is of the Remote interface type, you can use it
    // to access the remote interface methods. You can also just use the
    // client object to call the Remote interface wrappers.
    Thank you for your help!!
    "Sabha" <[email protected]> wrote:
    Can you attach the sources of your ejb. Thanks.
    -Sabha
    "Jackie Lee" <[email protected]> wrote in message
    news:[email protected]...
    Hi,all
    I create a stateful session bean in jbuilder 7 and deploy it to weblogic7,it
    successed.The Home interface have a method like this:
    public TestRemote create(int var) throws RemoteException,CreateException;
    But the client test bean call the create(int var) method throwing
    a exception :
    java.lang.IllegalArgumentException: wrong number of arguments
    Start server side stack trace:
    java.lang.IllegalArgumentException: wrong number of arguments
    at java.lang.reflect.Constructor.newInstance(Native Method)
    atweblogic.rmi.internal.OIDManager.makeActivatableServerReference(OIDManager.j
    ava:203)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:129)
    atweblogic.common.internal.RemoteObjectReplacer.getReplacement(RemoteObjectRep
    lacer.java:265)
    atweblogic.common.internal.RemoteObjectReplacer.replaceObject(RemoteObjectRepl
    acer.java:107)
    atweblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObje
    ctOutputStream.java:53)
    atweblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.
    replaceObject(ChunkedObjectOutputStream.java:239)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:323)
    atweblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObject
    OutputStream.java:107)
    atweblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:8
    2)
    at com.berserk.ejb.Test_a6z4o8_HomeImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
    atweblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:762)
    atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:295)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    End server side stack trace
    -- Failed: create(0)
    atweblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:109)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127)
    at com.berserk.ejb.Test_a6z4o8_HomeImpl_WLStub.create(Unknown Source)
    at com.berserk.ejb.TestClient1.create(TestClient1.java:102)
    at com.berserk.ejb.TestClient1.main(TestClient1.java:199)
    -- Return value from create(0): null.
    Then I deploy it to the borland application server 4.5,it did work!!
    Somebody can help me ?thx
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Bean differences between tomcat and oracle

    All I have created a session bean in a servlet and am trying to use it in a jsp page. On my localhost I am using Apache Tomcat 4.0 and everything works fine. In my test environment I am using oracle9i's app server and I am getting a "java.lang.ClassCastException: class" exception.
    Code snippets follow - If anyone can help I would appreciate it.
    Thanks in advance
    Servlet snippet
    public class index extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,
    IOException
    try{
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    HttpSession session = req.getSession(true);
    WebModel model = (WebModel)session.getValue("model");
    if (model == null) {
    model = new WebModel();
    session.putValue("model", model);
    jsp use bean snippet
    <jsp:useBean id="model" class="ngtvsmodel.WebModel" scope="session"/>
    <jsp:setProperty name="model" property="*"/>

    Does this make any sense to anyone??
    I have been banging my head against the wall all day.
    Please help.

  • Error in updating secondary stateful session bean

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

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

  • Would RollBacks For Stateless Session Beans work In case of Stored Procedures or Triggers Written in Oracle PL/SQl

              We are writing a J2EE application and using Weblogic 5.1 on Unix machine. We are
              considering writing some Stored Procedures or Triggers on Oracle DBMS. Hence our
              Stateless Session Beans / Data Access Objects (DAOs) would be calling those stored
              procedures, which would reside on Oracle 8.1.7 (on Windows 2000). (These Data
              Access Objects are running under the umbrella of a Stateless Session Beans). We
              are using WebLogic's Connection Pooling.
              Our question is: Would we get reliable rollbacks from our stored procedures. I
              mean would the Transaction Management process of the EJB container work. Remember
              the SQL is written in the Database (Oracle in this case) in the form of Stored
              Procedures / Triggers through PL/SQL.
              Any ideas or tips would help.
              

              I would agree with Cameron Purdy. Be very cautious to use Oracle specific
              Triggers / Stored Procedures. Consider following, (apart from what he said):
              1. Unreliable behaviour of the Oracle JDBC drivers, specially 8.1.6 family..
              (You may visit the Oracle's web site and see the newsgroups for the JDBC drivers).
              This is enough of a reason to stop right there.
              However for interest sake you may consider following issues:
              2. By use of Oracle specific Triggers / SPs the application will not be portable.
              Vendor Lock In. Remember your choice for J2EE compliant Server (WebLogic in this
              case). The whole purpose would be defeated by going for this option.
              3. There are issues related to the extensibility of the application. I have
              my reservations and would hold my breath on two phase commit protocol transactions
              being reliable in this scenario.
              Have fun...
              Terry
              "Cameron Purdy" <[email protected]> wrote:
              >Yes, the work performed by the SPs and the triggers would be in the same
              >tx.
              >
              >What would NOT work is if the data has been read into WebLogic and then
              >it
              >gets affected by a trigger or SP on the RDBMS, the data in WebLogic is
              >not
              >automatically re-read within that same tx so you need to be careful.
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol Inc.
              >Tangosol Coherence: Clustered Coherent Cache for J2EE
              >Information at http://www.tangosol.com/
              >
              >
              >"Ahmad" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> We are writing a J2EE application and using Weblogic 5.1 on Unix machine.
              >We are
              >> considering writing some Stored Procedures or Triggers on Oracle DBMS.
              >Hence our
              >> Stateless Session Beans / Data Access Objects (DAOs) would be calling
              >those stored
              >> procedures, which would reside on Oracle 8.1.7 (on Windows 2000). (These
              >Data
              >> Access Objects are running under the umbrella of a Stateless Session
              >Beans). We
              >> are using WebLogic's Connection Pooling.
              >> Our question is: Would we get reliable rollbacks from our stored
              >procedures. I
              >> mean would the Transaction Management process of the EJB container
              >work.
              >Remember
              >> the SQL is written in the Database (Oracle in this case) in the form
              >of
              >Stored
              >> Procedures / Triggers through PL/SQL.
              >> Any ideas or tips would help.
              >
              >
              

  • Ejb3 session bean lookup

    Hello, I have following problem with the ejb3 and session bean lookup:
    For example, I have a session bean with some dummy method, i.e. getInfo() :
    @Stateless
    public class MySessionBean implements MySessionLocal {
    public String getInfo() {return "Hello from Session bean";}
    When I lookup and use this bean in servlet in the following way, everything is OK:
    public class MyServlet extends HttpServlet {
    @EJB() MySessionLocal mySession;
    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
    out.println(mySession.getInfo());
    On the other side, when I create some java bean object as a facade, import and use it in servlet , it doesn't work:
    public class Facade {
    @EJB() MySessionLocal mySession;
    public String getInfo() { return mySession.getInfo();}
    public class MyServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
    Facade myFacade = new Facade();
    out.println(myFacade.getInfo());
    When servlet runs and gets to the command myFacade.getInfo(), NullPointerException is thrown, because mySession object in myFacade is null (ejb lookup method probably fails to perform...)
    I'm trying to use Facade to be able to use my Session Bean in JSP pages, i.e. to do something like <jsp:useBean id="myFacade" class="Facade" ...>
    Could someone clarify why lookup doesn't work in javabean object, despite the fact that it works in servlets?
    P.S. I'm running the latest promoted build (b31) of GlassFish (maybe this is the cause) and NetBeans IDE...

    Hi,
    Please try this ... http://weblogic-wonders.com/weblogic/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/ (Lookup from JSP)
    and
    http://weblogic-wonders.com/weblogic/2009/08/15/hello-world-2/  (Lookup/Injection from Servlet)
    Thanks
    Jay SenSharma

  • Calling Tibco EMS through Weblogic

    We're POCing Oracle SOA as a replacement for Tibco at our company, however, until we fully replace our tibco architecture, for reusabilities sake we want to be able to call tibco ems from applications hosted on weblogic.
    So far, we've been unable to get any of our calls to EMS to succeed, as we're missing some unknown, critical peice of understanding required to use the service properly.
    Here is what we know works:
    We can deploy applications that make successful database calls using the database adapter in JDeveloper.
    JDeveloper can see exposed queues on weblogic using the JMS Adapter wizard.
    In the console/JNDI tree we can confirm that weblogic can connect to tibco by configuring weblogic through either the /Console/Services/Foreign JNDI Providers or /Console/Services/Messaging/JMS Modules/SomeModules/SomeForeignServer/Destinations
    However, we have no idea how to get the Queues in the JNDI tree to apear in the JMS Adapter Wizard in JDeveloper, neither do we know how to get those queues to actually call Tibco, so we can forward calls to Weblogic to Tibco where appropriate.
    Any clues at all would be awesomely amazing.
    Thanks,
    Daniel

    Using TIBCO EMS or WebLogic JMS is essentially the same in a SOA Composite application. In both cases, the key step is to configure a new EIS connection resource in the Oracle JMS Adapter. This step is performed in EM Fusion Middleware Control (or scripted using WLST). It's the EIS connection resource that physically points to your TIBCO EMS server endpoints and a specific TIBCO EMS connection factory. Of course, when using TIBCO EMS, you also have to drop tibems.jar into your WebLogic $DOMAIN_HOME/lib directory and restart.
    There's a couple variants of how to point the JMS Adapter at TIBCO (so-called direct and indirect) -- tcp:// and tibjmsnaming:// respectively. The latter is better architecturally since you are using TIBCO's JNDI services rather than bypassing them. Examples for TIBCO EIS connection definitions are in the JCA Technical Adapter section of the Fusion Middleware documentation.
    From a SOA developer's point of view, their JMS service or reference definition is not provider-specific. The developer points to the JNDI name of the created JMS Adapter EIS connection, and specifies the destination (queue or topic) JNDI name. Remember, with TIBCO EMS, that destination name is TIBCO's JNDI name, not a local WebLogic JNDI name. (Caveat is that you can mash up WebLogic Foreign Server definition with EIS Connection Pool definition - I don't recommend this-- and in that case, the developer is using the local JNDI alias for the "foreign" TIBCO destination).
    JDeveloper:
    As you noticed, JDeveloper provides a wizard-assist to the developer for selecting a destination (queue or topic) only if the provider is WebLogic JMS or Oracle AQ. If it is a third-party provider, then there is no look-up. The developer just types the correct 3rd-party destination name (hopefully) value in.
    Hope this helps. My company uses SOA Suite with both WebLogic JMS and TIBCO EMS.
    Todd

  • Defining Stateful Session Bean Methods as Idempotent or NonIdempotent

    Hi,
              Is there any way to define a stateful session bean method as idempotent
              or non-idempotent. Is there a patch to do this if u want it in Weblogic
              6.0
              Thanks
              Sameer
              

    No, not right now... but BEA is looking into it. It has not been slated for
              a product release.
              They understand that certain getXXX methods of a stateful session bean could
              be idempotent and will look at that in the future.
              Tyler
              "Sameer Wadkar" <[email protected]> wrote in message
              news:[email protected]..
              > Hi,
              >
              > Is there any way to define a stateful session bean method as idempotent
              > or non-idempotent. Is there a patch to do this if u want it in Weblogic
              > 6.0
              >
              > Thanks
              > Sameer
              >
              

  • Cannot deploy a EJB 3.0 Session bean to the OAS 10.1.3.4

    Hi All,
    I am unable to deploy a EJB 3.0 Session bean with no deployment descriptors to OAS 10.1.3.4 App server.This Session bean is also exposed as a web service using annotations. I am able to deploy this bean to a standalone oc4j 10.1.3.x containers and test it successfully.
    i have written a simple stateless session bean ( exposed as webservice) and every bean is having issues with deployment having the same exception stated below
    Can some one please help as i need to deploy this urgently.
    below is the session bean code:
    import javax.ejb.Stateless;
    @Stateless(name="SiebelQuoteEJB")
    public class SiebelQuoteEJBBean implements SiebelQuoteEJBLocal,
    SiebelQuoteEJBWebService {
    public SiebelQuoteEJBBean() {
    public String publishMessage(String message,String type) throws java.rmi.RemoteException {
    client.publishMessage(message,type);
    return "SUCCESS";
    Below is the error while deploying:
    11/01/06 15:03:49 WARNING: Application.setConfig Application: javasso is in failed state as initialization failed.
    java.lang.NullPointerException
    11/01/06 15:03:50 WARNING: Application.setConfig Application: SiebelQuoteEJB is in failed state as initialization failed.
    java.lang.InstantiationException: Error initializing ejb-modules: null Error parsing application-server config file: null
    11/01/06 15:03:50 java.lang.NullPointerException
    at com.evermind.server.ObjectReferenceCleaner.cleanupApplicationLogLevels(ObjectReferenceCleaner.java:166)
    at com.evermind.server.ObjectReferenceCleaner.loaderDestroyed(ObjectReferenceCleaner.java:88)
    at oracle.classloader.EventDispatcher.loaderDestroyed(EventDispatcher.java:248)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1113)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1041)
    at com.evermind.server.ApplicationStateRunning.destroyClassLoaders(ApplicationStateRunning.java:1171)
    at com.evermind.server.Application.stateCleanUp(Application.java:3635)
    at com.evermind.server.Application.setConfig(Application.java:506)
    at com.evermind.server.Application.setConfig(Application.java:355)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
    at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:736)

    which jdk version? Had this with 1.6 and had to install an up-to-date jdbc.

  • Help !! Client for session bean

    I need your help for this roblem :
    I have deployed a session bean in helloClient.jar and wrote TestHello class to test the session bean.
    My problem ist to do this test ;i have tried with this command
    java -cp HelloClient.jar TestHello ,but it works not .
    Thanks.

    Without source code or any description of exceptions, your problem definition is useless.

Maybe you are looking for

  • Ipod nano help with syncing music to new computer?

    I have two ipod nanos, one 6th gen. the other 7th gen, and the laptop I had all the music on and synced from cant be accessed anymore, so how can I get the music onto a different computer and be able to sync new music to them?

  • IPhone only available from Cingular????

    Will other cellular companies be able to offer the iPhone? Wouldn't you know it....I just did the 2 year committment with Verizon!!!!!!!!! I'm thinking we need an iPhone topic area.... Powerbook 17 1.33   Mac OS X (10.4.8)  

  • Credit Memo Details in CRM_ORDER_READ

    Hi All, I have to read the credit memo details for a particular Opportunity.  For this can anyone let me know through which export parameter of FM CRM_ORDER_READ, we can find the Creadit Memo details of an Opportunity. Regards, Vinny

  • WH  tax line items cleared along with Other line items Message no:8I701

    hI guru, When i run J1INCHLN  System givem the error is : Withholding tax line items cleared along with other line items, message no:8I701 Pleas any one give solution .. I also cheked as respective g/l for tds IN FBL3N . All line items are opend. Als

  • Want to print ProRes to video

    We want to print to video a sequence which Color converted from HDV 1080p30 to ProRes 422HQ and don't see an output setting for ProRes 422HQ in A/V Devices under A/V settings. Any idea how we can do this?