1 Reply Latest reply on Feb 24, 2006 12:00 PM by Jesse Sweetland

    PropertyAccessException Setting Node.isAsync

    Jesse Sweetland Newbie

      jBPM Version: 3.1
      Application Server: JBoss 4.0.3SP1
      Java Version: 1.5.0_05
      Database: PostgreSQL 8.0.7

      I've finally stabilized our application with jBPM but I'm encountering an error when I try to start a new process instance. Here is the stack trace:

      org.hibernate.PropertyAccessException: could not set a field value by reflection setter of org.jbpm.graph.node.StartState.isAsync
       at org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:82)
       at org.hibernate.tuple.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:330)
       at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:188)
       at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3231)
       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:126)
       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
       at org.hibernate.loader.Loader.doQuery(Loader.java:717)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
       at org.hibernate.loader.Loader.loadEntity(Loader.java:1782)
       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
       at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2729)
       at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
       at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:82)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:809)
       at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:771)
       at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:62)
       at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
       at org.jbpm.graph.node.StartState$$EnhancerByCGLIB$$2d488654.getName(<generated>)
       at org.apache.jsp.admin.instances_jsp._jspService(org.apache.jsp.admin.instances_jsp:266)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalArgumentException
       at sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:62)
       at java.lang.reflect.Field.set(Field.java:656)
       at org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:79)
       ... 48 more
      


      I think it might have something to do with the fact that the Node.isAsync field is a boolean and the JBPM_NODE.ISASYNC_ column in the database is of type NUMBER(1) (rather than BIT). I noticed that the mapping in the Node.hbm.xml file did not specify a type. I dug through the Hibernate source code a little to try to find out exactly what was going on but I got lost.

      I also tried setting the hibernate.query.substitutions to "true 1, false 0" but that did not seem to have any effect.

      Has anyone else noticed similar behavior? Any tips for getting jBPM 3.1 running on PostgreSQL or Oracle?

        • 1. Re: PropertyAccessException Setting Node.isAsync
          Jesse Sweetland Newbie

          Turns out it isn't a Hibernate problem at all. We had old data in the tables and there was no default value for the isasync_ column when it was added during migration, so the value was null. "update jbpm_node set isasync_=false" and PostgreSQL or "update jbpm_node set isasync_=0" on Oracle solved the problem.

          As an aside, my initial post relates more to Oracle than to PostgreSQL, since PostgreSQL does have a boolean datatype (I wasn't aware of that until just now).

          Anyway, hope this helps other migrators.

          - Jesse