0 Replies Latest reply on Aug 28, 2013 6:57 AM by Chris Gut

    java.lang.IllegalArgumentException: Could not find message

    Chris Gut Newbie

      Hi,

       

      I haven't much experience in the field jBPM and I am new to the community. I've been trying to implement a project using WSDL in the JBoss jBPM since few days. However, I always get the following error message:


      java.lang.IllegalArgumentException: Could not find message

          at org.jbpm.bpmn2.xml.ReceiveTaskHandler.handleNode(ReceiveTaskHandler.java:54)

          at org.jbpm.bpmn2.xml.TaskHandler.end(TaskHandler.java:165)

          at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:422)

          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)

          at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)

          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)

          at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:301)

          at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:180)

          at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:46)

          at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:262)

          at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:673)

          at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:709)

          at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)

          at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)

          at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:51)

          at com.sample.ProcessTest.main(ProcessTest.java:25)

      0    28/08 12:16:46,835[main] ERROR builder.impl.KnowledgeBuilderImpl.newKnowledgeBase  - ProcessLoadError: unable to parse xml : Exception class java.lang.IllegalArgumentException : Could not find message

      java.lang.IllegalArgumentException: Could not parse knowledge.

          at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:79)

          at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:52)

          at com.sample.ProcessTest.main(ProcessTest.java:25)

       

      Does anyone know what could be the problem maybe. The process has just 2 service task, which call two operations in the WSDL. The XML process definition is:


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

      <bpmn2:definitions

              xmlns="http://www.jboss.org/drools"

              xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns:activiti="http://activiti.org/bpmn"

              xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

              xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

              xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

              typeLanguage="http://www.w3.org/2001/XMLSchema"

              expressionLanguage="http://www.w3.org/1999/XPath"

              xmlns:tns="http://ict.tuwien.ac.at/proreuse/"

              targetNamespace="http://ict.tuwien.ac.at/proreuse/"

              xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"

              xmlns:billServiceNS="http://ict.tuwien.ac.at/proreuse/BillServiceComplex"

              xmlns:typesBillService="http://ict.tuwien.ac.at/proreuse/BillServiceComplex/types">

            

            <bpmn2:import importType="http://schemas.xmlsoap.org/wsdl/"

                      location="http://localhost:9898/ProReUseWebServices/services/BillServiceComplex?wsdl"

                      namespace="http://ict.tuwien.ac.at/proreuse/BillServiceComplex" />

                    

               <!-- createBillOperation Message Definitions -->

               <bpmn2:itemDefinition id="createBillAmountInputSoap" structureRef="billServiceNS:createBillOperation" itemKind="Physical" />

              <bpmn2:itemDefinition id="createBillBillOutputSoap" structureRef="billServiceNS:createBillOperationResponse" itemKind="Physical" />

              <bpmn2:message id="createBillRequestMessage"    itemRef="createBillAmountInputSoap" />

              <bpmn2:message id="createBillResponseMessage"    itemRef="createBillBillOutputSoap" />

             

             

              <!-- sendBillOperation Message Definitions -->

              <bpmn2:itemDefinition id="sendBillBillInputSoap" structureRef="billServiceNS:sendBillOperation" itemKind="Physical" />

              <bpmn2:itemDefinition id="sendBillBooleanOutputSoap" structureRef="billServiceNS:sendBillOperationResponse" itemKind="Physical" />

              <bpmn2:message id="sendBillRequestMessage"    itemRef="sendBillBillInputSoap" />

              <bpmn2:message id="sendBillResponseMessage"    itemRef="sendBillBooleanOutputSoap" />

       

       

              <bpmn2:interface name="Bill Service"

                  implementationRef="billServiceNS:BillService">

                  <bpmn2:operation id="createBill"

                              name="Creates a Bill for a specific amount of money"

                              implementationRef="billServiceNS:createBillOperation">

                      <bpmn2:inMessageRef>createBillRequestMessage</bpmn2:inMessageRef>

                      <bpmn2:outMessageRef>tns:createBillResponseMessage</bpmn2:outMessageRef>

                  </bpmn2:operation>

                  <bpmn2:operation id="sendBill"

                              name="Sends a Bill"

                              implementationRef="billServiceNS:sendBillOperation">

                      <bpmn2:inMessageRef>sendBillRequestMessage</bpmn2:inMessageRef>

                      <bpmn2:outMessageRef>tns:sendBillResponseMessage</bpmn2:outMessageRef>

                  </bpmn2:operation>

              </bpmn2:interface>

       

              <bpmn2:itemDefinition id="amount" structureRef="Float" itemKind="Physical"/>

              <bpmn2:itemDefinition id="createBillOperationAmountInput" structureRef="Float" itemKind="Physical"/>

              <bpmn2:itemDefinition id="address" structureRef="String" itemKind="Physical" />

              <bpmn2:itemDefinition id="createBillOperationAddressInput" structureRef="String" itemKind="Physical" />

              <bpmn2:itemDefinition id="createBillOperationBillOutput" structureRef="billServiceNS:bill" itemKind="Physical"/>

              <bpmn2:itemDefinition id="bill" structureRef="billServiceNS:bill" itemKind="Physical"/>

             

              <bpmn2:itemDefinition id="sendBillOperationBillInput" structureRef="billServiceNS:bill" itemKind="Physical"/>

              <bpmn2:itemDefinition id="sendBillOperationOutput" structureRef="Boolean" itemKind="Physical"/>

              <bpmn2:itemDefinition id="localSendBillOperationOutput" structureRef="Boolean" itemKind="Physical"/>

             

        <bpmn2:process id="CallBillComplexWebService" name="Call Bill Complex WebService"  processType="Private" isExecutable="true">

          <bpmn2:documentation>Place documentation for the 'BillService' process here.</bpmn2:documentation>

          <!--<ioSpecification>

              <dataInput id="dataInputOfProcess" itemSubjectRef="tns:createBillAmountInputSoap" />

              <inputSet>

                  <dataInputRefs>dataInputOfProcess</dataInputRefs>

              </inputSet>

              <outputSet />

          </ioSpecification>-->

          <bpmn2:startEvent id="useWsStart" name="Use WS Start">

          </bpmn2:startEvent>


          <bpmn2:serviceTask id="callTheWS" name="CalltheWS"

                  activiti:implementation="##WebService"

                  operationRef="createBill" >

                  <bpmn2:ioSpecification>

                      <bpmn2:dataInput

                          itemSubjectRef="tns:createBillAmountInputSoap"

                          id="dataInputOfCreateBillServiceTask" />

                      <bpmn2:dataInput

                          itemSubjectRef="tns:createBillAmountInputSoap"

                          id="dataInputOfCreateBillServiceTaskAddress" />

                          <!--itemSubjectRef="billServiceNS:createBillOperation" -->

                      <bpmn2:dataOutput

                          itemSubjectRef="tns:createBillBillOutputSoap"

                          id="dataOutputOfCreateBillServiceTask" />

                      <bpmn2:inputSet>

                          <bpmn2:dataInputRefs>dataInputOfCreateBillServiceTask</bpmn2:dataInputRefs>

                          <bpmn2:dataInputRefs>dataInputOfCreateBillServiceTaskAddress</bpmn2:dataInputRefs>

                      </bpmn2:inputSet>

                      <bpmn2:outputSet>

                          <bpmn2:dataOutputRefs>dataOutputOfCreateBillServiceTask</bpmn2:dataOutputRefs>

                      </bpmn2:outputSet>

                  </bpmn2:ioSpecification>

                  <bpmn2:dataInputAssociation>

                      <bpmn2:sourceRef>amount</bpmn2:sourceRef>

                      <bpmn2:targetRef>createBillOperationAmountInput</bpmn2:targetRef>          

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation>

                      <bpmn2:sourceRef>address</bpmn2:sourceRef>

                      <bpmn2:targetRef>createBillOperationAddressInput</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataOutputAssociation>

                      <bpmn2:sourceRef>createBillOperationBillOutput</bpmn2:sourceRef>

                      <bpmn2:targetRef>bill</bpmn2:targetRef>

                  </bpmn2:dataOutputAssociation>

          </bpmn2:serviceTask>

         

          <bpmn2:serviceTask id="callSendBill" name="CalltheSendBill"

                  activiti:implementation="##WebService"

                  operationRef="sendBill">

                  <bpmn2:ioSpecification>

                      <bpmn2:dataInput itemSubjectRef="tns:sendBillBillInputSoap" id="dataInputOfSendBillServiceTask" />

                      <bpmn2:dataOutput itemSubjectRef="tns:sendBillBooleanOutputSoap" id="dataOutputOfSendBillServiceTask" />

                      <bpmn2:inputSet>

                          <bpmn2:dataInputRefs>dataInputOfSendBillServiceTask</bpmn2:dataInputRefs>

                      </bpmn2:inputSet>

                      <bpmn2:outputSet>

                          <bpmn2:dataOutputRefs>dataOutputOfSendBillServiceTask</bpmn2:dataOutputRefs>

                      </bpmn2:outputSet>

                  </bpmn2:ioSpecification>

                  <bpmn2:dataInputAssociation>

                      <bpmn2:sourceRef>bill</bpmn2:sourceRef>

                      <bpmn2:targetRef>sendBillOperationBillInput</bpmn2:targetRef>          

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataOutputAssociation>

                      <bpmn2:sourceRef>sendBillOperationOutput</bpmn2:sourceRef>

                      <bpmn2:targetRef>localSendBillOperationOutput</bpmn2:targetRef>

                  </bpmn2:dataOutputAssociation>

          </bpmn2:serviceTask>

          <bpmn2:receiveTask id="waitState" />

          <bpmn2:endEvent id="useWsEnd" name="Use WS End"></bpmn2:endEvent>

          <bpmn2:sequenceFlow id="flow1" name="" sourceRef="useWsStart" targetRef="callTheWS"></bpmn2:sequenceFlow>

          <bpmn2:sequenceFlow id="flow2" name="" sourceRef="callTheWS" targetRef="callSendBill"></bpmn2:sequenceFlow>

          <bpmn2:sequenceFlow id="flow3" name="" sourceRef="callSendBill" targetRef="waitState"></bpmn2:sequenceFlow>

          <bpmn2:sequenceFlow id="flow4" name="" sourceRef="waitState" targetRef="useWsEnd"></bpmn2:sequenceFlow>

        </bpmn2:process>

      </bpmn2:definitions>