Javax.ejb.NoSuchEntityException
The current implementation uses MDB to post business requests to the WL server
to execute asynchronously. The MDB in turn calls business EJB (Stateless) method
to accomplish the task. The business EJB "invoke" method processes each request
in a for loop.
Attributes of the business EJB method "invoke"...
* @ejbgen:local-method
* transaction-attribute = Required
* isolation-level = TRANSACTION_READ_COMMITTED
After commit is being issued by the WL container the exception
javax.ejb.NoSuchEntityException is thrown when the MDB request contains multiple
entries (say 50-60 entries are packed in a request HashMap)
What could be the possible reason behind the exception which is very infrequent
and did not appear when the number of entries in the request are fairly low (say
5 - 10)?
Stack trace:
===================================================================
javax.ejb.NoSuchEntityException: Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found.
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.__WL_store(STSpotEntity_606cze__WebLoic_CMP_RDBMS.java:7599)
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.ejbStore(STSpotEntity_606cze__WebLogi_CMP_RDBMS.java:7096)
at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java:266)
at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:397)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:528)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
####<30-Jul-03 16:41:12 GMT> <Error> <EJB> <shark> <StellarNIIT2Managed1> <ExecuteThread:
'8' for queue: 'default'> <c4user>
<> <010026> <Exception during commit of transaction Name=[EJB com.c4.stellar.server.ejbs.spot.STSpotBean.invoke(java.lang.Sting,java.util.Map)],Xid=25079:8c09bfe694c7c05a(477170),Status=Rolled
back. [Reason=javax.ejb.NoSuchEntityException: Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found.],numRepliesOwedMe=0,numRepliesOwedOther=0,seconds since begin=3,seconds
left=10,ServerResourceInfo[oraclePoolA]=state=rolledback,assigned=StellarNIIT2Managed1),SC
nfo[StellarNIIT2+StellarNIIT2Managed1]=(state=rolledback),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB comc4.stellar.server.ejbs.spot.STSpotBean.invoke(java.lang.String,java.util.Map)]}),local
properties=({modifiedListeners=[webloic.ejb20.internal.TxManager$TxListener@7b645,
weblogic.ejb20.internal.TxManager$TxListener@686cb9]}),OwnerTransactionManager
ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=StellarNIIT2Managed1+150.135.2.60:12001+StellarNIIT2+,
Resources={})],CordinatorURL=StellarNIIT2Managed1+150.135.2.60:12001+StellarNIIT2+):
javax.ejb.NoSuchEntityException: Bean with primary key:
'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b' not found.
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.__WL_store(STSpotEntity_606cze__WebLoic_CMP_RDBMS.java:7599)
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.ejbStore(STSpotEntity_606cze__WebLogi_CMP_RDBMS.java:7096)
at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java:266)
at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:397)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:528)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=weblogic.ejb20.internal.TxManager$TxL
stener@7b645
Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found. - with nested exception:
[javax.ejb.NoSuchEntityException: Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not foud.]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
We are using WL 6.1 with SP5.
"Chandra" <[email protected]> wrote:
>
The current implementation uses MDB to post business requests to the
WL server
to execute asynchronously. The MDB in turn calls business EJB (Stateless)
method
to accomplish the task. The business EJB "invoke" method processes each
request
in a for loop.
Attributes of the business EJB method "invoke"...
* @ejbgen:local-method
* transaction-attribute = Required
* isolation-level = TRANSACTION_READ_COMMITTED
After commit is being issued by the WL container the exception
javax.ejb.NoSuchEntityException is thrown when the MDB request contains
multiple
entries (say 50-60 entries are packed in a request HashMap)
What could be the possible reason behind the exception which is very
infrequent
and did not appear when the number of entries in the request are fairly
low (say
5 - 10)?
Stack trace:
===================================================================
javax.ejb.NoSuchEntityException: Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found.
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.__WL_store(STSpotEntity_606cze__WebLoic_CMP_RDBMS.java:7599)
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.ejbStore(STSpotEntity_606cze__WebLogi_CMP_RDBMS.java:7096)
at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java:266)
at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:397)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:528)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
####<30-Jul-03 16:41:12 GMT> <Error> <EJB> <shark> <StellarNIIT2Managed1>
<ExecuteThread:
'8' for queue: 'default'> <c4user>
<> <010026> <Exception during commit of transaction Name=[EJB com.c4.stellar.server.ejbs.spot.STSpotBean.invoke(java.lang.Sting,java.util.Map)],Xid=25079:8c09bfe694c7c05a(477170),Status=Rolled
back. [Reason=javax.ejb.NoSuchEntityException: Bean with primary key:
'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found.],numRepliesOwedMe=0,numRepliesOwedOther=0,seconds since begin=3,seconds
left=10,ServerResourceInfo[oraclePoolA]=state=rolledback,assigned=StellarNIIT2Managed1),SC
nfo[StellarNIIT2+StellarNIIT2Managed1]=(state=rolledback),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB comc4.stellar.server.ejbs.spot.STSpotBean.invoke(java.lang.String,java.util.Map)]}),local
properties=({modifiedListeners=[webloic.ejb20.internal.TxManager$TxListener@7b645,
weblogic.ejb20.internal.TxManager$TxListener@686cb9]}),OwnerTransactionManager
ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=StellarNIIT2Managed1+150.135.2.60:12001+StellarNIIT2+,
Resources={})],CordinatorURL=StellarNIIT2Managed1+150.135.2.60:12001+StellarNIIT2+):
javax.ejb.NoSuchEntityException: Bean with primary key:
'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b' not found.
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.__WL_store(STSpotEntity_606cze__WebLoic_CMP_RDBMS.java:7599)
at com.c4.stellar.server.ejbs.entities.STSpotEntity_606cze__WebLogic_CMP_RDBMS.ejbStore(STSpotEntity_606cze__WebLogi_CMP_RDBMS.java:7096)
at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java:266)
at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:397)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:528)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync=weblogic.ejb20.internal.TxManager$TxL
stener@7b645
Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not found. - with nested exception:
[javax.ejb.NoSuchEntityException: Bean with primary key: 'com.c4.stellar.server.ejbs.entities.STSpotEntityPK@61808b'
not foud.]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:228)
at com.c4.stellar.server.ejbs.spot.STSpotBean_uenbp9_ELOImpl.invoke(STSpotBean_uenbp9_ELOImpl.java:45)
at com.c4.stellar.server.ejbs.dispatcher.STDispatcherHelper.dispatch(STDispatcherHelper.java:515)
at com.c4.stellar.server.ejbs.messaging.STJMSQueueReceiverBean.onMessage(STJMSQueueReceiverBean.java:50)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:268)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:220)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1887)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1833)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
Similar Messages
-
Javax.ejb.NoSuchObjectLocalException when removing entitybean
Weblogic 10.3.0.0
EJB 2.1
Hi. I am using the below code to remove a record in the database. But it happens that I get a javax.ejb.NoSuchObjectLocalException.
Before this code is executed, I load the data from the database and create a list of sealsInfoTO that has to be removed, so I only get sealsInfoTO that exists in the database.
It all is in the same transaction that is started in a session bean.
It is not only happening with the seals, but also other objects that goes through likewise code
Iterator removedIterator = seals.removedIterator();
while (removedIterator.hasNext()) {
sealsInfoTO = (SealsInfoTO) removedIterator.next();
if ((sealsId = sealsInfoTO.getSealsId()) != null) {
sealsInfoLocal = BeanFactory.getInstance().getSealsInfoLocal(sealsId);
try {
sealsInfoLocal.remove();
log.debug("sealsInfoLocal with pk " + sealsId + " has been removed by the client");
} catch (RemoveException e) {
log.error("Can not remove SealsInfo", e);
throw new SystemException("Can not remove SealsInfo", e);
javax.ejb.NoSuchObjectLocalException: [EJB:010142]Instance of EJB 'SealsInfo' with primary key '183109' does not exist.: javax.ejb.NoSuchEntityException: [EJB:010142]Instance of EJB 'SealsInfo' with primary key '183109' does not exist.
at dk.steria.exp.midtier.model.declaration.ejb.SealsInfo_tjm27k__WebLogic_CMP_RDBMS.ejbRemove(SealsInfo_tjm27k__WebLogic_CMP_RDBMS.java:2682)
at weblogic.ejb.container.manager.DBManager.remove(DBManager.java:1661)
at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:129)
at dk.steria.exp.midtier.model.declaration.ejb.SealsInfo_tjm27k_ELOImpl.remove(SealsInfo_tjm27k_ELOImpl.java:646)
at dk.steria.exp.midtier.tools.consumer.Process.processSealsInfo(Process.java:382)
at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.updateDeclaration(DeclarationConsumer.java:205)
at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.updateDeclaration(DeclarationConsumer.java:157)
at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.submitDeclaration(DeclarationConsumer.java:1207)
at dk.steria.exp.midtier.api.declaration.ejb.DeclarationSBBean.submitDeclaration(DeclarationSBBean.java:871)Edited by: Kristian Lind on Sep 4, 2012 10:56 AMYogavelan...for a faster response, post your question in the Oracle9i JDeveloper Forum:
JDeveloper and ADF
This forum is for member feedback about OTN services and content only; it is not monitored by product teams. -
BMP question : got javax.ejb.EJBException error Object state not saved
Could anybody please help me? I could not figure out what i did wrong.
I got the javax.ejb.EJBException error: Object state not saved
when i test the getname() method for findByPrimaryKey() and findAll() methods.
Here is my code:
package org.school.idxc;
import javax.sql.*;
import javax.naming.*;
import javax.ejb.*;
import javax.sql.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Vector;
* Bean implementation class for Enterprise Bean: status
public class statusBean implements javax.ejb.EntityBean {
private javax.ejb.EntityContext myEntityCtx;
private int id;
private String name;
private DataSource ds;
private String dbname = "jdbc/idxc";
private Connection con;
* ejbActivate
public void ejbActivate() {
* ejbLoad
public void ejbLoad() {
System.out.println("Entering EJBLoad");
try
Integer primaryKey = (Integer) myEntityCtx.getPrimaryKey();
String sqlstmt = "select id, name from from status where id =?";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlstmt);
stmt.setInt (1,primaryKey.intValue());
ResultSet rs = stmt.executeQuery();
if (rs.next())
this.id = rs.getInt(1);
this.name = rs.getString (2).trim();
stmt.close();
} // if
else
stmt.close();
throw new NoSuchEntityException ("Invalid id " + id);
}// else
} // try
catch (SQLException e)
System.out.println("EJBLOad : " + e.getMessage());
} // catch
finally
try
if (con != null)
con.close();
}// try
catch (SQLException e)
System.out.println("EJBLOad finally" + e.getMessage());
} // catch
}// finally
* ejbPassivate
public void ejbPassivate() {
* ejbRemove
public void ejbRemove() throws javax.ejb.RemoveException {
System.out.println ("Entering ejb Removed");
try
String sqlstmt = "delete from status where id=" + id;
con = ds.getConnection();
Statement stmt = con.createStatement();
stmt.executeUpdate(sqlstmt);
stmt.close();
}// try
catch (SQLException e)
System.out.println("Ejb Remove" + e.getMessage());
} // catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJBRemoved " + e.getMessage());
} // catch
} // finally
* ejbStore
public void ejbStore() {
System.out.println("Entering the ejbStore");
try
String sqlstmt = "update status set id=" + id + ",name='" + name + "' where id=" + id;
con = ds.getConnection();
Statement stmt = con.createStatement();
if (stmt.executeUpdate(sqlstmt) != 1)
throw new EJBException ("Object state not saved");
stmt.close();
} // try
catch (SQLException e)
System.out.println ("EJBStore : " + e.getMessage());
}// catch
finally
try
if (con != null)
con.close();
} // try
catch(SQLException e)
System.out.println ("EJBStore finally " + e.getMessage());
} // catch
} // finally
* getEntityContext
public javax.ejb.EntityContext getEntityContext() {
return myEntityCtx;
* setEntityContext
public void setEntityContext(javax.ejb.EntityContext ctx) {
myEntityCtx = ctx;
try
InitialContext initial = new InitialContext();
ds = (DataSource)initial.lookup(dbname);
} // try
catch (NamingException e)
throw new EJBException ("set Entity context : Invalid database");
}// catch
* unsetEntityContext
public void unsetEntityContext() {
myEntityCtx = null;
* ejbCreate
public Integer ejbCreate(Integer key, String name) throws javax.ejb.CreateException {
this.id = key.intValue();
this.name = name;
System.out.println ("Entering ejbCreated!!!");
try
String sqlstmt = "insert into status(id,name) values (" + id + ",'" + (name == null ? "" : name) + "')";
con = ds.getConnection();
Statement stmt = con.createStatement();
stmt.executeUpdate(sqlstmt);
stmt.close();
}// try
catch (SQLException e)
System.out.println("EJBCreate : SQLEXception ");
}// catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJB Created Finally : SQLException");
e.getMessage();
} // catch
}// finally
this.id = key.intValue();
this.name = name;
return key ;
* ejbPostCreate
public void ejbPostCreate(Integer id, String name) throws javax.ejb.CreateException {
* ejbFindByPrimaryKey
public Integer ejbFindByPrimaryKey(
Integer key) throws javax.ejb.FinderException {
try
String sqlstmt = "select id from status where id=" + key.intValue();
con = ds.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sqlstmt);
if (!rs.next())
throw new ObjectNotFoundException();
} // if
rs.close();
stmt.close();
} // try
catch (SQLException e)
System.out.println ("EJBFindBYPrimaryKey " + e.getMessage());
} // catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJB Find by primary key" + e.getMessage());
}// catch
}// finally
return key;
* @return Returns the name.
public String getName() {
return this.name;
* @return Returns id
public int getId() {
return this.id;
* @param name The name to set.
public void setName(String xname) {
this.name = xname;
* ejbFindByLastnameContaining
public Enumeration ejbFindAllNamne () throws javax.ejb.FinderException
try
String sqlstmt = "select id from status order by id";
con = ds.getConnection();
Statement s = con.createStatement();
ResultSet rs = s.executeQuery(sqlstmt);
Vector keys = new Vector();
while (rs.next())
keys.add(new Integer(rs.getInt(1)));
}// while
rs.close();
s.close();
con.close();
return keys.elements();
} // try
catch (SQLException e)
throw new FinderException (e.toString());
} // catch
}Hi,
if you look at your error message you will see the problem. In your code you've missed to implement
public void ejbPassivate {}
so your code looks like this
import java.lang.Object;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;
import java.lang.Math;
import java.util.Random;
import java.io.*;
/** * Title: * Description: * Copyright: Copyright (c) 2001 * Company: * @author * @version 1.0 */
public class DiceEJB implements SessionBean, Serializable
public int[] Roll()
Random rng = new Random();
int[] diceArray = new int[5];
for(int i =0; i < diceArray.length;i++)
diceArray[i] = (Math.abs (rng.nextInt()) % 6) +1;
return diceArray;
public DiceEJB(){}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void setSessionContext (SessionContext sc)
private void writeObject(ObjectOutputStream oos) throws IOException
oos.defaultWriteObject();
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
ois.defaultReadObject();
bye -
Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection".
while executing JSP:<%
* add.jsp
* Adds a new entry through EmployeeBean. This is a JSP that serves 2
* functions. First of all, when called with no arguments, it will display a
* table with a few input fields. The user should enter empNo, empName and
* salary of the new record to be added. When she submits this
* information, it is sent to this page again. If it is successful, then the
* user can continue adding new entries. If it is not, then the old data will
* be displayed, and a warning message will be shown to her.
%>
<%@ page import="com.webstore.*,java.io.*,java.util.*,javax.naming.*" %>
<%
// Make sure this page will not be cached by the browser
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-store");
// We will send error messages to System.err, for verbosity. In a real
// application you will probably not want this.
PrintStream errorStream = System.err;
// If we find any fatal error, we will store it in this variable.
String error = null;
// In a moment we will check if all columns were passed to this page
String param_1 = "";
String param_2 = "";
String param_3 = "";
long dptNo = 0;
String dptName = null;
// This variable indicates what function of this page is currently used. If
// this page is called with parameters, then a new entry should be
// added. In that case this variable is true.
boolean submitting = false;
// We will first attempt to get the reference to EmployeeHome from the
// session. The "list.jsp" page sets this attribute in the session.
DepartmentHome home = (DepartmentHome) session.getAttribute("DepartmentHome");
if (home == null) {
error = "No previous connection to DepartmentBean.";
} else {
// Attempt to get all 3 parameters from the session
param_1 = request.getParameter("DPTNO");
param_2 = request.getParameter("DPTNAME");
// If all 3 parameters are specified, then this is probably a submission by
// this very page. Note that if the user left one of the fields blank, then
// the corresponding parameter will be "", not null.
if (param_1 != null && param_2 != null) {
param_1 = param_1.trim();
param_2 = param_2.trim();
submitting = true;
// In the following variable we will store a (non-fatal) warning message. This
// message will be displayed in the page, but so will the submission form.
String warning = null;
if (submitting) {
warning = "";
// If there is an empty param_1, param_2 and/or param_3, then this will be noted
// in the warning message.
if ("".equals(param_1)) {
warning = "Null param_1 specified. ";
if ("".equals(param_2)) {
warning += "Null param_2 specified. ";
// If we don't have a warning message yet, then we will attempt to create
// a new record.
if ("".equals(warning)) {
try {
dptNo = (long)Long.parseLong(param_1);
dptName = new String(param_2);
Department rec = (Department) home.create(dptNo);
rec.setDptname(dptName);
// empty columns after insert for effect
param_1 = "";
param_2 = "";
// If we got this far, then there was no problem detected.
warning = null;
} catch (Exception e) {
// Set the warning variable to indicate a problem.
warning = "Unable to create new entry, caught: \"" +
e.getClass().getName() + "\", message is: \"" +
e.getMessage() + "\".";
// Decide what the title will be.
String title;
if (error != null) {
title = "Error";
} else {
title = "com.webstore | Add entry";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE><%= title %></TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<H1><%= title %></H1>
<%
// If there was a fatal error, then display the error message
if (error != null) {
%>
<P><BLOCKQUOTE><%= error %></BLOCKQUOTE>
<%
// Otherwise display a table with fields to be filled in.
} else {
// If there was a warning, then display it.
if (warning != null) {
%>
<TABLE border="1" bgcolor="#FF2222">
<TR><TD><FONT color="#FFFFFF"><STRONG>Warning: <%= warning %></STRONG></FONT></TD></TR>
</TABLE>
<%
} /* if */
// Display the table with fields. There are two columns. The left column
// contains the names of the fields, while the right column contains the
// fields.
%>
<FORM action="dptadd.jsp" method="GET">
<P><TABLE border="1">
<TR>
<TD><STRONG>DptNo:</STRONG></TD>
<TD><INPUT type="text" name="DPTNO" value="<%= param_1 %>"></INPUT></TD>
</TR>
<TR>
<TD><STRONG>DptName:</STRONG></TD>
<TD><INPUT type="text" name="DPTNAME" value="<%= param_2 %>"></INPUT></TD>
</TR>
<TR>
<TD colspan="3" align="center"><INPUT type="submit" value="Add this entry"></INPUT></TD>
</TR>
</TABLE>
</FORM>
<%
} /* else */
%>
<P><TABLE border="1">
<TR><TD>Back to list</TD></TR>
</TABLE>
</BODY>
</HTML>
Please guide me..Rajive,
This is the same problem as in your other post:
sql is running very slow
So please refer to my answer there.
Good Luck,
Avi. -
Javax.ejb.EJBException: Null primary key returned by ejbCreate method
Hi all,
I'm using SunOne 7.1 and I got this error when I call the create on the CMP bean.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: Null primary key returned by ejbCreate method
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: javax.ejb.EJBException: Null primary key returned by ejbCreate method
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.ejb.containers.EntityContainer.postCreate(EntityContainer.java:801)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.applicationAdmin.ejb.ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.createNewApplication(ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.java:64)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean_EJBObjectImpl.insertNewApplicationName(SFApplicationAdminBean_EJBObjectImpl.java:31)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin._SFApplicationAdminBean_EJBObjectImpl_Tie._invoke(Unknown Source)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
[14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at java.lang.Thread.run(Thread.java:534)
cmp:
public java.lang.Integer ejbCreateNewApplication(java.lang.String application) throws javax.ejb.CreateException {
setApplication(application);
return null;
The key is auto_increment and is an integer.
I'm usin MySQL and it is already set up as ANSI. (running as mysqld --ansi)
Any Idea?
Thanks in advanceWhat happend when two concourrent user try to get the same key on the table? If for example I have 30 users at same time do I have lock table?
Any way here the finest log using sunone 8. The error is the same, so I think I missing something:
[#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: preInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
[#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: postInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
[#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
[#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Changing Policy Context ID: oldV = null newV = Test|#]
[#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = create,Home, (Codesource) = (file:/Test <no certificates>)|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = insertNewApplicationName,Remote,java.util.Hashtable (Codesource) = (file:/Test <no certificates>)|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean@1fa487f|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: doAsPrivileged contextId(Test)|#]
[#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
new|#]
[#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
mgmt: com.sun.enterprise.naming.TransientContext:com.sun.enterprise.naming.TransientContext@ad00b2|#]
[#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
new|#]
[#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
SFApplicationAdmin: javax.naming.Reference:Reference Class Name: reference
Type: url
Content: ejb/SFApplicationAdmin
|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
[#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = ApplicationAdmin (Action) = createNewApplication,LocalHome,java.lang.String (Codesource) = (file:/Test <no certificates>)|#]
[#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|[Pool-ApplicationAdmin]: Added PoolResizeTimerTask...|#]
[#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|:Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] -->SQLPersistenceManagerFactory.getPersistenceManager().|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() FOUND javax.transaction.Transaction: com.sun.ejb.containers.PMTransactionImpl@5.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool().|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|PersistenceManagerImpl cache properties: _txCacheInitialCapacity=20, _flushedCacheInitialCapacity=20, _flushedCacheLoadFactor=0.75, _weakCacheInitialCapacity=20, _weakCacheLoadFactor=0.75.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.cacheLock.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.fieldUpdateLock.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool() PM: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA com.sun.ejb.containers.PMTransactionImpl@5.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<->SQLPersistenceManagerFactory.getPersistenceManager() JDO Transaction: Transaction:
status = STATUS_NO_TRANSACTION
Transaction Object = Transaction@16077795
threads = 0
.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[ Transaction:
status = STATUS_NO_TRANSACTION
Transaction Object = Transaction@16077795
threads = 0
].begin:status = STATUS_NO_TRANSACTION ,txType: UNKNOWN for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[ Transaction:
status = STATUS_NO_TRANSACTION
Transaction Object = Transaction@16077795
threads = 0
].setStatus: STATUS_NO_TRANSACTION => STATUS_ACTIVE for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() : com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA: com.sun.ejb.containers.PMTransactionImpl@5.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.getCurrentWrapper() > current: null.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.pushCurrentWrapper() > current: null new: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117.|#]
[#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117 prev: null.|#]
[#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: postInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
[#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|Exception in forceDestroyBean()
java.lang.IllegalStateException: Primary key not available
at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:114)
at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1232)
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2559)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
at $Proxy10.createNewApplication(Unknown Source)
at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy7.insertNewApplicationName(Unknown Source)
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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
|#]
[#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|EJB5018: An exception was thrown during an ejb invocation on [ApplicationAdmin]|#]
[#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
at com.sun.jdo.spi.persistence.support.ejb.cmp.JDOEJB11HelperImpl.assertPrimaryKeyFieldNotNull(JDOEJB11HelperImpl.java:446)
at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.setApplicationId(ApplicationAdminBean_1421299025_ConcreteImpl.java:102)
at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean.ejbCreateNewApplication(ApplicationAdminBean.java:93)
at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.ejbCreateNewApplication(ApplicationAdminBean_1421299025_ConcreteImpl.java:334)
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 com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:140)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:168)
at $Proxy10.createNewApplication(Unknown Source)
at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy7.insertNewApplicationName(Unknown Source)
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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2564)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
at $Proxy10.createNewApplication(Unknown Source)
at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy7.insertNewApplicationName(Unknown Source)
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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
|#]
Any Idea?
Thanks in advance for any help -
How do I include javax.ejb.EJB in a Web Project?
Hi,
I have set up an application with two projects. One is called EJBModel and the other is UserInterface. In my UserInterface project, I am writing a bean class and I want it to access the controller beans created in EJBModel. I created a private type for the controller bean and used the @EJB annotation. When I try to import javax.ejb.EJB I get an error saying it is not found. Other javax packages popup on the list of available imports, but not ejb. How do I include it in the UserInterface project?
Thanks in advance...Yeah your right...let me further explain what I'm doing.
I'm creating a web application using the Model-View-Controller design pattern. Model represents data, View represents data display, and Controller is control. I created the EJBModel project in my web app to contain the model aspect. So it has entity objects and beans to access/manipulate the data. Then I created the UserInterface project to store the web interface - mostly jsps. In the UserInterace project, I need a managed bean that calls methods from the beans created in the EJBModel project. I can do this using the @EJB annotation and creating an instance of the class, but since the files are in separate projects that can't see each other and JDeveloper shows an error because it can't find the necessary file. It is best practice to create two projects to keep both elements distinct.
So I wanted to know the best way to access the files stored in separate projects within the same application. -
Javax.ejb,CreateException import not found
I've upgraded from WL 8.1 to 10.3 and have an error "javax.ejb,CreateException import not found". javax.ejb used to be in weblogic.jar in 8.1 however, this path is empty in the version from 10.3. Where did it go? Do I need a new lib added to my build path?
javax.ejb.* is in j2ee.jar
if you use weblogic6.0, you need download ejb20.jar from http://www.weblogic.com
if you use weblogic6.1 ,you need't this file. -
Javax.ejb.Inject not found
I'm working with jdeveloper 10.1.3 in S.O. XP
build a proyect template JSP,EJB3,TOPLINK
import javax.ejb.Inject;
Error: Inject not found
TanksAdd EJB 3.0 Library to project libraries.
-
RWB error: javax.ejb.CreateException XIRWBUSER cannot log
Hi,
When I try to monitor the messages processed by my integration server (RWB interface->Message Monitor->is.[instance].[server]), an authorization error occured:
"Unknown error: javax.ejb.CreateException: You cannot log on to system [SID] with user XIRWBUSER"
I ve read the following post but I didn't find any answer:
Demo application: "You cannot log on to system .... with user XIRWBUSER
My XIRWBUSER has several roles:
SAP_SLD_CONFIGURATOR
SAP_XI_RWB_SERV_USER
SAP_XI_RWB_SERV_USER_MAIN
Even if I give him the sap_all and sap_new profiles, I still have the same error.
Regards,
Yann2 Remarks:
I can monitor messages on the af.[SID].[serveur] (adapter framework?)
If I try to self test the runtime workbench component (component), all lights are green! Moreover, "aii properties" seem to be fine.
Plz help me...
Regards,
Yann -
SOS: javax.ejb.CreateException: Create failed because primary key is null
Hello,
I am desperately trying to get my application server to create a record through CMP 2. My app server is JRun 4.
Here is the client:
package com.parispano.tests;
import java.util.Date;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import com.parispano.account.entity.Account;
import com.parispano.account.entity.AccountHome;
public class ClientEJBDeuxTemp {
public static void main(String[] args) {
System.out.println("\nBegin account DemoClient...\n");
try {
// Create A Demo object, in the server
// Note: the name of the class corresponds to the JNDI
// property declared in the DeploymentDescriptor
// From DeploymentDescriptor ...
// beanHomeName demo.DemoHome
Context ctx = getInitialContext();
AccountHome ahome = (AccountHome) ctx.lookup("AccountEJBHome");
//System.out.println("Creating Demo\n");
Account account = ahome.create("toto","toto", "toto","toto","toto","toto","toto","toto","toto","toto","toto",new Date(),new Date());
catch (Exception e) {
System.out.println(":::::::::::::: Error :::::::::::::::::");
e.printStackTrace();
System.out.println("\nEnd DemoClient...\n");
static String user = "admin";
static String password = "admin";
static String url = "ordi:2908";
* Gets an initial context.
* @return Context
* @exception java.lang.Exception if there is
* an error in getting a Context
static public Context getInitialContext() throws Exception {
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "jrun.naming.JRunContextFactory");
p.put(Context.PROVIDER_URL, url);
if (user != null) {
System.out.println ("user: " + user);
p.put(Context.SECURITY_PRINCIPAL, user);
if (password == null)
password = "";
p.put(Context.SECURITY_CREDENTIALS, password);
return new InitialContext(p);
}and here is the exception I get:
javax.ejb.CreateException: Create failed because primary key is null
I don't understand why I get this as the primary key is "toto" and therefore is not null.
Here is the DD:
<?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>
<display-name>Account EJB</display-name>
<enterprise-beans>
<entity>
<display-name>Account EJB</display-name>
<ejb-name>AccountEJB</ejb-name>
<home>com.parispano.account.entity.AccountHome</home>
<remote>com.parispano.account.entity.Account</remote>
<local-home>com.parispano.account.entity.AccountLocalHome</local-home>
<local>com.parispano.account.entity.AccountLocal</local>
<ejb-class>com.parispano.account.entity.AccountEJB</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>account</abstract-schema-name>
<cmp-field>
<description>Login</description>
<field-name>login</field-name>
</cmp-field>
<!-- -->
<cmp-field>
<description>Password</description>
<field-name>password</field-name>
</cmp-field>
<cmp-field>
<description>Surname</description>
<field-name>surname</field-name>
</cmp-field>
<cmp-field>
<description>First Name</description>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<description>Address One</description>
<field-name>addressOne</field-name>
</cmp-field>
<cmp-field>
<description>Address Two</description>
<field-name>addressTwo</field-name>
</cmp-field>
<cmp-field>
<description>Postcode</description>
<field-name>postcode</field-name>
</cmp-field>
<cmp-field>
<description>City</description>
<field-name>city</field-name>
</cmp-field>
<cmp-field>
<description>Country</description>
<field-name>country</field-name>
</cmp-field>
<cmp-field>
<description>Telephone</description>
<field-name>telephone</field-name>
</cmp-field>
<cmp-field>
<description>Email</description>
<field-name>email</field-name>
</cmp-field>
<cmp-field>
<description>Inscription Date</description>
<field-name>inscriptionDate</field-name>
</cmp-field>
<cmp-field>
<description>Last Visit Date</description>
<field-name>lastVisitDate</field-name>
</cmp-field>
<primkey-field>login</primkey-field>
</entity>
</enterprise-beans>
</ejb-jar>Can anyone tell me why I am getting this exception please?
Thanks in advance,
Julien Martin.Yes, I have set the PK. Actually this is happening when the number of columns are more than 63 columns. After I reduce the number of column, it is working fine.
Is it the actual problem???
fyi, I'm using jboss as the Application Server... -
S:RSSDK:400 Unable to create javax.ejb.EJBObject
Hello Guys,
I'm trying to extract information from xPD in to BW and the error message S:RSSDK:400 Unable to create javax.ejb.EJBObject is raised during the dataload. If you have any suggestion, please let me know.
Thanks and Regards,
Iván.can anybody help to solve? rwrd pts
-
Javax ejb CreateException: Could not create stateless EJB
Hi,
I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
get the following error message:
*...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
thank's for any comment...
(also posted in the Enterprise JavaBeans-forum possibly better there)problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!
-
package library.client;
import javax.naming.InitialContext;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.Method;
import java.sql.ResultSet;
import javax.ejb.*;
import javax.naming.*;
import javax.swing.*;
import library.common.*;
@SuppressWarnings("serial")
public class LibraryClient extends JFrame implements ActionListener {
private static LibraryInterface li;
private JTextField book_author = new JTextField(10);
private JTextField book_title = new JTextField(10);
private JTextField book_isbn = new JTextField(10);
private JLabel author_label = new JLabel("Podaj autora:");
private JLabel book_title_label = new JLabel("Podaj tytul ksiazki");
private JLabel isbn_label = new JLabel("Podaj ISBN");
private JTextArea display_books = new JTextArea(20,50);
private JButton search = new JButton("Search");
private ResultSet resultset;
public LibraryClient() {
this("DEFAULT_CONTEXT");
private JPanel createPanel1(){
JPanel panel = new JPanel();
panel.add(author_label);
panel.add(book_author);
panel.add(book_title_label);
panel.add(book_title);
panel.add(isbn_label);
panel.add(book_isbn);
panel.add(search);
////search.setActionCommand("ISBN");
search.addActionListener(this);
return panel;
private JPanel createPanel2(){
JPanel panel = new JPanel();
panel.add(display_books);
return panel;
private JPanel createPanels(){
JPanel panel = new JPanel();
//Use default FlowLayout.
panel.setLayout(new BorderLayout());
panel.add(createPanel1(), BorderLayout.NORTH);
panel.add(createPanel2(), BorderLayout.SOUTH);
return panel;
public LibraryClient(String appType) {
init(appType);
JFrame frame = new JFrame("Library");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// /final Table table = new Table();
frame.setContentPane(createPanels());
frame.pack();
// /f.setLocationRelativeTo(null);
frame.setVisible(true);
public void actionPerformed(ActionEvent e) {
try {
display_books.setText("");
display_books.setText("Wyszukane Ksiazki\n");
if(!book_author.getText().equals("")){
resultset=li.getBookByAuthor(book_author.getText());
}else if(!book_title.getText().equals("")){
resultset=li.getBookByName(book_title.getText());
}else if(!book_isbn.getText().equals("")){
resultset=li.getBookByISBN(book_isbn.getText());
}else {
System.out.println("Before->resultset=li.getAllBooks()");
resultset=li.getAllBooks();
System.out.println("After->resultset=li.getAllBooks()");
while(resultset.next()){
System.out.println("in while resultset.next()");
String name = resultset.getString("name");
String author =resultset.getString("author");
String isbn = resultset.getString("ISBN");
display_books.append("\n"+ name + " " + author +" "+ isbn);
} catch(Exception exc) { exc.printStackTrace(); }
private void init(String type) {
if (type.equals("JAVA_APP")) li = new library.ejb.LibraryBean();
else if (type.equals("JAVA_CLIENT")) {
try {
InitialContext ic = new InitialContext();
li = (LibraryInterface) ic.lookup("library.common.LibraryInterface");
} catch (NamingException e) {
e.printStackTrace();
public static void main(String[] args) {
if (args.length >= 1) new LibraryClient(args[0]);
else new LibraryClient();
}it throws the exception when it gets to
any of the functions
resultset=li.getBookByAuthor(book_author.getText());
resultset=li.getBookByName(book_title.getText());
resultset=li.getBookByISBN(book_isbn.getText());
resultset=li.getAllBooks();
Please help
Thank YouHi,
I also get the same error.have you got the solution,fi so explain me how to rectify the error
Regards
SamyMohan -
Could not import javax.ejb.* package
On compiling my EJB program the following errors appears
C:\bea\wlserver6.0sp1\samples\examples\ejb\basic\ValidateBean>javac ValidateBean
.java
ValidateBean.java:3: Package javax.ejb not found in import.
import javax.ejb.*;
^
ValidateBean.java:4: Class javax.ejb.CreateException not found in import.
import javax.ejb.CreateException;
^
ValidateBean.java:5: Class javax.ejb.SessionBean not found in import.
import javax.ejb.SessionBean;
^
ValidateBean.java:6: Class javax.ejb.SessionContext not found in import.
import javax.ejb.SessionContext;
^
ValidateBean.java:7: Class javax.naming.InitialContext not found in import.
import javax.naming.InitialContext;
^
ValidateBean.java:8: Class javax.naming.NamingException not found in import.
import javax.naming.NamingException;
^
ValidateBean.java:9: Package javax.sql not found in import.
import javax.sql.*;
^
ValidateBean.java:15: Interface javax.ejb.SessionBean of class examples.ejb.basi
c.ValidateBean.ValidateBean not found.
public class ValidateBean implements SessionBean {
^
8 errors
for these errors do i have to install any other package and
what are the classpath settings required.
and in which *.jar file, these classes and packages are availablejavax.ejb.* is in j2ee.jar
if you use weblogic6.0, you need download ejb20.jar from http://www.weblogic.com
if you use weblogic6.1 ,you need't this file. -
Javax.ejb.RemoveException: An attemp was made to remove stateful instance
Hi,
I am working with a SAP PI 7.1 File adapter without content conversion but attachments. I created an adapter module to change the attachments name and its Mime type. But get following error when i use this module. Even if i just pass the rinputModuleData back without any coding in between i get the same error. (Adapter engine is on the latest SP stack)
Does anyone know what is wrong and how to solve this problem ?
Error: javax.ejb.RemoveException: An attemp was made to remove stateful instance while it still participates in a transaction.This is strictly forbidden by the EJB Specification. However the current transaction won't be marked for rollback allowing you to recover from the error.
Regards,
AndreasHi Agasthuri,
thank you for your quick reply. I use exactly the scenario described in following Blog
/people/francesco.bersani/blog/2007/03/27/rename-attachment-adapter-module
The only thing i did is changing the coding a bit so that it fits PI7.1
Regards,
Andreas
Maybe you are looking for
-
hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac, hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac
-
Trying to retrieve my apps but it tells me "account not in this store"
I upgraded my ipod touch 4th gen and was then asked to restore my ipod and i did. I retieved my photos from icloud but i am unable to get my apps, when i try to download it, it tells me "Account not in this store, your account is not valid for use i
-
Photos do not appear in imovie 11. black screen with frozen movie clip
Imovie 11 Photos do not appear in the movie a black screen for picture in picture or a frozen screen with sound and no photo
-
How to import the image by using java application
1.how to import the image by using java APPLICATION and display it on the textarea that you have been created. 2.how to store the image into the file. 3. what class should i used? 4. how to create an object to keep track the image in java application
-
IOS 6.0.1 Problems
My iPhone 4 keeps disconnecting from Wifi(connection is fine) home screen takes random screen shoots sometimes lock screen doesnt slide sometimes and dont recieve text messeages on time. this ios 6.0.1 is giving me problems. (Reset network on phone t