com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Troubleshooting the Business Process Management Profile

This topic provides detailed guidance, helpful hints and solutions for troubleshooting issues related to the Business Process Management profile (EI Business Profile) of WSO2 EI. It includes solutions for critical issues and recommendations for handling them.

 

ItemLogPossible cause(s)/recommendation(s)
  1. Debugging a BPEL process  

Debug a BPEL process using the event table provided for each BPEL instance or the message tracer.  

Either of the following can be used to debug a BPEL process:

  1. Event Table in the Instance View of Management Console

  2. Message Tracer

2. Enable message tracing  

 

Get a message trace for a particular BPEL invocation.  

  1. Add the following entries to <EI_HOME>/lib/log4j.properties file.

    log4j.logger.org.wso2.carbon.bpel.messagetrace=TRACE
  2. Then change the threshold of the desired appender (i.e. CARBON_CONSOLE, CARBON_LOGFILE, etc.) to TRACE .
  3. By default, this is set to DEBUG. Find the following configuration property in the log4j.properties file and change it as follows.

    log4j.appender.CARBON_LOGFILE.threshold=TRACE
  4. Re-start the server and send a single request to the BPEL process.
  5. The log can be found at: EI_HOME/wso2/business-process/logs/wso2carbon.log

3. Cannot find DeploymentUnitDAO instance for package: Recover from inconsistencies of BPEL database against the registry  

ERROR - TenantProcessStoreImpl - Cannot find DeploymentUnitDAO instance for package CustomerInfo-2.

ERROR - BPELDeployer - Error deploying BPEL package:
CustomerInfo.zip

org.wso2.carbon.bpel.ode.integration.store.
BPELDeploymentException:
Cannot find DeploymentUnitDAO instance for package CustomerInfo-2.

at
org.wso2.carbon.bpel.ode.integration.store.TenantProcessStoreImpl.
loadExistingBPELPackage(TenantProcessStoreImpl.
java:579 )

at org.wso2.carbon.bpel.ode.integration.store.TenantProcessStoreImpl.
reloadExistingVersionsOfBPELPackage
(TenantProcessStoreImpl.java:442)

at org.wso2.carbon.bpel.ode.integration.store.TenantProcessStoreImpl.
deploy(TenantProcessStoreImpl.java:186)

at org.wso2.carbon.bpel.BPELDeployer.
deploy(BPELDeployer.java:90)

at org.apache.axis2.deployment.repository.util.DeploymentFileData.
deploy(DeploymentFileData.java:136)

at org.apache.axis2.deployment.DeploymentEngine.
doDeploy(DeploymentEngine.java:813)

  To recover, follow the steps mentioned below.

  1. Go to the management console of BPS MASTER node.

  2. Click on the “Browse” link in the left menu under the “Registry” sub menu.

  3. Then browse to “/_system/config/bpel/packages” collection.

  4. Click on the “Actions” link under “CustomerInfo” (i.e. process package name) collection. The collection should be similar to the package name shown in the exception.

  5. Click on the delete link.

  6. Restart the Master node first and then the Slave node.

4. Deployment Descriptor  

The deploy.xml file acts as the deployment descriptor for a BPEL package.  

It maps configuration information (partner links, WSDL service and port) for processes in a BPEL archive.  

5. Does not contain a deploy.xml file

 

 

 

 

 

 

TenantProcessStoreImpl - Directory BPS_HOME/repository/bpel/-1234/FunctionProcess-4 does not contain a deploy.xml file!
java.lang.IllegalArgumentException: Directory BPS_HOME/repository/bpel/-1234/FunctionProcess-4 does not contain a deploy.xml file!
at org.apache.ode.store.DeploymentUnitDir.<init>(DeploymentUnitDir.java:123)

The following issues are common:

1. Missing deploy.xml file in the process archive (BPEL zip package).  

OR

2. Invalid package structure. The BPEL archive structure should be similar to the structure shown below. 

6. BPEL Compilation Failure: Invalid QName value  

BpelC - info: [CompilingProcess] Compiling BPEL process.
ERROR - BPELDeployer - Error deploying BPEL package: CustomerInfo.zip
org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException:
Invalid QName value: Localname not a valid NCName in ''

  1. Invalid configuration done in deploy.xml file.
  2. Process name value is missing. E.g.: <process name="">  

7. Cannot find Process definition for type

BPELDeployer - Error deploying BPEL package: TestCounter.zip

org.wso2.carbon.bpel.ode.integration.store.BPELDeploymentException: Aborting deployment. Cannot find Process definition for type {http://www.apache.org/ode/schemas/dd/2007/03} test_name.  

  1. The process QNames given in the deploy.xml file and the BPEL configuration (.bpel) file should match.  

    OR
  2. Namespace prefix might be missing in the process element. E.g.: <process name=" lpns :LoanProcess">

 

8. BPEL Deployment Failure: Invalid boolean value  

org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid boolean value

The <active/> element can have either true or false as the value.  

Check for <active> .. </active> in the deploy.xml file.

9. Cannot find WSDL definition for provide service  

org.apache.ode.bpel.iapi.ContextException: Cannot find WSDL definition for provide service

{http://wso2.org/bps/samples/CustomerInfo}CustomerInfoService1. Required resources not found in the BPEL package CustomerInfo-12.

  1. The service name given in the deploy.xml file and the wsdl should match.  

    OR
  2. Namespace prefix might be missing in the service element. E.g.: <service name=" tns :CustomerInfoService" port="CustomerInfoPort"/>

10. Cannot find provide port in the given service  

org.apache.ode.bpel.iapi.ContextException: Cannot find provide port in the given service { http://wso2.org/bps/samples/CustomerInfo}CustomerInfoService . Error in deploy.xml

The port name given in the deploy.xml file and the WSDL should match. E.g.: <service name="tns:CustomerInfoService" port="CustomerInfoPort "/>  

11. Reference to unknown partner link  

org.apache.ode.bpel.iapi.BpelEngineException: Error in deployment descriptor for process { http://wso2.org/bps/samples/CustomerInfo}CustomerInfo-12 ; reference to unknown partner link CustomerInfoPL1

The partner link name(s) given in the deploy.xml file and the BPEL configuration (.bpel) file should match. E.g.: <provide partnerLink=" CustomerInfoPL1 ">  

12. BPEL Process Configurations  

It represents activities carried out within a business process written using WS-BPEL.

There are two types of Activities as follows:

  1. Basic Activities.
  2. Structured Activities.  
  1. Basic Activities:   Invoke, Receive, Reply, Assign, Compensate, CompensateScope, Exit, Throw, Empty, Rethrow, Wait  
  2. Structured Activities: Flow, ForEach, If, Pick, RepeatUntil, Scope, Sequence, While

13. Attempt to reference undeclared variable  

BpelC - null:60: error: [UndeclaredVariable] Attempt to reference undeclared variable "tmpVar" 

Declare variables by specifying a name and one of the three type attributes such as type, messageType or element. E.g.:

<variable name="tmpVar1" type="xsd:string"/>
<variable name="tmpVar2" messageType="myNS:myWSDLMessageDataType" />
<variable name="tmpVar3" element="myNS:myXMLElement" />

 

14. bpel:Compilation Failure  

cvc-complex-type.2.4.d: Invalid content was found starting with element 'from'. No child element is expected at this point

cvc-complex-type.2.4.a: Invalid content was found starting with element 'from'. One of '{"http://docs.oasis-open.org/wsbpel/2.0/process/executable":documentation, WC[##other:"http://docs.oasis-open.org/wsbpel/2.0/process/executable"], "http://docs.oasis-open.org/wsbpel/2.0/process/executable":targets,
" http://docs.oasis-open.org/wsbpel/2.0/process/executable":sources ,
"
http://docs.oasis-open.org/wsbpel/2.0/process/executable":copy ,
"
http://docs.oasis-open.org/wsbpel/2.0/process/executable":extensionAssignOperation }' is expected.

The Assign activity is faulty.  E.g.: The error line starts from ' from '.  

Error is due to a missing child element <copy> which is found within the <assign> element.

The corrected assign operation is shown below. E.g.:

<assign name="assign1">
         <copy>     
          <from variable="myVar" part="TestPart"/>
          <to variable="tmpVar"/>
       </copy> 
</assign>

The assign activity contains one or more copy operations. Each copy operation has a from–spec and a to–spec, indicating the source and target elements where data gets copied from and to, respectively.

15. bpel:selectionFailure Fault: 01

 

 

 

 

INFO - ASSIGN - Assignment Fault: {http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,
lineNo=167,faultExplanation={http://docs.oasis-open.org/wsbpel/2
.0/process/executable}selectionFailure: No results for expression: '$createSessionRequest.parameters/bpws:session/forCustomerId' against '<?xml version="1.0" encoding="UTF-8"?>

  1. The XPath expression is invalid or the XML content in the variable, against which the XPath gets executed is invalid.
  2. Check the namespaces in the XPath expression or check the XML content in the variable.   E.g.: forCustomerId’ should be namespace qualified.  

Namespace Definition: 

xmlns:abc="http://www.abc.com/xyz/test_Session_Service/" 
use namespace qualified xpath expression as "$createSessionRequest.parameters/abc:session/abc:forCustomerId"  

OR  

"$createSessionRequest.parameters/abc:session/*[local-name() = 'forCustomerId']".

(use local-name = 'someString' to avoid namespaces verification)  

16. bpel:selectionFailure Fault: 02  

selectionFailure: No results for expression: {OXPath10Expression TestNumber}

Specify the namespace of the TestNumber element.   E.g.:

xmlns:sample="http://www.sample.org/namespace" 
 
<bpel:to part="parameters"  variable="AuthRequest"> 
   <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> 
      <![CDATA[sample:TestNumber]]> 
   </bpel:query> 
</bpel:to> 


17. Couldn't validate properly expression doXslTransform

XPath20ExpressionCompilerBPEL20 - Couldn't validate properly expression doXslTransform("HelloXslWorld.xsl", $myVar.TestPart, 'middle', $otherVar)

Add the namespace prefix to the assign activity.  

Namespace Definition: xmlns: bpws ="http://docs.oasis-open.org/wsbpel/2.0/process/executable"  

Assign operation:

<assign validate="no" name="XSLT"> 
	<copy> 
		<from>
			<![CDATA[bpws:doXslTransform ("transform.xslt", $requestLoanRequest.request)]]>
		</from> 
		<to>
			<![CDATA [$riskAssessmentRequest.request]]>			
		</to> 
	</copy> 
</assign>

   

18.UndeclaredPropertyAlias:propertyAlias with correlation sets  

[UndeclaredPropertyAlias] The property "{http://tempuri.org/services/loanApproval}correlatorProp" does not have an alias for message type "OMessageVarType#41
({http://tempuri.org/services/loanApprover}loanApprovalResponse)".

If there are two places where correlation is used, there should be at least two " propertyAlias " definitions, unless you use the same wsdl message in both places. I.e.:  

  1. One for the <invoke> activity's output variable.

  2. One for the <receive> activity's variable.

You need to have an element per message to map the correlation property. The type of the element of the message should be similar to the type of the correlation property.

A sample configuration for correlation initialization is shown below:

<invoke>
	<correlations> 
            <correlation set="correlator" initiate="yes" pattern="response">
			</correlation> 
	</correlations> 
</invoke>

19. Service already used by another process  

ERROR - TenantProcessStoreImpl - Service: {http://wso2.org/bps/samples/LoanProcess}LoanProcessService already used by another process. Try again with a different service name 

Either of the following can be the reason.

  1. When deploying multiple BPEL packages which have identical service names.

    OR
  2. When renaming and deploying the same BPEL package previously deployed. Since both packages have the same service names, an error is thrown.

Solution is to use different service names.

20. Engage WS-Addressing  

WS-Addressing module is engaged by default. It is mandatory to use WS-Addressing when invoking services.

Define the soapAction ’ inside <soap:operation/> to use WS-Addressing. E.g.:  

<soap:operation soapAction="urn:getCustomerSSN" /> 

21. Datasources Configurations  

Following files are used to hold the information on datasources.

  • bps-datasources.xml file holds information which is required to create datasource for bpel and humantask.
  • activiti-datasources.xml file holds the configuration details to create the datasource for bpmn related information.

A sample bps-datasources configuration is shown below.  

<datasource>
            <name>BPS_DS</name>
            <description></description>
            <jndiConfig>
                <name>bpsds</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:mysql://localhost:3306/bps</url>
                    <username>wso2carbon</username>
                    <password>wso2carbon</password>
                        <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                    <testOnBorrow>true</testOnBorrow>
                    <validationQuery>SELECT 1</validationQuery>
                  <validationInterval>30000</validationInterval>
            <useDataSourceFactory>false</useDataSourceFactory>
		    <defaultAutoCommit>true</defaultAutoCommit>
 		    <maxActive>100</maxActive>
                    <maxIdle>20</maxIdle>
		    <maxWait>10000</maxWait>
                </configuration>
            </definition>
        </datasource>

A sample activiti-datasources configuration is shown below.  

<datasource>
            <name>ACTIVITI_DB</name>
            <description>The datasource used for activiti engine</description>
            <jndiConfig>
                <name>jdbc/ActivitiDB</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:mysql://localhost:3306/act</url>
                    <username>wso2carbon</username>
                    <password>wso2carbon</password>
         <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                    <maxActive>50</maxActive>
                    <maxWait>60000</maxWait>
                    <testOnBorrow>true</testOnBorrow>
                    <validationQuery>SELECT 1</validationQuery>
                  <validationInterval>30000</validationInterval>
                </configuration>
            </definition>
        </datasource>

22. Empty password for datasource  

ERROR - BPELServerImpl - Error creating BPELDatabaseCreator
javax.naming.NamingException [Root exception is java.lang.NullPointerException]

[Known Issue]  

The datasource password value cannot be empty on the files bps-datasources.xml and activiti-datasources.xml.  

<password>xxxxx</password>

23. Cannot find DeploymentUnitDAO instance for package  

WARN - ProcessStoreImpl - Cannot find deployment unit information on DB for deployment unit LoanService-4
[2011-12-01 14:59:42,670] ERROR - TenantProcessStoreImpl - Cannot find DeploymentUnitDAO instance for package LoanService-4.
[2011-12-01 14:59:42,671] ERROR - BPELDeployer - Error deploying BPEL package: LoanService.zip
org.wso2.carbon.bpel.core.ode.integration.store.BPELDeploymentException: Cannot find DeploymentUnitDAO instance for package LoanService-4.

You might have initially started the server with invalid datasource configurations and later tried to restart the server by modifying the configurations. In that case, the server will throw a BPEL package deployment error.  

To recover, follow the steps mentioned below.

  1. Go to the BPS management console.

  2. Click on the “Browse” link in the left menu under the “Registry” sub menu.

  3. Then browse to “/_system/config/bpel/packages” collection.

  4. Then click on “Actions” link under “LoanService” collection. The collection should be similar to the package name shown in the exception.

  5. Then click on the delete link.

  6. Then restart the server.  

24. Wrong user name or password in registry dbConfig:Failed to create database tables for registry resource store  

FATAL - DatabaseCreator - Failed to create database tables for registry resource store. Cannot create PoolableConnectionFactory (Wrong user name or password [8004-140])

  1. Wrong user name or password in the dbConfig in the registry.xml file.
  2. Check for the values given for the following elements.

    <userName>wso2carbon</userName>
    <password>wso2carbon</password>

     

25. Cannot create JDBC driver of class  

Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'mysql://localhost:3306/bps'
java.sql.SQLException: No suitable driver

To recover, follow the steps mentioned below:

  1. Place the relevant database driver in the EI_HOME/lib directory.

  2. Check for the validity of the following datasource configuration property value on the files bps-datasources.xml and activiti-datasources.xml.

    <driverClassName>com.mysql.jdbc.Driver</driverClassName> 

     

26. Failed to resolved external DataSource at..

ERROR - Database - Failed to resolved external DataSource at "bpsds".
javax.naming.NameNotFoundException: bpsdsaa
ERROR - BPELServerImpl - Error starting database connections, check the database configuration!
org.apache.ode.il.dbutil.DatabaseConfigException: Failed to resolved external DataSource at "bpsds".

  1. The datasource name in the  bps-datasources.xml and bps.xml files should match.
  2. In bps.xml, we have an element to define the datasource name as shown below:

    <tns:DataSource name="bpsds">

27. Instance creation failed with correlationViolation

axis2ns2:correlationViolation - Error message in the client side

This error occurs when already there is an active instance associated with the same correlation value that's being used to create the latest instance.

As a solution, unique correlation value should be used to create new instance.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.