5 Replies Latest reply on Dec 12, 2008 9:55 PM by Francois Eric

    IllegalArgumentException: null source - basic jbpm fails on startup

    Coral Featherstone Newbie

      I'm trying to get jbpm setup with seam but it is falling over on startup.


      I'm a bit lost on where to trouble shoot this stacktrace. Is my datasource bad?


      Datasource like others in src/main/resources of ejb


      <!DOCTYPE datasources
          PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
          
      <datasources>
         <local-tx-datasource>
            <jndi-name>XYZDesignerDatasource</jndi-name>
            <connection-url>jdbc:mysql://localhost:3306/tn</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <user-name>un</user-name>
            <password>pw</password>
            <!-- Surviving Connection Closure -->
            <check-valid-connection-sql>select 1</check-valid-connection-sql>
         </local-tx-datasource>
              
         <xa-datasource> 
                <jndi-name>jbpmDatasource</jndi-name> 
                <track-connection-by-tx/> 
                <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class > 
                <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/jbpm</xa-datasource-property> 
                <user-name>un</user-name> 
                <password>pw</password> 
           </xa-datasource> 
      </datasources>



      Some of hibernate config:


      <hibernate-configuration>
          <session-factory>
           <property name="show_sql">true</property>
          <property name="connection.datasource">java:/jbpmDatasource</property>
          <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
          <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
          <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
          <property name="hbm2ddl.auto">create-drop</property>
      
      ...



      Process Definition



      <process-definition  
           xmlns="urn:jbpm.org:jpdl-3.2"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd"
           name="StrategyMapWorkFlow"
           >
      
          <start-state name="alterStrategyBubble">
              <transition to="editStrategy"/>
          </start-state>
      
          <task-node name="editStrategy">
              <task name="edit" description="Prepare for changes">
                 <assignment actor-id="#{actor.id}"/>
                 <event type="task-end">
                      <action expression="#{actionItemManager. ...}"/>
                 </event>
              </task>
              <transition name="complete" to="notify">
                  <action expression="#{strategyMapViewBean.changeRequired}"/>
              </transition>
              <transition name="cancel" to="cancelled"/>
          </task-node>
      
          <end-state name="complete"/>
          <end-state name="cancelled"/>
          
      </process-definition>



      jbpm config



      <jbpm-configuration>
      
        <jbpm-context>
          <service name="persistence">
             <factory>
                <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
                   <field name="isTransactionEnabled"><false/></field>          
                </bean>
             </factory>
          </service>
          <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
          <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
          <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
          <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
          <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
        </jbpm-context>
      
      </jbpm-configuration>



      Start up creating tables and then falling over with





      5:38:12,573 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:38:13,476 INFO  [STDOUT] Hibernate: select processdef0_.ID_ as ID1_192_, processdef0_.NAME_ as NAME3_192_, processdef0_.DESCRIPTION_ as DESCRIPT4_192_, processdef0_.VERSION_ as VERSION5_192_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_192_, processdef0_.STARTSTATE_ as STARTSTATE7_192_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ?
      15:38:13,696 ERROR [STDERR] java.lang.IllegalArgumentException: null source
      15:38:13,697 ERROR [STDERR]      at java.util.EventObject.<init>(EventObject.java:38)
      15:38:13,697 ERROR [STDERR]      at javax.sql.StatementEvent.<init>(StatementEvent.java:39)
      15:38:13,697 ERROR [STDERR]      at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
      15:38:13,697 ERROR [STDERR]      at org.jboss.resource.adapter.jdbc.WrappedStatement.internalClose(WrappedStatement.java:590)
      15:38:13,697 ERROR [STDERR]      at org.jboss.resource.adapter.jdbc.WrappedStatement.close(WrappedStatement.java:75)
      15:38:13,697 ERROR [STDERR]      at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:534)
      15:38:13,697 ERROR [STDERR]      at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:269)
      ...
      15:38:13,709 ERROR [GraphSession] java.lang.IllegalArgumentException: null source
      15:38:13,718 ERROR [[/]] 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
           at org.jboss.seam.Component.newInstance(Component.java:1986)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
           at org.jboss.seam.init.Initialization.init(Initialization.java:596)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
      ...
      Caused by: java.lang.RuntimeException: could not deploy a process definition
           at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:258)
           at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
           at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
           at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
           at org.jboss.seam.Component.newInstance(Component.java:1976)
           ... 141 more
      Caused by: org.jbpm.JbpmException: couldn't find process definition 'StrategyMapWorkFlow'
           at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:170)
           at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
           at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
           at org.jboss.seam.bpm.Jbpm.deployProcess(Jbpm.java:274)
           at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:252)
           ... 151 more
      Caused by: java.lang.IllegalArgumentException: null source
           at java.util.EventObject.<init>(EventObject.java:38)
           at javax.sql.StatementEvent.<init>(StatementEvent.java:39)
           at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
           at org.jboss.resource.adapter.jdbc.WrappedStatement.internalClose(WrappedStatement.java:590)
           at org.jboss.resource.adapter.jdbc.WrappedStatement.close(WrappedStatement.java:75)



      Can anyone give direction?