Tuesday, July 28, 2009

Seam 2 + MySQL 5 + jBPM 3

Seam (jboss-seam-2.1.2) could not start jBPM (jbpm-3.2.6.SP1) causes application deployment fails

02:08:48,718 ERROR [jbpm]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.jbpm.job.Job.id

jboss-seam-2.1.2 comes with an older version of jbpm-jpdl.jar. Copy the newer one from jbpm-3.2.6.SP1 to replace the one in seam.

Seam (jboss-seam-2.1.2) example Hotel Booking, it causes exceptions during undeployment during JBoss shutdown

17:35:36,421 WARN  [Component] Exception calling stateful session bean default @Remove method: hotelBooking
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=HotelBookingAction,service=EJB3" is not bound.
17:35:36,437 WARN  [Component] Exception calling stateful session bean default @Remove method: bookingList
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=BookingListAction,service=EJB3" is not bound.
17:35:36,437 WARN  [Component] Exception calling stateful session bean default @Remove method: hotelSearch
org.jboss.ejb3.common.registrar.spi.NotBoundException: Requested value bound at name "jboss.j2ee:ear=seam.example.hotel-ear.ear,jar=seam.example.hotel-ejb.jar,name=HotelSearchingAction,service=EJB3" is not bound.

Only the Stateful session beans like hotelSearch cause the exception. Inside the example there are jboss.xml which contains session bean registrations. Places this file to seam.example.hotel-ear\EarContent\META-INF.

Seam (jboss-seam-2.1.2) jBPM file for page flow could not be parsed

Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] Unable to parse process definition pageflow.jpdl.xml]
 at org.jboss.seam.bpm.Jbpm.getPageflowDefinitionFromResource(Jbpm.java:169)
 at org.jboss.seam.bpm.Jbpm.installPageflowDefinitions(Jbpm.java:278)

Check if the process definition contains any sub process. If it does, in components.xml, all sub processes MUST be defined before the main process. For example: if cheat.jpdl.xml is a sub process of pageflow.jpd.xml, the follow one will cause the trouble


    pageflow.jpdl.xml
    cheat.jpdl.xml

And this one is correct.


    cheat.jpdl.xml
    pageflow.jpdl.xml

No comments: