2 Replies Latest reply on Apr 27, 2006 3:33 PM by fallow

    Migrating jbpm.varmapping from 3.0.1 to 3.1

    fallow Newbie

      Hello,

      I am attempting to migrate from 3.0.1 to 3.1. In 3.0.1 we have a custom converter that mapes Long[] to a string representation.

      For some reason I cannot get the new 3.1 version to pick up our new converter.

      In jbpm.cfg.xml I changed the resource.converter and resource.varmapping to point to the root of the classpath.




      jbpm.converter.properties has the extra entry:

      L com.quickstream.workflow.jbpm.converter.LongArrayToStringConverter

      jbpm.varmapping.xml contains the new entry:

      <jbpm-type>






      <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
      </jbpm-type>


      However whenever I try to store a Long[] object I get a parsing error in jbpm.varmpaping.xml. The exception is java.lang.reflect.invocationTargetException with the message of "couldn't parse 'list' into a 'org.jbpm.configuration.ListInfo': .... <rest of xml here>

      I have checked the XML and it is well-formed. I also copied an existing mapping (byte[]) and changed it slightly while removing my new mapping type. I get the same error. When I remove the new type completely everything works (though my Long[]'s are not converted properly).

      I also tried going back to our jbpm.varmapping.properties file and pointing jbpm.cfg.xml at that, but that threw SAXParser errors.

      Any thoughts? Do I need to update another property file somewhere?

      Thanks,

      Fallow

        • 1. Re: Migrating jbpm.varmapping from 3.0.1 to 3.1
          fallow Newbie

          For more reference following is my jbpm.varmapping.xml that contains a second byte[] mapped to a random class letter ([Z) that throws the error:


          couldn't parse 'list' into a 'org.jbpm.configuration.ListInfo':


          <?xml version="1.0" encoding="UTF-8"?>


          <!-- java.lang.String -->

          <jbpm-type>











          <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance"/>

          </jbpm-type>



          <!-- java.lang.Boolean -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance"/>

          </jbpm-type>



          <!-- java.lang.Character -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance"/>

          </jbpm-type>



          <!-- java.lang.Long -->

          <jbpm-type>











          <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance"/>

          </jbpm-type>



          <!-- java.lang.Byte -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance"/>

          </jbpm-type>



          <!-- java.lang.Short -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance"/>

          </jbpm-type>



          <!-- java.lang.Integer -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance"/>

          </jbpm-type>



          <!-- java.lang.Double -->

          <jbpm-type>











          <variable-instance class="org.jbpm.context.exe.variableinstance.DoubleInstance"/>

          </jbpm-type>



          <!-- java.lang.Float -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.DoubleInstance"/>

          </jbpm-type>



          <!-- java.util.Date -->

          <jbpm-type>











          <variable-instance class="org.jbpm.context.exe.variableinstance.DateInstance"/>

          </jbpm-type>



          <!-- byte[] -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance"/>

          </jbpm-type>



          <!-- byte[] -->

          <jbpm-type>













          <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance"/>

          </jbpm-type>



          <!-- java.io.Serializable -->

          <jbpm-type>









          <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance"/>

          </jbpm-type>



          <!-- hibernatable long id types -->

          <jbpm-type>







          <variable-instance class="org.jbpm.context.exe.variableinstance.HibernateLongInstance"/>

          </jbpm-type>



          <!-- hibernatable string id types -->

          <jbpm-type>







          <variable-instance class="org.jbpm.context.exe.variableinstance.HibernateStringInstance"/>

          </jbpm-type>



          <!-- hibernatable ejb3 types -->

          <jbpm-type>







          <variable-instance class="org.jbpm.context.exe.variableinstance.Ejb3Instance"/>

          </jbpm-type>



          • 2. Re: Migrating jbpm.varmapping from 3.0.1 to 3.1
            fallow Newbie

            I think I have this figured out. There were two issues...

            First the jbpm.converter.properties did not have one of the new entries needed, so when I ported over the old 3.0.1 version it was missing an entry. This caused the "list" element to fail to build properly.

            The second issue I had was the class name used in varmappings. It should be [Ljava.lang.Long; not just [L

            Fallow