Skip to content

Call C API through Java Native Interfaces

Java could call C API through Java Native Interfaces, we could implement that in following steps:
There should be a diagram to illustrate this process:

JAVA program –> JNI class –> .so/.dll (implement c API generated from JNI class) –> C APIs we want to call

==========================================

1. Build a Java class, declaring the native interfaces. These native interfaces are called by other classes who want to call the C APIs.

a example of JNI class:
——————————
package coresystem;
class Adapter {
native String call(String in);
static {
System.loadLibrary(“coresystem”);
}
}
——————————
Note:
a. We must declare all the APIs which we want to call them in java into native methods;
b. Native methods are loaded with the System.loadLibrary method. The argument to System.loadLibrary is a library name chosen arbitrarily by the programmer. The system follows a standard, but platform-specific, approach to convert the library name to a native library name. For example, a Solaris system converts the name coresystem to libcoresystem.so, while a Win32 system converts the same coresystem name to coresystem.dll.

2. Compiling:

creating class file:
# javac coresystem/Adapter.java
creating head file for native library:
# javah coresystem.Adapter
You could see a file named coresystem_Adapter.h was generated.

3. implement the C APIs descripted in coresystem_Adapter.h and create a .so file.
In this .so file, there should be the logic to call the C APIs that Java want to call.

# export JAVA_HOME=/usr/java/jdk1.7.0_45
# export PATH=$JAVA_HOME/bin:$PATH
# export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server/:$LD_LIBRARY_PATH
# export C_INCLUDE_PATH=$JAVA_HOME/include:$JAVA_HOME/include/linux
# gcc -g coresystem.c -o libcoresystem.so -shared

4. set environment for the new generated .so:

# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/jc

5. Run Java program, it works!
———————————-
package coresystem;
class Test {
public static final void main(String[] args){
Adapter adapter = new Adapter();
String response = adapter.call(args[0]);
System.out.println(response);
}
}
———————————-
javac coresystem/Test.java
java coresystem.Test hello

A Shell Script for managing Tibco iProcess Cluster

#!/bin/sh
# gelnyang@163.com , 2015/6/8

. /etc/profile

export ORACLE_SID=ORCL
export ORACLE_BASE=/oracle
export GRID_HOME=/grid/grid_home
export ORACLE_HOME=$ORACLE_BASE/db11g
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export ORACLE_OWNER=oracle
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export LANG=en_US.UTF-8

export SWDIR=/opt/bpm/swnod1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SWDIR/libs
export PATH=$PATH:/usr/sso/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sso/lib64
export SW_SYSCLASSPATH=$SWDIR/eaijava/libs/bootstrap/log4j-1.2.13.jar:$SWDIR/eaijava/libs/bootstrap/bootstrap.jar

datenow=$(date '+%Y%m%d')
USER=pro
sw_log_path=/tmp/iprocess/swbpm_$datenow.log
NODE1=IPESERVER1
NODE2=IPESERVER2
IPEPORT=1145
THREADPORTPREFIX=5578
TIMEWAIT=10

# check current node
CURR_NODE=$(hostname)
CURR_NODE=$(echo $CURR_NODE | tr '[a-z]' '[A-Z]')  
if [ "$CURR_NODE" == $NODE1 ]; then
    CURR_NODE=$NODE1
    REMOTE_NODE=$NODE2
else
    CURR_NODE=$NODE2
    REMOTE_NODE=$NODE1
fi

# create log directory
mkdir -p /tmp/iprocess/

function wait_ipe_thread_port_shutdown()
{
    portlength=$(netstat -anot |grep $THREADPORTPREFIX | tail -1 | wc -L)
    while (($portlength > 0 ))
    do
       echo "there are ports with prefix "$THREADPORTPREFIX", wait ..." >> $sw_log_path
       sleep 1
       portlength=$(netstat -anot |grep $THREADPORTPREFIX | tail -1 | wc -L)
    done
}

function start_ipe()
{
    echo "start iprocess on "$CURR_NODE >> $sw_log_path
    procmgrflag=$(/bin/ps -ef | grep $SWDIR"/etc/procmgr" | grep -v grep )
    if [ "$procmgrflag" != "" ]; then
        /bin/su $USER -c $SWDIR"/bin/swstart" >> $sw_log_path
    else
        wait_ipe_thread_port_shutdown
        /bin/su $USER -c $SWDIR"/bin/swstart -p" >> $sw_log_path
    fi
}

function shutdown_ipe()
{
    echo "shutdown iprocess on "$CURR_NODE >> $sw_log_path
    procmgrflag=$(/bin/ps -ef | grep $SWDIR"/etc/procmgr" | grep -v grep )
    if [ "$procmgrflag" != "" ]; then
        /bin/su $USER -c $SWDIR"/bin/swstop -f 10"
    fi
    processflag=$(ps aux | grep $SWDIR | grep -v grep |tail -1)
    if [ "$processflag" != "" ]; then
        ps aux | grep $SWDIR | grep -v grep | cut -c 9-15 | xargs kill -s 9 >> $sw_log_path
    fi
    if [ "$procmgrflag" != "" ]; then
        /bin/su $USER -c $SWDIR"/bin/swstop -p"
    fi
}

function set_master_slave()
{
    echo "set master to "$1",set slave to "$2 >> $sw_log_path
    /bin/su $USER -c $SWDIR"/util/swadm move_server 1 dummy" >> $sw_log_path
    /bin/su $USER -c $SWDIR"/util/swadm move_server 2 "$2 >> $sw_log_path
    /bin/su $USER -c $SWDIR"/util/swadm move_server 1 "$1 >> $sw_log_path
}

function is_current_master()
{
    echo "check whether current node is the master node" >> $sw_log_path
    master_flag=$(/bin/su $USER -c $SWDIR"/util/swadm find_master |tail -1 |grep "$CURR_NODE)
    if [ "$master_flag" != "" ]; then
        echo "current $CURR_NODE is master node" >> $sw_log_path
        echo "Y"
    else
        echo "current $CURR_NODE is slave node" >> $sw_log_path
        echo "N"
    fi
}

function get_remote_status()
{
    echo $(nc $REMOTE_NODE $IPEPORT < /dev/null; echo $?)
}


# add log header
echo "----------------------------" >> $sw_log_path
echo  $(date '+%Y%m%d%H%M%S')  >> $sw_log_path
echo "$0" "$1" >> $sw_log_path
echo "----------------------------" >> $sw_log_path

case "$1" in
    start)
        echo "Starting iProcess Engine Server" >> $sw_log_path
       
        portflag=$(netstat -anot | grep $IPEPORT | grep -v grep |tail -1)
        echo $portflag  >> $sw_log_path
        if [ "$portflag" == "" ]; then
            echo "no port "$IPEPORT" running on current node, calling shutdown first ...!" >> $sw_log_path
            shutdown_ipe
        fi
       
        master_flag=$(is_current_master)
        if [ "$master_flag" == "Y" ]; then
            echo "current is master, move server" >> $sw_log_path
            set_master_slave $CURR_NODE $REMOTE_NODE
        else
            echo "current is slave node" >> $sw_log_path
            remotealive=$(get_remote_status)
            if [ "$remotealive" != "0" ]; then
                echo "master can't connect, wait to check again later .." >> $sw_log_path
                sleep $TIMEWAIT
                remotealive=$(get_remote_status)
                if [ "$remotealive" != "0" ]; then
                    echo "master is dead, make current node as master " >> $sw_log_path
                    set_master_slave $CURR_NODE $REMOTE_NODE
                fi
            fi
        fi
       
        start_ipe
        ;;
    stop)
        echo "Shutting down iProcess Engine Server" >> $sw_log_path
        master_flag=$(is_current_master)
        if [ "$master_flag" == "Y" ]; then
            echo "current is master, switch it to slave" >> $sw_log_path
            shutdown_ipe
            set_master_slave $REMOTE_NODE $CURR_NODE
       
            remotealive=$(get_remote_status)
            if [ "$remotealive" != "0" ]; then
                echo "master can't connect, wait to check again later .." >> $sw_log_path
                sleep $TIMEWAIT
                remotealive=$(get_remote_status)
                if [ "$remotealive" != "0" ]; then
                    echo $REMOTE_NODE" is master,but not started,can't start slave on "$CURR_NODE >> $sw_log_path
                else
                    echo $REMOTE_NODE" is master,and already started,start slave on "$CURR_NODE >> $sw_log_path
                    start_ipe
                fi
            fi
        else
            remotealive=$(get_remote_status)
            if [ "$remotealive" != "0" ]; then
                echo "master node is dead on "$REMOTE_NODE >> $sw_log_path
                shutdown_ipe
               
            else
                echo "master node is live, do nothing for slave stopping" >> $sw_log_path
            fi
        fi
       
        ;;
    status)
        echo "Checking status for iProcess Engine Server: " >> $sw_log_path
        procmgrflag=$(/bin/ps -ef | grep $SWDIR"/etc/procmgr" | grep -v grep )
        if [ "$procmgrflag" == "" ]; then
            echo "no process sentinel thread ..." >> $sw_log_path
            exit 1
        fi
       
        #return OK only for master node
        portflag=$(netstat -anot | grep $IPEPORT | grep -v grep |tail -1)
        echo $portflag  >> $sw_log_path
        if [ "$portflag" == "" ]; then
            exit 1
        else
            exit 0
        fi
        ;;
    *)
        echo "Usage: $0 {start|stop|status}" >> $sw_log_path
        exit 1
        ;;
esac

Required Ports for Tibco iProcess Engine

111(RPC for Worckspace)
1145(TCP for Director Service)
8080(WEB for Workspace Browser)
10000-10025(PORT RANGE for Workspace)
28021-28031(PORT RANGE FOR SPO service)

Required Oracle Privilege for Tibco iProcess installation user

Tibco iProcess安装db帐号创建有两种方式,一种是给管理员帐号,安装的时候自动创建;另一种是提前创建好,安装的时候选择已经创建好的db帐号。 生产环境db帐号管控严格,需要提前创建帐号,需要知道帐号都需要什么权限。测试环境安装是通过第一种方式自动创建的,通过以下两个语法可以查看帐号都需要那些权限。

select * from session_privs;
——————————-
CREATE SESSION
UNLIMITED TABLESPACE
CREATE TABLE
CREATE CLUSTER
CREATE VIEW
CREATE SEQUENCE
CREATE PROCEDURE
CREATE TRIGGER
CREATE TYPE
CREATE OPERATOR
CREATE INDEXTYPE
QUERY REWRITE
MANAGE ANY QUEUE
ENQUEUE ANY QUEUE
DEQUEUE ANY QUEUE
CREATE EVALUATION CONTEXT
CREATE RULE SET
CREATE RULE

select * from user_role_privs;
——————————————–
USERNAME GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE OS_GRANTED
1 SWPRO AQ_ADMINISTRATOR_ROLE NO YES NO
2 SWPRO CONNECT NO YES NO
3 SWPRO RESOURCE NO YES NO

但安装的时候报执行初始化SQL语法错误,经查是对其中一个package body SSOLITE_MSG进行编译的时候报错,这个package body有引用DBMS_AQ,但报错DBMS_AQ没有定义,原因是没有DBMS_AQ执行权限,按照如下赋予权限重新安装即可:
GRANT EXECUTE ON DBMS_AQ TO swpro;
GRANT EXECUTE ON DBMS_AQ TO swuser;

Tibco iProcess Activity Monitoring and Work Queue Delta Publication

The TIBCO iProcess Engine can be enabled to publish both iProcess Engine activity information and iProcess Engine Work Queue Deltas to external applications, using JMS queues.

An activity is any instruction in the iProcess Engine that creates an audit trail entry, for example, Case started or Event Issued. You can configure any combination of step and/or activity to be monitored. This enables an external application to monitor important business events during the processing of cases.

A BG process can identify if a step is being processed and if activity monitoring has been configured for it. The BG process then sends details of the configured activities in XML format to the IAPJMS process.

Work Queue Delta publication enables an external application (iProcess Server Objects (Java) or iProcess Server Objects (.NET)) to monitor a queue and to retrieve only those work items in a given work queue that have changed since the subscription started. The WIS process sends messages reporting Work Queue changes to the IAPJMS process.

For both activity monitoring and Work Queue Delta publication, the IAPJMS process sends the XML message to a specified JMS topic, from which an external application (for example, iProcess Objects, iProcess Analytics or an external application that you have written yourself) can receive the JMS messages.

首次部署
1.将文件PSBC_IPE_MONITOR.xml放置到/opt/bpm/swnod1/util
2.创建pro用户
3.执行脚本
su – pro
cd /opt/bpm/swnod1/util
./swadm set_attribute 0 ALL 0 IAPJMS_PUBLISH 1
./swadm set_attribute 0 ALL 0 IAPJMS_SYNCHRONOUS 0
./swadm set_attribute 0 ALL 0 IAPJMS_ROLLBACK 0

4.修改文件$SWDIR/etc/staffcfg
STAFF/IAPSCHEMA==>1

5.注册监听步骤
cd /opt/bpm/swnod1/bin
./swutil IMPMONITOR PSBC_IPE_MONITOR.xml

6.在EMS创建TOPIC
cd /opt/tibco/ems/8.0/bin
./tibemsadmin
create topic IAPTOPIC

后续部署-需监听其他流程
1.修改PSBC_IPE_MONITOR.xml文件并将该文件放置到/opt/bpm/swnod1/util
2.注册监听步骤
su – pro
cd /opt/bpm/swnod1/bin
./swutil IMPMONITOR PSBC_IPE_MONITOR.xml

TIBCO iProcess Objects Director Configuration

The TIBCO iProcess Objects Director is a standalone program that maintains a list of TIBCO iProcess Objects Servers that are configured in a node cluster. When a client needs access to a TIBCO iProcess Objects Server, it first establishes a connection to the TIBCO iProcess Objects Director. The TIBCO iProcess Objects Director then decides, based on a “pick method,” which TIBCO iProcess Objects Server the client should connect to.

1.设置DIRECTOR属性
/opt/swnod1/util/swadm SET_ATTRIBUTE 1 DIRECTOR 0 BASE_TCP_SERVICE_NAME 28021
/opt/swnod1/util/swadm SET_ATTRIBUTE 1 DIRECTOR 0 TCP_SERVICE_NAME 1145
#bpmipe 为 iprocess server 域名
/opt/swnod1/util/swadm SET_ATTRIBUTE 1 DIRECTOR 0 IDENTIFY_SPO_MACHINE_BY bpmipe

2.修改配置
/opt/bpm/swnod1/seo/data/swentobjsv.cfg
TCPServiceName = 28021

3.重启IPE
su – pro
cd /opt/swnod1/bin
./swstop -p
netstat -anot |grep 5578
./swstart -p

注意:若$SWDIR/logs/spodirector01.log文件如果有以下错误,需执行4步骤
17098|EFB7FB90|03/02/2015 10:48:53.893|00000002|ERROR|check_for_spo_server(), failed to find SPO_SERVER

4.重启DIRECTOR进程
$SWDIR\util\swsvrmgr SHUTDOWN MachineID DIRECTOR ProcessInst
$SWDIR\util\swsvrmgr START MachineID DIRECTOR ProcessInst

Tibco iProcess Case Data Queue Parameter (CDQP)

Tibco iProcess Case Data Queue Parameter (CDQP) fields provide an efficient method of filtering on the value of fields in your work items. To make use of this functionality, you must first pre-designate the fields you want to filter on as CDQP fields. Fields are designated as CDQP fields with the utility, swutil. This utility is used to create a list, on the TIBCO iProcess Engine, of the case data fields that are available to use for filtering. See the TIBCO iProcess Engine Administrator’s Guide for information about using swutil.
=======================================================================================
To enter CDQP commands, use the following command:
./swutil QINFO

To add a field as a CDQP, or to change the definition of an existing CDQP, use the command:
F+FieldName,FieldSize,WQMDescription[,P]
where:
>> FieldName is the name of the iProcess field to be defined as a CDQP. FieldName must be less than or equal to 15 characters.
If the field is a composite field of the form TagName:FieldName, TagName must be less than 15 characters and FieldName must be less than 15 characters.
>> FieldSize is the size, in characters, of the CDQP. FieldSize must be less than or equal to 255.
>> WQMDescription is the name that will be used to represent this field in Work Queue Manager dialogs.
WQMDescription must be unique, and must be less than or equal to 39 characters.

=======================================================================================
To validate a set of new or updated CDQP configuration data before importing it, use the following command:
./swutil QINFO C:\TEMP\MYPROC.XFR PARSEONLY

=======================================================================================
To import a set of new or updated CDQP configuration data to the server, use the following command:
./swutil QINFO C:\TEMP\MYPROC.XFR

=======================================================================================
To import a set of new or updated CDQP configuration data to the server and publish it immediately, use the following command:
./swutil QINFO C:\TEMP\MYPROC.XFR PUBLISH

————————————–
[pro@IPESERVER bin]$ ./swutil QINFO /opt/swnod1/bin/cdqp.xfr PUBLISH
QINFO import: Started by ‘swadmin’ at 30/12/2014 15:42

QINFO import: Processing control file

lines processed successfully = 9
Control File Warnings: = 0
QINFO import: Completed at 30/12/2014 15:42

./swutil QINFO /opt/swnod1/bin/cdqp1.xfr PUBLISH
=======================================================================================
You can export CDQP definitions and mappings – either for the entire system, or for specific queues – using the following command:
./swutil QINFO EXPORT [queuename [GLOBAL]]
./swutil QINFO EXPORT

————————————–
[pro@IPESERVER bin]$ ./swutil QINFO EXPORT
R

;Global CDQPs
F+RELEASETYPE,1,releaseType
F+TELUSERTYPE,1,telUserType

;Default Group CDQPs
Q+SW_DEFAULT_CASEDATAQPARAM_GROUP
; d1
C+TELUSERTYPE
; d2
C+RELEASETYPE

;Default User CDQPs
Q+SW_DEFAULT_CASEDATAQPARAM_USER
; d1
C+TELUSERTYPE
; d2
C+RELEASETYPE

Windows regedit config file for Tibco iProcess RPC Server and SSO Client

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Staffware plc\Staffware Client\Default\RPC Servers]
"Server1"="IPEHOST,391875,1,IPE SERVER"

[HKEY_LOCAL_MACHINE\SOFTWARE\Staffware plc\Staffware SSO Client]
"TISOMultiChar"=hex(b):01,00,00,00,00,00,00,00
"TISOUnicodeConverterName"="UTF-8"

Single Tibco iProcess Node Installation Steps

================
PREVIOUS INSTALLATION
================
1. install oracle client;
2. copy tibco EMS library to a directory ;

================
Environment
================
192.168.5.224 CWVM224
192.168.5.225 CWVM225

192.168.5.220 bpmdb
192.168.5.221 emsserver

================
INSTALLATION STEPS
================
1. create user and group:
groupadd -g 502 staffwar
adduser pro -u 502 -g staffwar

2. configure /etc/profile or /home/pro/.bash_profile:
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/oracle/11.2.0.2/db_01; export ORACLE_HOME
ORACLE_SID=ORCL; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

ulimit -n 65535
NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
TISOUnicodeConverterName=UTF-8; export TISOUnicodeConverterName
TISOMultiChar=1; export TISOMultiChar

JAVA_HOME=/opt/bpm/swnod1/java; export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin; export PATH

SWDIR=/opt/bpm/swnod1; export SWDIR
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SWDIR/libs; export LD_LIBRARY_PATH

3. Execute the installer (./swinstall) as the user pro.
su – pro
./swinstall

4. installation detail:
1) agree License
2) choose the installation directory /opt/bpm/swnod1, and ignore version warning
3) chose install files and schema:
4) configure location, OS accounts menu;
pro as background user
swadmin as administration user
staffwar as user group
5) configuration options menu
iProcess Engine Client Password Required? (Y/N – default Y): N
Enable Prediction? (Y/N – default Y) : Y
Enable Activity Publication? (Y/N – default N) : Y
Enable iProcess Objects Director? (Y/N – default N) : Y
6) configure IAP using tibco EMS;
7) skip email plugin configuration
8) configure oracle db connection and account detail;
tns: ORCL
db admin: system
db schema: swpro3
db user:swuser3
support unicode encoding:Y
table space: STAFFWAR3 , size: 2048M, path:””
temporary table space: TEMP
9) configuration check
10) installation processing …
11) chose Y to verify installation
12) finish

================
POST CHECK STEPS
================
1. configure /etc/profile or /home/pro/.bash_profile:
SW_SYSCLASSPATH=$SWDIR/eaijava/libs/bootstrap/log4j-1.2.13.jar:$SWDIR/eaijava/libs/bootstrap/bootstrap.jar;export SW_SYSCLASSPATH

2. configure /opt/bpm/swnod1/seo/data/swentobjsv.cfg:
SEOPasswordRequired = 0
TCPServiceName = 1145
DBConnectionAccess = 1
IAPConfigAccess = 1

3. configure db pool in file /opt/bpm/swnod1/etc/staffcfg:
POOLSIZE,20
POOLGROWSIZE,10
MAXPOOLSIZE,100

4. test start and stop:
su – pro
$SWDIR/bin/swstart –p
$SWDIR/util/swsvrmgr status -v
$SWDIR/bin/swstop –p

Tips on TIBCO iProcess

From: http://it.toolbox.com/blogs/steel/tips-on-tibco-iprocess-34932

1. iPE can’t started after installing iProcess Technology Plug-ins.

Problem:

When I installed iPE, it started OK. But after I installed iProcess Technology Plug-ins and started iPE, some of the process always SUSPENDED status.

Reason:

Check the $SWDIR/logs/sw_warn, found following information:

2009/09/24 01:56:20.972188(BGPREDICT:1:10808:2::::pro:/proeai.c:80293:2531): 1867-‘EAIJAVA’ EAI Run-Time Plug-In failed to initialize, error SW_SYSCLASSPATH is not set!

Seems when we start iPE with iProcess Technology Plug-ins, the environment variable SW_SYSCLASSPATH is needed.

Resolve:

Change the folder to $SWDIR/eaijava/scripts, a shell file named env.sh can be found. Its content is like:

#!/bin/ksh

SW_SYSCLASSPATH=/data/iprocess/staffwar/eaijava/libs/bootstrap/log4j-1.2.13.jar:/data/iprocess/staffwar/eaijava/libs/bootstrap/bootstrap.jar

export SW_SYSCLASSPATH

#SWJVM_OPTIONS=”-Xrs”

#export SWJVM_OPTIONS

After executing this shell file, the SW_SYSCLASSPATH variable will be set up. Or you can add this script into the .bash_profile of the OS user that started the iPE.

Restart the iPE, it can be started and all processes are RUNNING status again.

2. Web Services Plug-ins registers failure.

Problem:

After installing Web Services server Plug-ins on the iPE server, following error had been got when try to deploy BPM process:

ERROR : EAI Error – Step SERVICET: There is no runtime plugin of type EAI_WEBSERVICES installed on this system.

Reinstall the Web Services server Plug-ins, the error still occurred. Seems the plug-in can’t work in the iPE server.

Reason:

Check the $SWDIR/logs, found there where error information in the eairegerror.log.

/data/iprocess/staffwar/util/sweaireg: error while loading shared libraries: sal.so: cannot open shared object file: No such file or directory

This is the reason caused the WEB Service Plug-ins register failure.

Resolve:

In the Linux system, add $SWDIR/libs into LD_LIBRARY_PATH environment variable. And change the folder to $TIBCO_HOME/iPEWebServicesPlugIn/eaiwebsvcs/scripts, execute register.sh.

Check the $SWDIR/logs, there is no information in eairegerror.log, and in the eaireg.log, following information would be found:

EAI Run-Time Plug-In Registration Successful:

EAI Type: EAI_WEBSERVICES

Machine: 1

Version: 10.6.1

Copyright: Copyright (c) 2002-2009 TIBCO Software Inc.

Library: /data/iprocess/staffwar/lib/EAIWEBSVCS_10_6_1.EAR

Init Params: /data/iprocess/TIBCO/iPEWebServicesPlugIn/eaiwebsvcs

This means the EAI_WEBSERVICES registered successfully.

Caution: To register the EAI_WEBSERVICES, you must let the iPE server started.

3. iProcess Service Task EAI call-out failed

Problem:

Deploy a BPM process that contained a BW Service Task on the iPE server, start a case of this process. When the BW Service Task step executed, following error had been got:

2009/10/02 15:36:08.369724(BG:3:3402:2:STARTEXA:352:SERVICET:p ro:/proeai.c:80293:3601): 1869-Procedure:STARTEXA EAI Step:SERVICET Case:352 EAI plug-in EAIRun_Call() failed, error: Error inside execute method of Java object – com.staffware.eaijava.FatalPluginException: Execution failed

at com.staffware.eaijava.impl.SWGenericPlugin.execute( SWGenericPlugin.java:597)

Caused by: com.staffware.eaijava.FatalPluginException: Execution failed

at com.staffware.eaiframework.runtime.library.engine.S WFramework.executeSync(SWFramework.java:471)

at com.staffware.eaijava.impl.SWGenericPlugin.execute( SWGenericPlugin.java:542)

Caused by: com.staffware.eaijava.FatalPluginException: Unable to execut

2009/10/02 15:36:08.373083(BG:3:3402:0:STARTEXA:352:SERVICET:p ro:/cplmain.c:80415:2381): 1631-WARNING: <-2>

2009/10/02 15:36:08.373130(BG:3:3402:2:STARTEXA:352:SERVICET:p ro:/swbgmbd.c:81039:1100): 1864-Transaction failure : Reason code = -2

On the EMS server, can’t find any messages. That means, the BW Service Task can’t send the message to the EMS server.

Reason:

Check the eaijava.log found following information:

com.staffware.eaijava.FatalPluginException: Execution failed

… 1 more

Caused by: com.staffware.integration.db.library.impl.UnknownFi eldException: Object does not exist in database

… 3 more

2009-10-02 15:36:08,360 [ERROR] SWAliasControlDAO – Unable to find destination

com.staffware.integration.db.library.impl.UnknownFi eldException: Object does not exist in database

Caused by: com.staffware.integration.db.library.impl.UnknownFi eldException: Object does not exist in database

2009-10-02 15:36:08,363 [FATAL] SWFramework – Execution failed

com.staffware.eaijava.FatalPluginException: Unable to execute handler

… 1 more

Caused by: com.staffware.integration.db.library.impl.UnknownFi eldException: Object does not exist in database

… 3 more

2009-10-02 15:36:08,365 [ERROR] SWGenericPlugin – execute() – SWParserException

com.staffware.eaijava.FatalPluginException: Execution failed

Caused by: com.staffware.eaijava.FatalPluginException: Unable to execute handler

… 1 more

Caused by: com.staffware.eaiframework.runtime.library.handler. SWHandlerException: Unable to lookup JMS destination

… 1 more

Caused by: com.staffware.integration.db.library.impl.UnknownFi eldException: Object does not exist in database

Resolve:

Seems the jmsadmin didn’t create the correct jndi in the EMS server. Create the jndiname using

create jndiname QUEUE_NAME queue QUEUE_NAME

Restart the procedure, the target BW process can be triggered.

4. Error when deploy forms on WebDAV Server

Problem:

Create a iProcess procedure in BS3.2 and generate some forms. In the deployment server, I had configured the WebDAV server. When I try to deploy module on this server, follow error had been got:

Deploying ‘\E-Commerce\Workspace Lite Forms\ProcessPackage’

Path is now ready on the server.

————-

Deploying ‘\E-Commerce\Workspace Lite Forms\ProcessPackage\ECommerceProcess’

Unable to create collection ‘[Locator http://vm-linuxel4:18080/webdav/Forms/ProcessPackag e/ECommerceProcess/]’ in the server. Server is not configured for the write access

Resolve:

Uncomment following lines in web.xml under installation directory>/WEB-INF to enable write access .

readonly false

5. Configure iProcess Workspace (Browser) for Tomcat

To configure the iProcess Workspace (Browser) for Tomcat, TIBCO iProcess Objects (Java) Software must be installed. All the jar files of TIBCO iProcess Objects (Java) Software should be copied to CATALINA_HOME/lib, libssoJNI.so file must be add to LD_LIBRARY_PAT variable.

6. iProcess Engine Pre Installation Configuration on Windows

Before installing iPE on Windows, following steps must be executed:

1. Control Panel->Administrative Tools->Component Services.

Select Component Services->Computers->My Computer, right key pop Properties->COM Security->Access Permissions->Edit Default, add current user and allow all

2. Control Panel->Administrative Tools->Local Security Policy->Local policies->User Rights Assignment.

Add current user and Administrators Group to follow items:

(1) Act as part of operating system

(2) Logon as a service

(3) Logon as a batch job

3. If your iPE is SQL Server version, you must do the following steps:

(1) Create new database, for example, [iprocessdb]

(2) Create new user [swpro] and [swuser], both of them add db_owner roles on iprocessdb.

(3) Create ODBC for iprocessdb.

During the installation you must select BASIC, if it’s your first installation.

7. Unlock the User or Procedure in iPE

Occasionally, Users or Procedures may be locked in the iPE. For example, the iPE crashed when a user login in it or Modeler crashed during the user open a procedure. After the iPE or Modeler restart, the locked users or procedures can’t be used. To unlock the user and procedure, you should modify the data in iPE database, all the tables belongs to swpro.

1. Unlock User

Modify the data in FLAT_TABLE, clean the USER_NAME field and set the AREA_LOCKED field as 0 if its value is 1.

2. Unlock Procedure

Following SQL script can be used to unlock the procedures:

delete swpro.procedure_lock where proc_id = (select proc_id from swpro.proc_index where proc_name like ‘%1′)

delete swpro.pm_objects_lock where object_guid = (select object_guid from swpro.pm_objects where object_name like ‘%1′)

‘%1’ is the procedure name.

8. How to resolve the issue after changing hostname

1. Run swconfig -v and save the output (licence period and serial number required for a new licence)

2. Backup the current licence file (%SWDIR%\staff.dat) (ex. copy staff.dat staff.dat.old)

3. Run the following command to create a new licence file with the correct hostname (this is a demonstration licence)

%SWDIR%\util\swconfig -n

4. Reset the database passwords for user swpro (background user) and swuser (foreground user)

%SWDIR%\util\swconfig -u

HINT: the passwords will be reset to the default one when you create a new licence

5. Start the services

If the server is now running you need a new full licence. To get one send an eMail to fulfillment@tibco.com with the new output of swconfig -v and the old information (serial number, time period).

創用 CC 授權條款
Geln's BlogGeln Yang製作,以創用CC 姓名標示-相同方式分享 3.0 Unported 授權條款釋出。
此作品衍生自sisopipo.com