I am having a problem when I persist my EntityHome derived component. The persist completes successfully, but I am crashing inside seam framework code which attempts to debug log the persist operation.
Here is my persist code:
public String persist() {
TeamManager teamManager = new TeamManager(userHome.getInstance(), teamHome.getInstance());
TeamManagerHome teamManagerHome = new TeamManagerHome();
teamManagerHome.setTeamManagerId(teamManager.hashCode());
teamManagerHome.setInstance(teamManager);
String result = teamManagerHome.persist();
return result;
}
The crash happens inside the Seam framework after the entitymanager persist and flush.
The framework calls createdMessage to log the persist:
/**
* Add a {@link javax.faces.application.FacesMessage} and log a message when
* the entity instance is created.
*
* Utility method to add a {@link javax.faces.application.FacesMessage} from
* the Seam managed resource bundle or, if not specified in the resource
* bundle, from {@link #getUpdatedMessage()} and log the entity when the
* managed entity is updated.
*
* @see #getCreatedMessage()
* @see #getCreatedMessageKey()
*/
protected void createdMessage()
{
debug("created entity #0 #1", getEntityClass().getName(), getId());
getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getCreatedMessageKey(), getCreatedMessage() );
}
The debug() call does the following:
protected void debug(Object object, Object... params)
{
log.debug(object, params);
}
And in the above, the log object is null.
I use EntityHome all over my application without problem - not sure what I am doing differently in this case that would cause this.
The persist is being originated by a Save button click.
Hoping someone can help.
Regards,
Mark