Ben Litchfield
2003-10-05 13:37:02 UTC
Has anybody been able to deploy to weblogic? I am using local entity
beans and the local facade pattern.
The application deploys but when I try to create beans with relationships
I get the following error
javax.ejb.EJBException: [EJB:010145]When a cmp-field and a cmr-field
(relationship) are mapped to the same column, the setXXX method for the
cmp-field may not be called. The cmp-field is read-only.
The generated code looks like this and bombs on the setVendorId call.
public java.lang.Integer ejbCreate(slims.entity.TitleLightValue value)
throws javax.ejb.CreateException {
// Use Middlegen's Sequence Block PK generator. Only works for
numeric fields
try {
slims.entity.SequenceSession sequenceGenerator =
slims.entity.SequenceSessionUtil.getLocalHome().create();
setTitleId(new
java.lang.Integer(Integer.toString(sequenceGenerator.getNextSequenceNumber(
"title.title_id" ))));
} catch( javax.naming.NamingException e ) {
throw new javax.ejb.CreateException(e.getMessage());
}
setVendorId(value.getVendorId());
setName(value.getName());
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}
/**
* The container invokes this method immediately after it calls
ejbCreate.
*
* @param value the value object used to initialise the new instance
*/
public void ejbPostCreate(slims.entity.TitleLightValue value) throws
javax.ejb.CreateException {
}
Any help would be great.
beans and the local facade pattern.
The application deploys but when I try to create beans with relationships
I get the following error
javax.ejb.EJBException: [EJB:010145]When a cmp-field and a cmr-field
(relationship) are mapped to the same column, the setXXX method for the
cmp-field may not be called. The cmp-field is read-only.
The generated code looks like this and bombs on the setVendorId call.
public java.lang.Integer ejbCreate(slims.entity.TitleLightValue value)
throws javax.ejb.CreateException {
// Use Middlegen's Sequence Block PK generator. Only works for
numeric fields
try {
slims.entity.SequenceSession sequenceGenerator =
slims.entity.SequenceSessionUtil.getLocalHome().create();
setTitleId(new
java.lang.Integer(Integer.toString(sequenceGenerator.getNextSequenceNumber(
"title.title_id" ))));
} catch( javax.naming.NamingException e ) {
throw new javax.ejb.CreateException(e.getMessage());
}
setVendorId(value.getVendorId());
setName(value.getName());
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}
/**
* The container invokes this method immediately after it calls
ejbCreate.
*
* @param value the value object used to initialise the new instance
*/
public void ejbPostCreate(slims.entity.TitleLightValue value) throws
javax.ejb.CreateException {
}
Any help would be great.