[jboss-user] [EJB 3.0] - Couldn't handle invocation directly within...StatelessRemote

ebross do-not-reply at jboss.com
Thu Feb 12 17:40:18 EST 2009


Development Platform: 
Eclipse 
Linux 
JBoss 5 
JSF and Trinadad 

Problem Description: 
I have two classes: 
(a) Stateless bean: DocumentController, packaged in a ejb.jar 
(b) JSF Backing beans: AbstractDocumentPageBean, package: web.war 

1. The ejb.jar and web.war are ear modules and deployed succesfully in ear file. 
2. When a web page is called, a form appears, 
3. I fill the fields and click the "create" button
4. Validation is ok --no error display
5. JBoss displays the stack trace (see below), "Couldn't handle invocation directly within...StatelessRemoteProxyInvocationHandler"

Could someone please help me understand what "Couldn't handle invocation directly within...StatelessRemoteProxyInvocationHandler" means

Thank you in advance


  | ----------------------------------------------------------------------------------------------------
  | Stateless: DocumentController, Package: ejb.jar 
  | ----------------------------------------------------------------------------------------------------
  | @javax.ejb.Stateless(mappedName="ejb/DocumentController")
  | @javax.ejb.Remote({com.xxxxxxxx.xxxx.ejb.intf.DocumentRemote.class})
  | @javax.ejb.Local({com.xxxxxxxx.xxxx.ejb.intf.DocumentLocal.class})
  | @javax.ejb.TransactionManagement(value=javax.ejb.TransactionManagementType.CONTAINER)
  | @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRES_NEW)
  | @javax.interceptor.Interceptors ({com.xxxxxxxx.xxxx.ejb.interceptor.Tracer.class})
  | 
  | // Security annotation
  | @javax.annotation.security.DeclareRoles({"admin", "employee", "member", "subscriber"})
  | @javax.annotation.security.RolesAllowed({"admin","employee", "member", "subscriber"})
  | @org.jboss.ejb3.annotation.SecurityDomain(value = "xxxxRealm")
  | 
  | public class DocumentController implements com.xxxxxxxx.xxxx.ejb.intf.DocumentRemote,  com.xxxxxxxx.xxxx.ejb.intf.DocumentLocal, 
  | java.io.Serializable{
  | 
  | /**
  | * The logger object.
  | */
  | private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DocumentController.class);
  | 
  | @javax.ejb.EJB
  | private com.xxxxxxxx.xxxx.dao.intf.DocumentDAOLocal documentDAO;
  | 
  | public DocumentController() {
  | }
  | 
  | /**
  | */
  | @javax.annotation.security.PermitAll
  | 
  | public DocumentEntity createEntity(DocumentEntity bean) { <----- CALL IN BACKING BEAN
  | 
  | log.debug("Entering createEntity");
  |  
  | DocumentEntity retVal = null;
  | if (bean== null) {
  | 	log.error("Exiting createEntity - Could not do create Document: " + "Null Document");
  | 	return null;
  | }
  | if(!bean.isNotNullFieldEmpty()){
  | 	log.error("Exiting createEntity - Could not do create Document: " + "Document contains empty mandatory field");
  | 	return null;
  | }	
  | try{
  | retVal =  getDocumentDAOImpl().createEntity(bean);	
  | } catch(com.xxxxxxxx.xxxx.dao.exception.DAOException e) {
  | 	e.printStackTrace();
  | 	log.error("Exiting createEntity - Could not do create Document: " + e.getMessage(), e);
  | 	return null;
  | }
  | log.debug("Exiting createEntity");
  | return retVal;
  | }
  | }
  | 

  | ----------------------------------------------------------------------------------------------------
  | JSf Backing beans: AbstractDocumentPageBean, Package: web.war 
  | ----------------------------------------------------------------------------------------------------
  | public class AbstractDocumentPageBean extends com.xxxxxxxx.xxxx.web.bean.AbstractFacesBean{
  | 
  | /**
  | * The logger object.
  | */
  | private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(AbstractDocumentPageBean.class);
  | /**
  | * The DocumentForm object.
  | */
  | protected DocumentForm formBean = null;
  | protected  DocumentConverter converter = null;
  | protected DocumentForm[] documentAsArray = null;
  | 
  | protected UserInfoBean userInfo = null;
  | 
  | private javax.faces.model.DataModel listModel;
  | 
  | @javax.ejb.EJB
  | private com.xxxxxxxx.xxxx.ejb.intf.DocumentRemote documentManager;
  | 
  | /* 
  | * Non-arg Constructor
  | */
  | public AbstractDocumentPageBean(final DocumentForm formBean){
  | 	this(formBean, new UserInfoBean());
  | }
  | 
  | /**
  | * Getter method for formBean property.
  | * 
  | * @return the value of formBean property
  | */
  | public DocumentForm getFormBean(){
  | 	if (formBean == null) {
  | 			formBean = (DocumentForm ) JSFUtils.getObjectFromRequestParameter("jsfcrud.Document", converter, null);
  | 	}
  | 	if (formBean == null) {
  | 			formBean = new DocumentForm(new DocumentEntity(), userInfo);
  | 			editAction = false;
  | 			deleteAction = false;
  | 	}
  | 	return formBean;
  | }
  | 
  | /**
  | * Getter method for FormBean.DocumentEntity property.
  | * 
  | * Returns the value of the <code>FormBean.DocumentEntity</code> property.
  | */
  | public DocumentEntity  getFormValue(){
  | 		return getFormBean().getBackingData();
  |  }
  |  
  | /**
  | * Creates a new Document. 
  | *
  | *@return the outcome of the processing
  | */
  | public String createButton_action(){
  |  log.debug("Entering createButton_action");
  | 
  | UserInfoBean currentUser  = getUserInfo();
  | if (currentUser.getAuthenticate() == true && currentUser.getAuthenticated() == false) {
  | 	log.error("Exiting createButton_action  : " + "User is not authenticated", null);
  | 	return null;
  | }
  | /* 
  | * At this point the formBean should not have an id 
  | * but if it does, then don't create it, but anyway check 
  | * whether the id already exist or not. If it does then 
  | * display as duplicate --already exist in the database
  | */
  | if(getFormValue().getPrimaryKey() != null){
  | DocumentEntity retVal = getDocumentManager().findByPrimaryKey(getFormValue().getPrimaryKey());
  | if(retVal != null){
  | 	log.error("Exiting createButton_action  : " + "Cannot create a duplicate.", null);
  | 	addFacesErrorMessage("Document already exists");
  | 	return null;
  | }
  | }
  | DocumentEntity bean= new DocumentEntity();
  | bean.setDomainType(getFormValue().getDomainType());
  | bean.setDescription(getFormValue().getDescription());
  | bean.setCreatedBy(getFormValue().getCreatedBy());
  | bean.setDateCreated(getFormValue().getDateCreated());
  | bean.setUpdatedBy(getFormValue().getUpdatedBy());
  | bean.setDateLastUpdated(getFormValue().getDateLastUpdated());
  | bean.setActivated(getFormValue().getActivated());
  | bean.setNotes(getFormValue().getNotes());
  | bean.setVersion(getFormValue().getVersion());
  | bean.setHits(getFormValue().getHits());
  | try {
  | 
  | getDocumentManager().createEntity(bean); <---- PROBLEM LINE
  | 
  | 
  | addSuccessMessage("Document was successfully created.");
  | } catch (Exception e) {               
  | 	log.error("Exiting createButton_action  : " + "Unexpected error when creating Document", null);
  | 	addFacesErrorMessage("Unexpected error when creating Document");
  | 	return null;
  | } 
  | log.debug("Exiting createButton_action");
  | return "success";
  | }
  | }
  | 
  | 

  | ----------------------------------------------------------------------------------------------------
  | Stack Trace : Couldn't handle invocation directly within...StatelessRemoteProxyInvocationHandler
  | ----------------------------------------------------------------------------------------------------
  | 2009-02-12 17:05:23,290 DEBUG [org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase] (http-localhost%2F127.0.0.1-8080-1) Couldn't handle invocation directly within org.jboss.ejb3.proxy.handler.session.stateless.StatelessRemoteProxyInvocationHandler at 3ce5d: Current invocation "public abstract com.xxxxxxxx.xxxx.entity.model.DocumentEntity com.xxxxxxxx.xxxx.ejb.intf.DocumentService.createEntity(com.xxxxxxxx.xxxx.entity.model.DocumentEntity) throws com.xxxxxxxx.xxxx.dao.exception.DAOException" is not eligible for direct handling by org.jboss.ejb3.proxy.handler.session.stateless.StatelessRemoteProxyInvocationHandler at 3ce5d
  | 2009-02-12 17:05:23,342 DEBUG [org.jboss.ejb3.proxy.invocation.InvokableContextStatefulRemoteProxyInvocationHack] (http-localhost%2F127.0.0.1-8080-1) Received invocation request to method com.xxxxxxxx.xxxx.ejb.intf.DocumentRemote: com.xxxxxxxx.xxxx.ejb.intf.DocumentService.createEntity(com.xxxxxxxx.xxxx.entity.model.DocumentEntity); using hash: 5676740933045534775
  | 2009-02-12 17:05:24,247 DEBUG [org.jboss.ejb3.stateless.StatelessContainer] (http-localhost%2F127.0.0.1-8080-1) Received dynamic invocation for method with hash: 5676740933045534775
  | 2009-02-12 17:05:25,134 ERROR [com.xxxxxxxx.xxxx.web.bean.AbstractDocumentPageBean] (http-localhost%2F127.0.0.1-8080-1) Exiting createButton_action  : Unexpected error when creating Document
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209708#4209708

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209708



More information about the jboss-user mailing list