How to use auto incremented tabe to create a CMP Entity Bean

hi,
I want create a CMP entitybean with an auto incremented table in
Oracel. So I need to know
- how to create a table with an auto-incremented field in oracel and
- how to change the create() method according to that.
I am using Sun studio enterprise for EJB developing.
kaushalya

For auto increment in Oracle you should use Sequence/Trigger combination.
And useful thread from EJB forum:
http://forum.java.sun.com/thread.jspa?forumID=13&threadID=478783

Similar Messages

  • RE: Consuming and Creating a CMP Entity Bean

    Hi There,
    I have been trying to find an answer for 1 day. I don't know ehre to look next.
    I am creating a CMP entity bean. I have created all the set and get mehtods as abstract functions. I have added a ejbCreate and a matching ejbPostCreate. The class code looks like this.
    public abstract class COrderBean implements EntityBean {
         protected EntityContext entctx;
         //abstract declarations of property accessors
         public abstract int getId();
         public abstract void setId(int intid);
         public abstract String getCustomerID();
         public abstract void setCustomerID(String strcustomerid);
         public abstract Date getDate();
         public abstract void setDate(Date datorder);
         public abstract String getNotes();
         public abstract void setNotes(String strnotes);
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void ejbRemove() {}
         public void ejbLoad() {}
         public void ejbStore() {}
         public void setEntityContext(EntityContext context)
              entctx = context;
         public void unsetEntityContext()
              entctx = null;
         public COrderPK ejbCreate()
              return null;
         public COrderPK ejbCreate(int new_id, String new_customerid, Date new_order_date, String new_notes) throws CreateException
              setId(new_id);
              setCustomerID(new_customerid);
              setDate(new_order_date);
              setNotes(new_notes);
              return new COrderPK(getId());
         public void ejbPostCreate(int id, String customerid, Date order_date, String notes) {}
    My client code works with both BMP entity beans and session beans. It is shown below. I am working with Sun's Application Server 8.0 and I created the database schema with the capture-schema.exe command.
    Properties prps = new Properties();
              props.put("javax.rmi.CORBA.UtilClass","com.sun.corba.ee.impl.javax.rmi.CORBA.Util");
              props.put("org.omg.CORBA.ORBClass","com.sun.corba.ee.impl.orb.ORBImpl");
              props.put("org.omg.CORBA.ORBSingletonClass","com.sun.corba.ee.impl.orb.ORBSingleton");
              Context context = new InitialContext(props);
              Object obj = context.lookup("corbaname:iiop:localhost:3700#COrderBean");
              //Object obj = context.lookup("entitybean.OrderItem");
                   IOrderHome home = (IOrderHome)PortableRemoteObject.narrow(obj,Class.forName("ctaejb.entitybean.order.IOrderHome"));
                   //use create
                   IOrderRemote remote = home.findByPrimaryKey(new COrderPK(1));
                   System.out.println(remote.getDate().toString());
    I am getting the follwing error. Can someone please help. Thanks in advance.
    WARNING: "IOP00810257: (MARSHAL) Could not find class"
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:7987)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
         at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
         at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
         at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
         at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
         at com.sun.corba.ee.spi.servicecontext.UEInfoServiceContext.<init>(UEInfoServiceContext.java:30)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.sun.corba.ee.spi.servicecontext.ServiceContextData.makeServiceContext(ServiceContextData.java:114)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.unmarshal(ServiceContexts.java:195)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:365)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:353)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:470)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:327)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:158)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at ctaejb.entitybean.order._IOrderHome_DynamicStub.findByPrimaryKey(_IOrderHome_DynamicStub.java)
         at mainapp.CTestApplication.main(CTestApplication.java:32)
    Caused by: java.lang.ClassNotFoundException
         ... 27 more
    org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.ee.spi.servicecontext.UEInfoServiceContext.<init>(UEInfoServiceContext.java:34)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.sun.corba.ee.spi.servicecontext.ServiceContextData.makeServiceContext(ServiceContextData.java:114)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.unmarshal(ServiceContexts.java:195)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:365)
         at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:353)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:470)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:327)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:158)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at ctaejb.entitybean.order._IOrderHome_DynamicStub.findByPrimaryKey(_IOrderHome_DynamicStub.java)
         at mainapp.CTestApplication.main(CTestApplication.java:32)

    Forget it. All the code works. I didn't know that the Sun App Server required a Persistence Manager to work with CMP entity beans. Once I added the persistence manager, all was OK. Have a good day.

  • How to use "Auto increment" in temp table Oracle

    Pleas tell me yaar,
    In MS Sql for Auto increment i am using like this "seqid int identity" for temp table
    t_seq_tbl table(seqid int identity,EVENT_SEQ_NO varchar(30))
    In oracle how to use....

    As far as I know there is not any auto increment data type in Oracle. Instead of this you should create a sequence and get the next value of the sequence while creating a row in your table.
    CREATE SEQUENCE Test_Sequence ;
    CREATE TABLE Test_Table ( Id NUMBER , Foo VARCHAR2(4) ) ;
    ALTER TABLE Test_Table ADD CONSTRAINT Test_Table_PK_Id PRIMARY KEY ( Id ) ;
    INSERT INTO Test_Table ( Id , Information ) VALUES ( Test_Sequence.NEXTVAL , 'FOO' ) ;

  • How to use auto-increment and search option for MS Access DB

    Dear All,
               I have configured our invoice in Adobe Livecycle and connected it to MS Acess 2007 as per http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/.
    All is working fine, I can insert, retrieve data from DB to invoice and vice versa.
    Now I want few things to be implemented on our invoice.
    When ever I open our invoice, it populate the first entry from DB, Is it possible to populate the last entry ?
    Auto increment invoice number from MS Access DB every time we open our invoice after save.
    How to implement search option from DB for invoice number ?
    Please let me know if someone can provide me help on my scenario, so that I can share more stuff related to invoice and DB.
    Look forward to hearing soon from experts and other team members.
    Thanks & Regards
    Riyad...

    As far as I know there is not any auto increment data type in Oracle. Instead of this you should create a sequence and get the next value of the sequence while creating a row in your table.
    CREATE SEQUENCE Test_Sequence ;
    CREATE TABLE Test_Table ( Id NUMBER , Foo VARCHAR2(4) ) ;
    ALTER TABLE Test_Table ADD CONSTRAINT Test_Table_PK_Id PRIMARY KEY ( Id ) ;
    INSERT INTO Test_Table ( Id , Information ) VALUES ( Test_Sequence.NEXTVAL , 'FOO' ) ;

  • Using a BLOB data type in a CMP Entity Bean??

    Hi all,
    i am trying to store blob type data using entity bean, The corresponding field in the Entity bean is defined with data type byte[ ] , and i'm getting error while creating entity bean, could anyone please help me!
    This is the error:
    [6/7/06 11:19:05:559 EEST] 5b7936b5 ExceptionUtil E CNTR0019E: Non-application exception occurred while processing method "create". Exception data: com.ibm.ejs.container.CreateFailureException: ; nested exception is:
         javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
    javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
    com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
         at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown Source)
         at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.executeCreate(Unknown Source)
         at com.ibm.ws.ejbpersistence.beanextensions.CBNotExistState.ejbCreate(Unknown Source)
         at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbPostCreate(Unknown Source)
         at org.epo.dg3.task.ConcreteDocStore_5418fe50.ejbPostCreate(ConcreteDocStore_5418fe50.java:133)
         at org.epo.dg3.task.EJSCMPDocStoreHomeBean_5418fe50.create_Local(EJSCMPDocStoreHomeBean_5418fe50.java:29)
         at org.epo.dg3.task.EJSLocalCMPDocStoreHome_5418fe50.create(EJSLocalCMPDocStoreHome_5418fe50.java:23)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.etools.utc.model.ReflectionMethodModel.invoke(ReflectionMethodModel.java:68)

    Try to use the OCI native driver instead of THIN.

  • How to use auto increment with "nchar" data type

    Hello
    I have a table that I want the value in one column to be generated automatically with "T-XXX" pattern which
    "XXX" is a number. Can Microsoft SQL Server do that?

    Hello,
    Not directly.
    You could use an integer column with "Identity" and then add a calculated column to generate the required pattern, like
    'T' + convert(varchar, YourIntColumn)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Using a BLOB data type in a CMP Entity Bean: Error when send large files

    I've successfully impleenting BLOB in my EJB. But the main prob is, it can only work on small file which is around 3K. Any larger files than that will caused error (refer below). I got info from a friend which is using normal JDBC call to insert a file into BLOB column that you can't use java.sql.Blob data type which will have this limitation. He suggested that by using oracle.sql.BLOB, this prob won't exist.
    The problem is I'm unable to use oracle.sql.BLOB in my CMP EJB because in the jbosscmp-jdbc.xml, I'm able to specify the normal BLOB only which is java.sql.Blob (Refer below).
             <cmp-field>
                <field-name>attachment</field-name>
                <column-name>attch</column-name>
                <jdbc-type>BLOB</jdbc-type>
                <sql-type>BLOB</sql-type>
            </cmp-field>So, how do I solve this problem? I need to store files which the size is much bigger than that. I'm using JBoss 4 as my app server and Oracle 9i as my DB. I can see that there's many ppl facing this prob, but no solution to it. Pls advise. Thanks.
    20:03:34,218 INFO [Server] JBoss (MX MicroKernel) [4.0.1RC1 (build: CVSTag=JBoss_4_0_1_RC1 date=200411041143)] Started in 1m:49s:828ms
    20:05:01,640 ERROR [EBCreditApplAttch] Could not create entity
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:982)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2051)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1961)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
         at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:316)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCAbstractCreateCommand.java:328)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:286)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
         at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
         at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:612)
         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:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
         at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
         at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
         at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
         at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
         at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
         at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:100)
         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
         at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
         at org.jboss.ejb.Container.invoke(Container.java:878)
         at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
         at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
         at $Proxy94.create(Unknown Source)
         at com.infopro.dt.app.ca.ejb.SBCreditApplAttch.setCreditApplAttch(SBCreditApplAttch.java:148)
         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:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
         at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    20:05:01,656 ERROR [JDBCUtil] SQL error
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:982)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
         at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:105)
         at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:565)
         at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:824)
         at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:346)
         at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:280)
         at org.jboss.resource.adapter.jdbc.WrappedStatement.internalClose(WrappedStatement.java:782)
         at org.jboss.resource.adapter.jdbc.WrappedStatement.close(WrappedStatement.java:52)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.safeClose(JDBCUtil.java:92)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:310)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
         at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
         at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:612)
         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:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
         at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
         at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
         at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
         at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
         at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
         at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:100)
         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
         at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
         at org.jboss.ejb.Container.invoke(Container.java:878)
         at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
         at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
         at $Proxy94.create(Unknown Source)
         at com.infopro.dt.app.ca.ejb.SBCreditApplAttch.setCreditApplAttch(SBCreditApplAttch.java:148)
         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:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
         at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    20:05:01,672 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@87b71b[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@225f0 handles=0 lastUse=1110456252484 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@108bef4 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1309516]
    org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)
         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:541)
         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:255)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:539)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:329)
         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:552)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:407)
         at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:699)
         at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
         at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1674)
         at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:312)
         at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.sql.SQLException: Io exception: Software caused connection abort: socket write error
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
         at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1438)
         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:251)
         ... 38 more
    20:05:01,687 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] errorCode=XA_UNKNOWN(0)
    org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error))
         at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:702)
         at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
         at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1674)
         at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:312)
         at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)
         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:541)
         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:100)
         at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:695)
         ... 33 more
    Caused by: java.sql.SQLException: Io exception: Software caused connection abort: socket write error
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
         at oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java:1344)
         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:96)
         ... 34 more
    20:05:01,718 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] errorCode=XA_UNKNOWN(0)
    org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in rollback: expected: null, got: XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=1, localId=17]
         at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:774)
         at org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2165)
         at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1727)
         at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)
         at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    20:05:01,734 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void com.infopro.dt.app.ca.ejb.SBCreditApplAttchRemote.setCreditApplAttch(com.infopro.dt.app.ca.ejb.DTOCreditApplAttch) throws javax.ejb.CreateException,java.lang.Exception,java.rmi.RemoteException, causedBy:
    org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] status=STATUS_NO_TRANSACTION; - nested throwable: (org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)))
         at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344)
         at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:856)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
         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:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception

    Try to use the OCI native driver instead of THIN.

  • How to load the existing data from the databse in the CMP entity bean?

    hello
    my problem is as follows--
    i am creating a CMP entity bean.in these beans client create the data instances using create() function.
    now a entity bean will be created for the newly created data and it's EJBObject will also be formed.
    now we will be able to perform finder methods over them.
    remember these data has been newly created in the database.
    but now if i want to perform the finder methods on the
    existing data in the database( i don't need to use create() fn as i am not "creating" the data.). how will i perform the query over the existing data.
    basically i have to make a CMP bean to extract the data corresponding to a particular condition , from the database table. i don't want to create the data in the database but just find out what data satisfies my condition.
    thanking you
    Prashant

    you have to use findByXXX methods. depending on your appserver you may have to declare them (and eventually the query you want to be used) in the vendor specific deploiement descriptor.
    (e.g. using jboss i don't remember having explicitly declare the findBySomeField method - where someField is a persistent field - in the dd, whereas with bas all finder methods have to be explicitly declared)
    [note that obviously these methods have to be present in your home interface]

  • I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?

    I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?

    We didn't do that video. Why are you asking here?
    Those videos are usually outdated....
    Use the current tools etc., in the iOS Dev Center and iTunes/iTunes U ~ Stanford.

  • Using oracle db sequence for auto generating of PKs for CMP entity beans

    Hi,
    I have read quite a number of threads about (auto) generation of keys for primary keys for the CMP entity beans.
    My requirement is I am migrating an application deployed on Weblogic to oc4j. The application is using cmp entity beans with auto key generation using a sequence in the Oracle db. This is specified in weblogic-cmp-rdbms-jar.xml file like below:
    <automatic-key-generation>
    <generator-type>Oracle</generator-type>
    <generator-name>REPUSER.DEPT_REPORT_SEQ</generator-name>
    <key-cache-size>1</key-cache-size>
    </automatic-key-generation>
    In the ejb-jar.xml, it is specified as:
    <prim-key-class>java.lang.Integer</prim-key-class>
    <primkey-field>id</primkey-field>
    Now, I need to migrate this to oc4j. Can somebody suggest me options and clarify my questions kindly?
    1) I have read articles that say that in the ejb-jar.xml, we need to specify <prim-key-class>java.lang.Object</prim-key-class> and this will create a column called 'autoid' in the respective entity table in the Oracle db.
    - How can I use this to assign the value to my primary field, say, id?
    2) Now, with the latest oc4j, can I use Oracle database sequence as the key generator for the values of the PKs just by specifying in the xml descriptor ejb-jar.xml?
    2.a) If yes, is there any article that explains with the code?
    2.b) If no, what are the alternatives I have?
    I have read many discussions that say that we can create a stateless session bean that can lookup the database sequence using simple JDBC call to return the nextval of the sequence. The SSB should be called in the ejbCreate() of the entity bean.
    My related question is, what is recommended for oc4j? What are limitations of the various options for the latest oc4j available?
    How should I go about deploying this kind of ejbs in oc4j?
    Any help and pointers are welcome. Please help.
    Thanks a lot.
    Vadi

    Hello ,
    Instead of exposing a get/set method for each arribute of your bean (corresponding to database table) expose only one object.
    For example
    public class CustomerBean implements javax.ejb.EntityBean{
    private CustomerVO objCustomer;
    private String customerName;
    private String customerMail;
    private String customerType;
    public CustomerVO getCustomer(){
    return this.objCustomer;
    public void setCustomer(CustomerVO objCustomer){
    this.objCustomer = objCustomer;
    public void ejbStore(){
    customerName = objCustomer.getName();
    customerMail = objCustomer.getMail();
    customerType = objCustomer.getType();
    HTH
    VJ

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

  • Using a CMP Entity Bean local stub as a field of another CMP Entity Bean

    Hello,
    Is it possible to implement a field of a CMP Entity bean as another CMP Entity bean and how is it done?
    I've seen a pseudo code for this in Ed Roman's Mastering EJBs, second edition, but I can't seem to get it to work (pages: 330 - 1:1 using CMP and 339 - fake M:N using CMP).
    I'm using SUN ONE Application Sever 7. Is this server capable of this?
    I'm trying to implement a fake M:N relationship using 3 beans: 2 for each side of the relationship and one as the "bridge" table.
    For example, the two beans on each side of the relationship are SubscriberBean, SubscriptionBean and the "bridge: bean is SubscriberSubscriptionBean. The SubscriberSubscriptionBean has two fields: SubscriberLocal stub and SubscriptionLocal stub.
    Please let me know if you need more information to answer this question.
    Thanks.
    Nikola

    Im sorry but i dont know about the example you are talking about. I kinda learn
    all those techniques from forums, articles and tutorials because book often suffer from
    not having the information im mostly looking for.
    As far as i understand you, you want to implement a bridge been, which is representing a row in a join table. So that if one side of the relation is deleted the join-table entry (your bridge-CMP-Bean) is cascaded. Right?
    First of all the simple part: (My approach)
    - The joint table is foreign keys only - without a relation description. -
    In this case you dont have to implement a bridge bean. Because it just wouldnt represent anything of sense.
    Lets think of an entity/table USER whith the columns name (PRIMARY KEY), and prename.
    Our second entity/table is ADDRESS with the columns road (PRIMARY KEY) and housenr.
    The join table is simply: USER_ADDRESS with fk_name (FOREIGN KEY) and fk_road (FOREIGN KEY) both on CASCADE DELETE. So if the address is deleted the mapping entry is deleted, too same for the user part:
    USER -> USER_ADDRESS <- ADDRESS.
    Our entity Beans are called User and Address in class-names JNDI-names and names.
    Now we want to create the CMR mapping so we can access the addresses of a user from the user bean directly. The methods on the user side are:
    public abstract Collection getAddresses();
    and
    public abstract void setAddresses(Collection new_addresses);
    the xdoclet comments on the User side are (for the getter only)
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "User-Addresses"
    *                target-ejb = "Address"
    *                target-multiple = "true"
    * @sunone.relation
    *                column="USER_ADDRESS.fk_name"               
    *                target="USER_ADDRESS.fk_road"               
    public abstract Collection getAddresses();
    for the other side of the relation we define in the Address-Entity
    public abstract Collection getUsers();
    and
    public void setUsers(Collection users);
    the xdoclet comments on the Address side are (for the getter only)
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "Address-User"
    *                target-ejb = "User"
    *                target-multiple = "true"
    * @sunone.relation
    *                target="USER_ADDRESS.fk_road"               
    *                column="USER_ADDRESS.fk_name"
    As we dont want the user or address to be deleted if the other side of the relation is deleted we dont specify cascade-delete="yes" in the ejb.relation namespace.
    The sun-cmp-mappings.xml should now look like this:
    (For the User - side)
    <!-- Relationship User-has-Addresses, role User-Addresses -->
    <cmr-field-mapping>
    <cmr-field-name>addresses</cmr-field-name>
    <column-pair>
    <column-name>USER_ADDRESS.fk_name</column-name>
    <column-name>USER_ADDRESS.fk_road</column-name>
    </column-pair>
    </cmr-field-mapping>
    and similar on the Address-Side:
    <cmr-field-mapping>
    <cmr-field-name>users</cmr-field-name>
    <column-pair>
    <column-name>USER_ADDRESS.fk_road</column-name>
    <column-name>USER_ADDRESS.fk_name>/column-name>
    </column-pair>
    </cmr-field-mapping>
    Dont forget that all elements in the Collection must be of the right Interface-type.
    First of all the harder part:
    Now what you might want is when the relation has some information specified like user live at address and is tenant or facility manager.
    The, in the first step you will have to implement the UserAddressRelation entity which will have to CMR fields of the 1:N type.(Just as you wish)
    Lets think of the example above extended by the relation type. Our relation bean is named UserAddressRelation.
    Now User has the methods as above but the classes in the Collection must now be of the UserAddressRelationLocal/Remote interface and not AddressLocal/Remote-interface.
    You will have to change the xdoclet comment to:
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "User-Address"
    *                target-ejb = "UserAddressRelation"
    *                target-multiple = "true"
    * @sunone.relation
    *                target="USER_ADDRESS.fk_name"               
    *                column="USER.name"
    So we now dont reference the other side bean directly. We reference the relation EntityBean. Do the similar changes on the other side.
    In particular you will have to specify 4 CMR mappings now:
    1. User to UserAddressRelation 1:N
    2. UserAddressRelation N:1
    3. Address to UserAddressRelation 1:N
    4. UserAddressRelation N:1
    Which i dont want to explain in detail now because its kinda all the same as above.
    Now you cann access the Addresses of a user in the way.
    UserLocal.getAddresses(); <- !you get the mappings!
    UserLocal.getAddresses().item(0).getAddress() <- you get the address (this is dirty coding just for understanding)
    UserLocal.getAddresses().item(0).getUserRole() <. you get the role of the user at this address.
    Hope this helped you. You are welcome to ask any detailed question.

  • How to disable cache implementation in 8.1 SP6 for entity beans

    How to disable cache implementation in 8.1 SP6 for entity beans
    In our production environment, we want to disable cache implementation for entity beans. We are using weblogic 8.1 SP6.
    Weblogic cache implementation has been causing many cachefull exceptions so we want that it fetches the data from database everytime instead of cache.

    Check the "max-beans-in-cache" setting in your weblogic-ejb-jar.xml. The cache full exception, means that a new bean could not be created because of this cache being full.
    Nothing to do with fetching from the database directly.
    If you really want direct fetches then do not use beans at all. Consider using direct JDCB/SQL calls (without a entity bean) to fetch huge data.
    Let's again review your application based on the below explanation before making a decision on which configuration change to perform:
    If you truly have many ejbs simultaneously enrolled in transactions, then yes, the cache must be big enough to hold all the instances.
    Your cache must have a max size large enough to handle your peak simultaneous transaction load.
    Also, try to ask the following query to your application developer. Does every user actually have to have more than one bean in the cache ? Are many of these values read-only reference values that are not updated ?
    SOLUTION CHOICE:
    1. If you are testing with more number of users simultaneously, then you will need to increase the "max-beans-in-cache" setting in your weblogic-ejb-jar.xml to match the load.
    2. If you have few users but still seeing a lot of beans, then consult with your application developer and try to ask the above questions (Does every user have more than......) and based on that try to redesign/tune your application to make it an effective Entity bean model.
    3. If you have queries where huge result sets are returned, consider using plain/direct JDB/SQL calls.
    Arun

  • Problem in creating CMP Entity Bean - Pls Help

    I am trying to build one simple project having jsps to get connected to CMP Entity Bean.
    But while deploying I am getting the following error...
    Nov 15, 2004 10:59:09... Info: End of log messages of the target system.
    Nov 15, 2004 10:59:09... Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Nov 15, 2004 10:59:09... Error: Execution of deployment action for "EntityCMPAppln" aborted:
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application bcone.com/EntityCMPAppln and wait.
    Reason: Complex error : server ID 6155350:Application bcone.com/EntityCMPAppln cannot be started, because it has hard reference to resource CONFIG_DB with type javax.sql.DataSource, but it is not active on the server.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Nov 15, 2004 10:59:09... Error: Deployment NOT successful for EntityCMPAppln
    Nov 15, 2004 10:59:09... Info: SDM configuration: Do not automatically start/stop J2EE Engine. Do not restore state of J2EE Engine now.
    Nov 15, 2004 10:59:09... Error: -
    At least one of the Deployments failed -
    Nov 15, 2004 11:05:16... Info: Request for Logon as admin accepted
    ===========================================
    Nov 15, 2004 11:05:08... Info: =   Starting to execute command 'remotegui'   =
    Nov 15, 2004 11:05:08... Info: ===============================================
    Nov 15, 2004 11:05:10... Info: SDM started successfully.
    Please tell me how to activate the CONFIG_DB reference in database. Or what Extra I have to do to run this example.
    Regards,
    Vivek Ojha

    Dear Benny,
    The code of the required files is pasted below....
    Application.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
                                 "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
        <display-name>EntityCMPAppln</display-name>
        <description>EAR description</description>
        <module>
            <ejb>EntityCMPEjb.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>EntityCMPWeb.war</web-uri>
                <context-root>/student</context-root>
            </web>
        </module>
    </application>
    Application-j2ee-engine.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
         <provider-name>bcone.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    data-source-aliases.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE data-source-aliases SYSTEM "data-source-aliases.dtd">
    <data-source-aliases>
         <aliases>
              <data-source-name>${com.sap.datasource.default}</data-source-name>
              <alias>STUDENTDB</alias>
         </aliases>
    </data-source-aliases>
    ejb-j2ee-engine.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
    <ejb-j2ee-engine>
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>StudentBean</ejb-name>
                   <resource-ref>
                        <res-ref-name>jdbc/STUDENTDB</res-ref-name>
                        <res-link>STUDENTDB</res-link>
                   </resource-ref>
                   <entity-props/>
              </enterprise-bean>
         </enterprise-beans>
    </ejb-j2ee-engine>
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <entity>
                   <ejb-name>StudentBean</ejb-name>
                   <home>com.bcone.ejb.StudentHome</home>
                   <remote>com.bcone.ejb.Student</remote>
                   <ejb-class>com.bcone.ejb.StudentBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>StudentBean</abstract-schema-name>
                   <cmp-field>
                        <field-name>studentId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>lname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>standard</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>fyear</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>fname</field-name>
                   </cmp-field>
                   <primkey-field>studentId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdbc/STUDENTDB</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
              </entity>
         </enterprise-beans>
    </ejb-jar>
    persistent.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE persistent-ejb-map SYSTEM "persistent.dtd">
    <persistent-ejb-map>
         <locking
              type="Table"/>
         <db-properties>
              <data-source-name>CONFIG_DB</data-source-name>
              <database-vendor
                   name="SAPDB"/>
         </db-properties>
         <entity-beans>
              <entity-bean>
                   <ejb-name>StudentBean</ejb-name>
                   <table-name>TMP_STUDENTNEW</table-name>
                   <field-map
                        key-type="PrimaryKey">
                        <field-name>studentId</field-name>
                        <column>
                             <column-name>STUDENTID</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>lname</field-name>
                        <column>
                             <column-name>LNAME</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>standard</field-name>
                        <column>
                             <column-name>STANDARD</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>fyear</field-name>
                        <column>
                             <column-name>FYEAR</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>fname</field-name>
                        <column>
                             <column-name>FNAME</column-name>
                        </column>
                   </field-map>
              </entity-bean>
         </entity-beans>
         <relationships/>
    </persistent-ejb-map>
    StudentBean.java
    package com.bcone.ejb;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    import javax.ejb.CreateException;
    @abstractSchemaName StudentBean
    @cmpVersion 2.x
    @ejbHome <{com.bcone.ejb.StudentHome}>
    @ejbPrimaryKey <{java.lang.String}>
    @ejbRemote <{com.bcone.ejb.Student}>
    @hasSimplePK true
    public abstract class StudentBean implements EntityBean {
         public void ejbLoad() {
         public void ejbStore() {
         public void ejbRemove() throws RemoveException {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setEntityContext(EntityContext context) {
              myContext = context;
         public void unsetEntityContext() {
              myContext = null;
         private EntityContext myContext;
    @primKeyField
         public abstract String getStudentId();
         public abstract void setStudentId(String studentId);
         public abstract String getLname();
         public abstract void setLname(String lname);
         public abstract String getFname();
         public abstract void setFname(String fname);
         public abstract String getStandard();
         public abstract void setStandard(String standard);
         public abstract String getFyear();
         public abstract void setFyear(String fyear);
    Create Method.
         public String ejbCreate(
              String studentId,
              String fname,
              String lname,
              String standard,
              String fyear)
              throws CreateException {
              setStudentId(studentId);
              setFname(fname);
              setLname(lname);
              setStandard(standard);
              setFyear(fyear);
              return null;
    Post Create Method.
         public void ejbPostCreate(
              String studentId,
              String fname,
              String lname,
              String standard,
              String fyear) {
              // TODO : Implement
    StudentData.java
    Created on Nov 14, 2004
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.bcone.data;
    @author Administrator
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class StudentData {
         private String studentId;
         private String fname;
         private String lname;
         private String standard;
         private String fyear;
    @return
         public String getFname() {
              return fname;
    @return
         public String getFyear() {
              return fyear;
    @return
         public String getLname() {
              return lname;
    @return
         public String getStandard() {
              return standard;
    @return
         public String getStudentId() {
              return studentId;
    @param string
         public void setFname(String string) {
              fname = string;
    @param string
         public void setFyear(String string) {
              fyear = string;
    @param string
         public void setLname(String string) {
              lname = string;
    @param string
         public void setStandard(String string) {
              standard = string;
    @param string
         public void setStudentId(String string) {
              studentId = string;
    student.jsp
    <%@ page language="java" %>
    <html>
         <head>
              <title>
                   Title
              </title>
         </head>
         <body>
              <form method="POST" action="WEBBOT-SELF" name="Student" onSubmit="">
      <!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"
      S-Format="TEXT/CSV" S-Label-Fields="TRUE" ><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!webbot
      bot="SaveResults" endspan -->
      <br>
      <a href="/student/manageStudent.jsp?action=add" method="post"> Create </a>   
      <a href="/student/manageStudent.jsp?action=modify" method="post"> Modify </a>   
      <a href="/student/manageStudent.jsp?action=delete" method="post"> Delete </a>
      <br><br>
      <table border="1" width="32%">
        <tr>
          <td width="39%">Student ID </td>
          <td width="61%"><input type="text" name="studentId" size="20"></td>
        </tr>
        <tr>
          <td width="39%">First Name</td>
          <td width="61%"><input type="text" name="fname" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Last Name</td>
          <td width="61%"><input type="text" name="lname" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Standard</td>
          <td width="61%"><input type="text" name="standard" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Fiscal Year</td>
          <td width="61%"><input type="text" name="fyear" size="20"></td>
        </tr>
        <tr>
          <td width="39%" align="center"><input type="submit" value="Submit" name="submit"></td>
          <td width="61%" align="center"><input type="reset" value="Reset" name="reset"></td>
        </tr>
      </table>
    </form>
         </body>
    </html>
    mamageStudent.jsp
    <%@ page language="java"
    import="javax.naming.,java.sql.,javax.sql,com.bcone.ejb."
    %>
    <html>
         <head>
              <title>
                   Manage Student
              </title>
         </head>
         <body>
              <h1>
              </h1>
    <jsp:useBean id="stu" class="com.bcone.data.StudentData" ></jsp:useBean>
    <jsp:setProperty name="stu" property="*" />
    <%
    try {
         InitialContext ctx = new InitialContext();
         StudentHome home = (StudentHome) ctx.lookup("java:comp/env/StudentBean");
         String str = request.getParameter("action");
         if("action".equals(str)) {
              Student rem = home.create(remote.setFname(stu.getStudentId(),stu.getFname(),stu.getLname(),stu.getStandard(),stu.getFyear());
              out.println(stu.getStudentId() + "Student Created");
         } else if ("modify".equals(str)) {
              Student remote  = home.findByPrimaryKey(stu.getStudentId());
              remote.setFname(stu.getFname());
              remote.setFname(stu.getLname());
              remote.setFname(stu.getStandard());
              remote.setFname(stu.getFyear());
              out.println(stu.getStudentId() + "Student modified");
         } else if ("delete".equals(str)) {
              Student stu1  = home.findByPrimaryKey(stu.getStudentId());
              stu1.remove();
              out.println(stu.getStudentId() + "Student deleted");
    } catch (Exception e) {
         out.println("Exception e"+e.toString());
    %>
         </body>
    </html>
    Regards,
    Vivek Ojha

  • Help:How to manage relationships in CMP Entity beans

    Hi everybody;
    I am using Oracle JDeveloper 9i release 2 and Oracle 9i database.
    How can I manage one-to-many and many-to-many relationships in a CMP Entity Bean, I tried to managed the relationships in code, calling the beans, searching for records, making loops and joining.
    Is there a better way to manage the relationships with out doing this in code?
    Because I think it is not good for performance.
    Regards Francisco

    public void selectCurriculum(ValueChangeEvent event){
    logger.info(event.getNewValue().getClass());
    Integer id = (Integer) event.getNewValue();
    Collection curriculums = curriculums().getCurriculums();
    ObjectCurriculum curriculum = null;
    for (Iterator iterator = curriculums.iterator(); iterator.hasNext();) {
    ObjectCurriculum objectCurriculum = (ObjectCurriculum) iterator.next();
    if(objectCurriculum.getId().equals(id)){
    curriculum = objectCurriculum;
    break;
    curriculum().setWholeObject(curriculum);
    logger.info("setting current curriculum");
    no message is logged

Maybe you are looking for

  • Field in ALV for ME51N/ME52N/ME53N

    Hi. I want to include a field in the ALV of transactions for purchase requisitions. I have already enhanced the structure CI_EBANDB with the new fields, so the fields are already in MEREQ3211GRID. What else I have to do to have this fields available

  • Customize Access Requried page with code behind attached to it in sharepoint 2010

    Hi, I have modified default AccessDenied page to my custom accessdenied.aspx page and put Request Access button on it and javascript client side redirection to my requestaccess (reqestaccess.aspx, reqestaccess.aspx.cs) application page. Here the prob

  • Converting pdf to excel

    I am using acrobat pro 9.0 with windows vista home premium and am trying to convert a twenty three page pdf file to excel xml. I am using excel 2010.  I have converted two pages separately at a test, then the entire file via "export".  The exported f

  • Xerox 7328 workstation printer not working in Arch x86_64

    Hi I've converted from Ubuntu to Arch.  My Xerox 7328 was working in ubuntu jaunty 9.04 perfectly with a special ppd file given to us by Xeorox.  In Arch, the printer just spews out blank paper.  I have tried downgrading cups to 1.3.9 as per what Jau

  • Office 2003 Sevice Pack 3 Showing As Not Applicable For Clients Needing It.

    have some office 2003 (Hebrew) client not installing SP3. WSUS server shows "not applicable" for these clients. update with "Microsoft Update" from internet shows SP3 as valid update. WSUS server is configured to automaticly approve revisons. Thanks