Quantcast
Channel: Indrayan's SOA Blog
Viewing all 62 articles
Browse latest View live

Unable to start opmn "RCV: Permission denied" solution

$
0
0

  • Issue

Earlier user have started/stopped the opmn process as an incorrect user (such as root) but are now logged in as the unix user that owns the Application Server installation. The AS unix owner then experiences permission related errors communicating with the root initiated OPMN process. He will not be able to start/shutdown the opmn related processes.

  • Implementation

ØFirst check the ownership of the running "opmn -d" processes using below command:

$ ps -ef|grep 'opmn -d'|grep -v 'grep'

root 31011 1 0 09:08 ? 00:00:00 /as1013/app/oracle/product/mid101300a/opmn/bin/opmn -d

root 31012 31011 0 09:08 ? 00:00:00 /as1013/app/oracle/product/mid101300a/opmn/bin/opmn -d

ØLog in to the UNIX account that owns the current "opmn -d" processes (this may require root privileges).

ØUse "opmnctl stopall" to stop the opmn daemon and all processes

ØUse "ps -ef|grep 'opmn -d'|grep -v 'grep'" to confirm the two "opmn -d" processes have been terminated.If not terminated - use "kill -9 " on each PID to force this if necessary (again, this may need root privileges)

ØReview the PID column from the "opmnctl status -l" and confirm that each process has been stopped.If not stopped simialrly use "kill -9 " on each PID to force this if necessary (again, this may need root privileges)

ØFor the directory of each OC4J instance that exists below $ORACLE_HOME/j2ee,

rename the "persistence" directory to "persistence.old"

ØOr else an alternative to earlier step delete .lock files in the persistence folder. The owner

should be the user with which the opmn was started/shutdown last time [like root in our case] . (again, this may need root privileges)

ØConfirm if any files under the $ORACLE_HOME have been created under the incorrect unix account with below command

$ find $ORACLE_HOME -user root –print

ØWith the exception of files below the $ORACLE_HOME/Apache/Apache/bin directory,use "chown" to reset the owner and group of each files that has changed.

ØLog out from the incorrect UNIX account and log back in as the UNIX user owning the AS installation.

ØStart opmn and desired managed processes.Should work fine.


Setting BPEL Timeout Parameters

$
0
0

The values to which you set the transaction-timeout and syncMaxWaitTime properties can impact whether a transaction scope successfully completes or times out and catches exception errors. For example, assume you have two processes:

TimeoutSubprocess (A synchronous detail process that includes a wait activity set to three minutes)

TimeoutMainProcess (An asynchronous main process that calls the TimeoutSubprocess)

If syncMaxWaitTime is set to 45 seconds (the default value) and transaction-timeout is set to 30 seconds, after 45 seconds the main process continues running and does not successfully complete and catch the following exception error as expected:

com.oracle.bpel.client.delivery.ReceiveTimeOutException

In the domain.log file, the following exception error displays:

An exception occurred during transaction completion:; nested exception is:

javax.transaction.RollbackException: Timed out

javax.transaction.RollbackException: Timed out

Perform the following procedures for the main process to successfully complete and catch the exception error.

Set the transaction-timeout and syncMaxWaitTime properties as follows:

Property:

transaction-timeout

File Location:

$SOA_Home\j2ee\home\config\transaction-manager.xml

This Value Must Be:

Larger than the transaction-timeout value in orion-ejb-jar.xml and the syncMaxWaitTime value.

Example:

7200


Property:

transaction-timeout

File Location:

$SOA_Home\j2ee\home\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml

This Value Must Be:

Less than the transaction-timeout value in transaction-manager.xml.

Note: You must set all transaction-timeout properties that display in this file.

Example:

3600


Property:

syncMaxWaitTime

File Location:

$SOA_Oracle_Home\bpel\domains\domain_name\config\domain.xml

where domain_name is the name of the domain to which you are deploying.

This Value Must Be:

Less than the transaction-timeout value in orion-ejb-jar.xml.

Example:

240

Illegal State Exception BRM Invocation Solution

$
0
0

ISSUE:

While invoking BRM Opcode BPEL Process gets failed with below mentioned error:

java.lang.IllegalStateException: New ManagedConnection cannot be

created for a thread which is already in BRM transaction).

SOLUTION:

The JCA Resource Adapter does not support nested transactions.

In case of a BPEL Process invoking multiple opcode above mentioned error occurs.

To set up JCA Resource Adapter transaction management in BPEL, perform the following:

In the BPEL client, set these BPEL partnerLink properties:

cacheConnections=false

useJCAConnectionPool=true

Also make sure in the JCA Resource adapter, a private connection pool is created for the connection factory.

After modification bpel.xml should look like below.

<partnerLinkBinding name="BRMTXNService">

<property name="wsdlLocation">BRMTXNServiceRef.wsdl</property>

<property name="cacheConnections">false</property>

<property name="useJCAConnectionPool">true</property>

</partnerLinkBinding>

<partnerLinkBinding name="BRMBILLService">

<property name="wsdlLocation">BRMBillServiceRef.wsdl</property>

<property name="cacheConnections">false</property>

<property name="useJCAConnectionPool">true</property>

</partnerLinkBinding>

Resource Exception BRM Invocation Solution

$
0
0

ISSUE:

While invoking BRM Opcode BPEL Process gets failed with below mentioned error:

WSIF JCA Execute of operation $OPCODE_NAME' failed due to: null; nested exception is:

javax.resource.ResourceException</summary>

</part>

-<part name="detail">

<detail>javax.resource.ResourceException

</detail>

SOLUTION:

Resolution:

Add<property name="cacheWSIFPort">false</property>

in the partnerlink binding in bpel.xml of the partnerlink invoking which this error is coming.

Another resolution is to try clearing the wsdl cache at BPELConsole->BPEL Process-> Clear the wsdl cache.

Unix Disk usage folderwise

$
0
0
Below given script will give the disk usage against each folder/files under any directory in a ascending manner.


du -sh $(echo $(du -sk $FILE_PATH/*|sort -n|awk '{print $2}'))

eg : du -sh $(echo $(du -sk /aiaapp/oracle/product/10.1.3.1/OracleAS/*|sort -n|awk '{print $2}'))

This will give a output result as given below:


Below given is the step by step understanding & processing logic of script :

i)du -sk $FILE_PATH/*

This will give the details of all folders/files & their sizes directly under $FILE_PATH

ii)du -sk $FILE_PATH/*|sort –n

This will sort the list based on file size

iii)du -sk $FILE_PATH /*|sort -n|awk '{print $2}'))

This will just pick the the second elements of each row (which is the file/folder name) inascending manner of their respective sizes.

iv)du -sh $(echo $(du -sk $FILE_PATH/*|sort -n|awk '{print $2}'))

This will display the file/folder sizes in Human understandable format in sequential format based on their sizes.

Essential JARs For using BPEL API

$
0
0

Issue

To do various kinds of activities using BPEL API through java various jar files are required. Below topic will go through the required jars and thee errors which will pop up in absence of these jars.

Error Msgs and corresponding jars

The very first jar required is orabpel.jar .In absence of which the java code won’t compile.Now while trying to run the code below error may occur.

Exception in thread "main" java.lang.NoClassDefFoundError: javax/ejb/EJBException

at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)

at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)

at InvokeBPELProcess.InvokeBPELProcessBPELDelegator.main(InvokeBPELProcessBPELDelegator.java:39)

222Process exited with exit code 1.

To resolve this ejb.jar has to be added in class path.

Next error which may occur will look like below:

java.lang.NoClassDefFoundError: com/collaxa/common/util/NonSyncPrintWriter

at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)

at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:67)

at InvokeBPELProcess.InvokeBPELProcessBPELDelegator.main(InvokeBPELProcessBPELDelegator.java:36)

To resolve this orabpel-common.jar has to be added in class path.

Next error which may occur will look like below:

java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:java.naming.factory.initial

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)

at javax.naming.InitialContext.lookup(InitialContext.java:351)

at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)

at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:67)

at InvokeBPELProcess.InvokeBPELProcessBPELDelegator.main(InvokeBPELProcessBPELDelegator.java:36)

".

at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)

at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:67)

at InvokeBPELProcess.InvokeBPELProcessBPELDelegator.main(InvokeBPELProcessBPELDelegator.java:36)

To resolve this oc4j-internal.jar has to be added in class path.

Next error which may occur will look like below:

java.lang.NoClassDefFoundError: oracle/ias/opmn/optic/OpticException

at com.evermind.util.OpmnHelper.(OpmnHelper.java:24)

at com.evermind.server.rmi.RmiServerLookupStrategy$StandardOpmnServerAccess.getOc4jServers(RmiServerLookupStrategy.java:160)

at com.evermind.server.rmi.RmiServerLookupStrategy$OpmnLookupStrategy.getAvailableServers(RmiServerLookupStrategy.java:120)

at com.evermind.server.rmi.RMIClientContext.establishLookupConnections(RMIClientContext.java:139)

at com.evermind.server.rmi.RMIClientContext.establishRemoteConnections(RMIClientContext.java:165)

at com.evermind.server.rmi.RMIInitialContext.get(RMIInitialContext.java:62)

at oracle.j2ee.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:59)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

at javax.naming.InitialContext.init(InitialContext.java:223)

at javax.naming.InitialContext.(InitialContext.java:197)

at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:277)

at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)

at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:67)

at InvokeBPELProcess.InvokeBPELProcessBPELDelegator.main(InvokeBPELProcessBPELDelegator.java:36)

To resolve this optic.jar has to be added in class path

Coclusion is to run java code using BPEL API below mentioned jars ahd to be added.

  • Orabpel.jar
  • Ejb.jar
  • Orabpel-common.jar
  • Oc4j-internal.jar
  • Optic.jar

Reset Oc4jadmin Password

$
0
0

ISSUE:

Change/reset Administrator oc4jadmin password.

SOLUTION:

Resolution:

This can be done through emconsole. Below link provides detailed description.

http://download.oracle.com/docs/cd/B25221_04/core.1013/b25209/em_app.htm#i689921

Else one can do that from backend by modifying system-jazn-data.xml

Directory path:$ORACLE_HOME/j2ee/oc4j_soa/config/system-jazn-data.xml

The entry present in the xml is in below format.

oc4jadmin

OC4J Administrator

F234B530880811DEBF9D03E546348A3E

OC4J Administrator

{903}0SCfAGt90uILf1cUSV97aL2Bh5x0ZeUq

The password {903}2mMf8AwiAD2RlORu0VnuP0JkdKIlPmzc is in encrypted format.

To change the password change the content as given below:

!New_Password with New_Password being new password &”!” should be there indicating to make it encrypted.

One can also assign/change roles using this file.

Connect To Db With Connection URL

$
0
0

ISSUE:

Connect to a database where one don’t have the SID of a Database instance.

SOLUTION:

Resolution:

This can be done providing the whole Database connection url within quotes while connecting to db instance as given below.

sqlplus /nolog

conn user/pwd@'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = catabcd136)(PORT = 1545))) (CONNECT_DATA = (SERVICE_NAME = TERABCD) (SERVER = DEDICATED)))'

Or else directly connecting using

sqlplus user/pwd@'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = catabcd136)(PORT = 1545))) (CONNECT_DATA = (SERVICE_NAME = TERABCD) (SERVER = DEDICATED)))'


Handy Unix Command

$
0
0

Below given are few important unix scripts:

vThis will replace presence of “bbb” in all of the files with “aaa” recursively.

find ./ -type f-exec sed -i 's/bbb/aaa/'{} \;

vThis will find all the files containing “aaa” recursively and redirect the list to a_list.log.

find ./ -type f-exec grep -l 'aaa' {} \; > a_list.log ;

vFind and Copy files from multiple directories into one directory

find . -iname "*.log" -exec cp {} /home/oracle/Entire_Log_Files \;

vTo remove multiple files such as *.jpg or *.sh with one command find, use

find . -name "FILE-TO-FIND"-exec rm -rf {} \;

OR

find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;

The only difference between above two syntax is that first command can remove directories as well where second command only removes files.

Clob Data Insertion Issue Through BPEL

$
0
0

ISSUE:

When trying to insert a record into a CLOB with a size greater than 32KB using the DB Adapter you receive the following error in the logs;

java.sql.SQLException: setString can only
process strings of less than 32766 chararacters Internal Exception:
java.sql.SQLException: setString can only process strings of less than 32766
chararacters Error Code: 17157 when trying to insert record in clob type of
size more then 32766 characters

SOLUTION:

For 10.1.3.x release, the following steps also need to done,
1. create a new connector factory/modify existing one in $OracleHome/j2ee/oc4j_soa/application-deployments/default/DbAdapter/oc4j-ra.xml to map the JNDI location defined in DB Adapter wsdl file, verify that the property "usesStreamsForBinding" and "usesStringBinding" are set to "true". e.g.

Developing WebService From PLSQL Package

$
0
0

Introduction

Objective is to expose a pl/sql functionality as a Web-Service using JDeveloper.

This document will provide detailed information to do the above mentioned procedure.

Also this document will guide through the steps to deploy the Web-Service in Application Server and make it available to external world.

Body is Empty Error Solution

$
0
0

Issue

If a BPEL process invokes another BPEL process/Web service and in return gets empty SOAP BODY then it might throw below mentioned error.

exception on JaxRpc invoke: invalid SOAP envelope: body is empty

Suppose a BPEL process “A” invokes another BPEL process/Web service “B” .Now BPEL process B in return sends a SOAP Msg with empty SOAP BODY as given below.

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

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

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

testproj.com/common/header/">

2902465

2010-04-12T15:19:42-05:00

Once received process A will get below mentioned error

exception on JaxRpc invoke: invalid SOAP envelope: body is empty

Understanding issue & work around logic

It seems if the message do not contain any SOAP Body BPEL parser throw below mentioned error.

One workaround we did was to add a dummy SOAP Body in the message.Actually BPEL process A was invoking external web-service through OWSM.We added one Transformation in Response PIPELINE to add a dummy SOAP Body to bypass the error.

Implementation

ØIn Response Pipeline an XML Transform Step was added as given below.

ØThe Step was configured with proper xsl filepath in server.

ØBelow given is the xsl used to add dummy SOAP Body.One can customize or create a similar xsl as required.


To Pass Complex element as parameter in xslt

$
0
0

1.Introduction

Objective is to pass a parameter which is itself of complex type through xslt.

This document will provide a detailed implementation of the steps to be followed to perform this activity.

2.Execution Approach:

Below are the steps to pass a parameter value(which is a complex element) through xslt:

A..First we have created one param variable and assign its name as ”order”.

B. After that we have assigned input variable to the value part of the param variable.We used ora:getContentAsString() to convert the value of input variable to string.

C.We passed the param variable as a parameter to xslt.

D.In xslt we have first assigned the value of param variable in a temporary variable(name: varParentAccounts).After that we used orcl:parseEscapedXML() function on the temporary variable to get the parsed values and mapped the values to the output variable accordingly.

Sample BPEL Project attached herewith given below.

3.Purpose of using Functions:

a.ora:getContentAsString() takes structured XML data as a parameter and returns a string.Without using ora:getContentAsString() one will get the below error:

“oracle.xml.parser.v2.XMLParseException: Start of root element expected”.

Where xmlns:ora=http://schemas.oracle.com/xpath/extension

b.orcl:parseEscapedXML() function converts the string data into proper

XML format.Without using orcl:parseEscapedXML()one will get the below error:

“XML-22036: (Error) Cannot convert string to NodeSet”

Where xmlns:orcl=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc

Data Level Encryption In BPEL

$
0
0

Occasionally we require hiding of some data due to confidentiality. To achieve the same sometime the whole data should be encrypted or sometime may be only a particular field needs to be encrypted.

Configuration can be done in owsm to do the same. This doc guides to how to configure owsm to encrypt/decrypt data at field level.

AIA Data Purging

$
0
0

The cube data & esb transaction data which are stored in orabpel/oraesb schema will be deleted via database script after every regular interval.

Database Cleaning:

Description:

The transactional data which are stored in oracle database (orabpel Schema) for BPEL Instances in table

i)CUBE_INSTANCE

ii)CUBE_SCOPE

and data which are stored in oracle database(oraesb Schema) for esb transactions, in below tables

i)ESB_TRANSACTION_STATUS

ii)ESB_TRACKING_FIELD_VALUE

iii)ESB_FAULTED_INSTANCE

iv)ESB_INSTANCE_RELATION_XML

v)ESB_SERVICE_RELATION

vi)ESB_RELATION_XML

vii)ESB_ACTIVITY

Stored Procedure:

a) Delete_CUBE_Data.sql


b) Delete_ESB_Data.sql

Procedure to run:

To execute the procedure below commands have to be run from SQL prompt:

call Delete_ESB_Data(date_start, date_end);

call Delete_CUBE_Data(date_start, date_end);

The passed dates should be passed in 'YYYY/MM/DD' format,

e.g. call Delete_ESB_Data('2009/02/10','2009/12/02');


Re Enqueue data in Aqueue

$
0
0
Say system X posted an message in TEST_REQ_QTAB.From which message gets de-queued. If we use below mentioned command, the message will again be acting like freshly inserted data from System X and will again get de-queued.

Command:

update TEST_REQ_QTAB X
set X.deq_time =null , X.STATE=0
where to_char(X.DEQ_TIME,'YYYY-MM-DD HH-MI)='2009-12-11 03-49'
and X.user_data.header.type='$Header_Type';

Using similar statement one can play with the system X payload as well present in the user_data.text_vc field.


update TEST_REQ_QTAB X
set
X.deq_time =null ,
X.STATE=0,
X.user_data.header.type='$New_Header_Type',
X.user_data.text_vc='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SubscriptionData xmlns="http://wireless.xyz.com/wsi/model/Subscrption" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Info>
<mdn>4932023072</mdn>
<authorizedBy>auth</authorizedBy>
<billFirstName>aaffl</billFirstName>
<billLastName>aaahj</billLastName>
<businessName>dfg</businessName>
</Info>
</SubscriptionData>'
where to_char(X.ENQ_TIME,'YYYY-MM-DD HH-MI')='2009-12-23 09-50'
and X.user_data.header.type='$Header_Type';

Fetch Order Payload From Orabpel Schema

$
0
0

Introduction

Objective is to fetch order payload from ORABPEL schema tables based on Sales Order Number.Cube_Instance contains all instance details like InstanceId, ProcessId, Title,State, CreatedTiem etc.Audit_Details contains payload for the instances.Payloads are kept in compressed Binary format.

The payload can be fetched from Audit_Detail table based on Title based on cikey.


import java.io.File;

import java.io.FileOutputStream;

import java.io.InputStream;

import java.sql.*;


public class ReadOrderPayload{

private static String url = "jdbc:oracle:thin:@162.22.200.124:1521:WIUSERDB";

private static String username = "orabpel";

private static String password = "orabpel";


public static void main(String[] args) throws Exception {

Connection conn = null;

try {

System.out.println("1");

Class.forName("oracle.jdbc.driver.OracleDriver");

System.out.println("2");

conn = DriverManager.getConnection(url, username, password);

System.out.println("3");

String sql =

"select length(UTL_COMPRESS.LZ_UNCOMPRESS(b.BIN)), UTL_COMPRESS.LZ_UNCOMPRESS(b.BIN) from cube_instance a,audit_details b where a.process_id ='ProcessSalesOrderSiebelReqABCSImpl' and a.cikey=b.cikey and a.title like '%1-2953781%' and rownum<2 ";

PreparedStatement stmt = conn.prepareStatement(sql);

System.out.println("4");

ResultSet resultSet = stmt.executeQuery();

while (resultSet.next()) {

File f = new File("D:\\payload.xml");

FileOutputStream fos = new FileOutputStream(f);

Blob blob=resultSet.getBlob(2);

byte[] bdata = blob.getBytes(1, (int) blob.length());

String text = new String(bdata);

fos.write(bdata);

System.out.println("payload = " + text);

fos.close();

}

} catch (SQLException e) {

e.printStackTrace();

} finally {

if (conn != null && !conn.isClosed()) {

conn.close();

}

}

}

}


Schedule BPEL Process Using Database Job

$
0
0

Objectve:

To create a oracle database job, which will execute one procedure at a regular interval ,eventually inserting data in a database table.

There is a BPEL process polling this table at a regular polling interval. Whenever it finds data inserted into the table it deletes it from that table and creates an instance of the BPEL process & executes as expected.

Database Section:

Table Creation:

CREATE TABLE TIMER_TABLE1 (

IDX NUMBER(10),T_CODE NUMBER(5),

XDATE DATE,

RFLAG NUMBER(1) DEFAULT 1,

CHECK (IDX IS NOT NULL) VALIDATE,

PRIMARY KEY (IDX) VALIDATE );

Sequence Creation:

CREATE SEQUENCE customers_seq

START WITH 1000

INCREMENT BY 1

NOCACHE

NOCYCLE;

Package Creation:

CREATE OR REPLACE PACKAGE TIMER_PCK1 AS

PROCEDURE TIMER_PROC1;

END;

CREATE OR REPLACE PACKAGE BODY TIMER_PCK1 AS

PROCEDURE TIMER_PROC1 IS

BEGIN

insert into timer_table1(IDX,T_CODE,XDATE) values(customers_seq.nextval,123,sysdate);

end;

END;


Create Database Job:

BEGIN

DBMS_SCHEDULER.CREATE_JOB (

job_name => 'MY_JOB_3',

job_type => 'STORED_PROCEDURE',

job_action => 'TIMER_PCK1.TIMER_PROC1',

start_date => SYSTIMESTAMP,

repeat_interval => 'FREQ=MINUTELY;INTERVAL=1',

end_date => NULL,

job_class => 'DEFAULT_JOB_CLASS',

enabled => TRUE,

comments => 'My new job');

END;


Drop Database Job: (If required)

BEGIN

DBMS_SCHEDULER.DROP_JOB (

job_name => 'MY_JOB_3');

END;

BPEL Section:

There are two BPEL Process:

1)BPELInvokeProcess : Synchronous process to be invoked

2)BPELSchedule : This process will listen poll database table.Once it finds data in table an instance of this process will be created which in turn will invoke BPELInvokeProcess.

Configure Db Polling in BPEL:

Below given are the steps to configure db adapter in BEPL for polling purpose.








Enqueue Msg In Tibco EMS Queue From BPEL

$
0
0

Objectve:

To create a BPEL Process which will enqueue messages in a Tibco EMS Queue.

Setting of Queue Connection Factory:

Path of JMS Adapter:

$ORACLE_HOME\j2ee\home\connectors\JmsAdapter

Class Required to access Tibco EMS:

tibjms.jar

Path where external jar needs to be kept to access Tibco Queue:

$ORACLE_HOME\j2ee\home\connectors\JmsAdapter\JmsAdapter

Connect Factory configured in :

$ORACLE_HOME\j2ee\home\connectors\JmsAdapter\JmsAdapter\META-INF\oc4j-ra.xml

By default Connection Factories are pre-configured in this file for most of Industry standard Queue/Topic providers(Tibco,MQ,Webspehere,JBOSS etc). One only need to configure the credential and Provider URL(hostname/port) to use them.

In our case the Connection Factory JNDI name for TIBCO Queue is :

eis/tibjms/Queue.

Error Message in case jar not included:

The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-12141

ERRJMS_CONN_FAC_NOT_FOUND.

Unable to instantiate connection factory. JMS adapter was unable to look up the connection factor QueueConnectionFactory neither through JNDI nor instantiate it as a Java class [Caused by:

Missing class: com.tibco.tibjms.naming.TibjmsInitialContextFactory

Dependent class: com.sun.naming.internal.VersionHelper12

Loader: jre.bootstrap:1.5.0_06

Code-Source: unknown

Configuration: jre bootstrap

This load was initiated at orabpel.root:0.0.0 using the Class.forName() method.


Creation of BPEL Process:

Below given is sample BPEL process which uses JMS adapter to enqueue messages in Tibco EMS queue(Queue name:Sample).

Below given are the steps to configure JMS Adapter service.





Invoke Java Function from XSLT

$
0
0

Objective:

This document details the steps for implementing extension function in Xslt using Java.

Steps:

1)Write an extension function to be used in Xpath(java method).In our case InvokerJavaBean.java.

2)Compile and create a jar from

the compiled java class/package.

Cmmnd> javac InvokerJavaBean.java

Cmmnd>jar -cvf JavaExtnFuctn.jar InvokerJavaBean.class

added manifest

adding: InvokerJavaBean.class(in = 635) (out= 369)(deflated 41%)

3)Include the jar into the following location:

$SOA_HOME/j2ee/oc4j_soa/applib/

4)Define a namespace prefix into the Stylesheet element with – http://www.oracle.com/XSL/Transform/java/$Java_Class

For example-

xmlns:java-extnsn="http://www.oracle.com/XSL/Transform/java/InvokerJavaBean"

(Here InvokerJavaBean is name of the java class. Incase of java package it should include

starting withpackage name, like-http://www.oracle.com/XSL/Transform/java/com.tm.InvokerJavaBean)

5) Add “extension-element-prefixes” attribute into the stylesheet element and include the extension namespace prefix into following attributes “exclude-result-prefixes” and “extension-element-prefixes”.

For example-

exclude-result-prefixes

="java-extnsn"

extension-element-prefixes="java-extnsn"

6) To invoke a java method from xslt –(here to invoke the setter method)

For example-

<xsl:value-of select="java-extnsn:setRecordVal(/ns1:JavaMethodFromXSLProcessRequest/ns1:input)"></xsl:value-of>

7)To invoke a java method from xslt –(here to invoke the getter method)

For example-

<xsl:variable name="Output_val" select="java-extnsn:getRecordVal()"></xsl:variable>


Below given is sample BPEL Process & java extension function:

Viewing all 62 articles
Browse latest View live