aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes CreateFailureException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "CreateFailureException" Watch "CreateFailureException" New topic
Author

CreateFailureException

Chandrasekhar Vidhyadharani
Greenhorn

Joined: Mar 05, 2004
Posts: 11
Can anybody tell me where i am going wrong?
This is what i have done. I have written a custom create method for my ProductBean(CMP2.0) which has catalog as the foriegn key.
1) Written a create method in my home interface as follows
public casedb.ejb.ProductRemote create(
java.lang.Integer productId,
java.lang.String productName,
java.lang.String productDesc,
java.lang.Float productPrice,
java.lang.Integer productQuantity,
java.lang.Integer catalogId)
throws javax.ejb.CreateException, java.rmi.RemoteException;
}
2) Written corresponding ejbCreate() and ejbPostCreate() method in my ProductBean as follows
public casedb.ejb.ProductKey ejbCreate(java.lang.Integer productId,
java.lang.String productName,java.lang.String productDesc,
java.lang.Float productPrice,java.lang.Integer productQuantity,
java.lang.Integer catalogId)throws javax.ejb.CreateException{
this.setProductId(productId);
this.setProductName(productName);
this.setProductDesc(productDesc);
this.setProductPrice(productPrice);
this.setProductQuantity(productQuantity);
this.setCatalogId(catalogId);
return null;}

public void ejbPostCreate(java.lang.Integer productId,
java.lang.String productName,java.lang.String productDesc,
java.lang.Float productPrice,java.lang.Integer productQuantity,
java.lang.Integer catalogId)throws javax.ejb.CreateException{}
3) Written two abstract business methods in the ProductBean as follows
public abstract java.lang.Integer getCatalogId();
public abstract void setCatalogId(java.lang.Integer catalogId);
4)Gave the implementation in a class called ConcreteProduct_532b393f which extends ProductBean
public java.lang.Integer getCatalogId(){
return getCatalog_catalogId();//this method is already created in this class
}

public void setCatalogId(java.lang.Integer catalogId)
{
setCatalog_catalogId(catalogId);//this one is already created in this class
}
the above two methods have a signature like this
* Get accessor for persistent attribute: catalog_catalogId
* @generated
*/
public java.lang.Integer getCatalog_catalogId() {
return catalog_catalogId;
}
/**
* Set accessor for persistent attribute: catalog_catalogId
* @generated
*/
public void setCatalog_catalogId(java.lang.Integer newCatalog_catalogId) {
instanceExtension.markDirty(5, catalog_catalogId, newCatalog_catalogId);
catalog_catalogId = newCatalog_catalogId;
}
When i finished the above steps and did RMIC and deploy code i have no errors in my task bar. When i ran the above code i get the following exception. Please help
RemoteException occurred in server thread; nested exception is: com.ibm.ejs.container.CreateFailureException: 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@24b109a6; 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@24b109a6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CreateFailureException