Discussions

EJB programming & troubleshooting: Struts with EJB

  1. Struts with EJB (1 messages)

    Hi to all I am developing an enterprise applicatoin on Struts Framework using WSAD 5.1. The problem I got is, when I try to pass Form bean as parameter to session bean, I get no problem while EJB deployment and project building that means that there is no logical error.

    But when I try to start the server I throws me an error that

    [2/26/04 13:00:57:736 GMT+05:30] 195d3813 EJBContainerI I WSVR0207I: Preparing to start EJB jar: EXIMEJB.jar

    [2/26/04 13:00:57:830 GMT+05:30] 195d3813 BeanMetaData E CNTR0075E: The user-provided class "<null>" needed by the EnterpriseBean could not be found or loaded.

    [2/26/04 13:00:57:861 GMT+05:30] 195d3813 EJBContainerI E WSVR0209E: Unable to prepare EJB jar EXIMEJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl], enterprise bean com.ibm.etools.ejb.impl.SessionImpl(sessionFacade) (transactionType: Container, sessionType: Stateless)

     java.lang.NoClassDefFoundError: eximweb/actionforms/ApplicationFeeForm

    My application name is EXIM and ApplicationFeeForm is the form bean that I am trying to pass to session bean.

    Please Help me.

    Thanks
  2. Hi,

    You should not pass struts forms as parameters of EJB methods. Form classes have references to servlet and web session specific objects. Serialization of the forms will have an impact on performance. Plus, I'll have to include struts libraries to the path of your EJB module. It's really necessary to copy data from forms to data transfer objects (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html).