Debugging ESB Instances: (ref: http://soafusion.blogspot.com/2008/02/how-to-enable-debugging-in-oracle-esb.html)
Quite some times it is little frustrating to understand what happens inside Oracle ESB. It is because of Error reporting which is very limited and not to the point.
This can be resolved by enabling the ESB log level FINE in the Oracle application server control and below are the steps to do that.
1. Login into the Application Server Control at http://localhost:8888/em
2. Click on the oc4j_soa instance and Administration tab.
3. Click on Logger Configuration.
4. Now expand Root Logger / oracle to display the logger classes and the Log Level settings.
5. In the Log Level list, select the level FINE for the following classes
. oracle.tip.esb.server.common
. oracle.tip.esb.common.control
. oracle.tip.esb.common.system
. oracle.tip.esb.server.service.impl.inadapter
You DONT need to Bounce the server if this change is done from the EM console.
Look for the log file in : $ORACLE_HOME\j2ee\oc4j_soa\log\oc4j_soa_default_group_1\oc4j\log.xml
For more detailed information regarding the esb.classes refer to the following blog:
http://www.gwr.no/?p=217
Tuesday, February 2, 2010
How to Post HTML / XMl code in your Blog
Go to the following site and type in your code which you want to publish. Encode it, copy and paste the encoded code in your Blog. As simple as that !
http://centricle.com/tools/html-entities/
http://centricle.com/tools/html-entities/
Jave Base64 Decoder for decoding Opaque data
Use the following java code to decode opaque data. Very useful if you are capturing the rejected messages as opaque data and want to translate the data:
String input = (String)getVariableData("OpaqueString");
Base64Decoder Decoder = new Base64Decoder();
try
{
String decoded = Base64Decoder.decode(input);
setVariableData("ErrorPayload",decoded);
}
catch(UnsupportedEncodingException uee)
{
uee.printStackTrace();
}
String input = (String)getVariableData("OpaqueString");
Base64Decoder Decoder = new Base64Decoder();
try
{
String decoded = Base64Decoder.decode(input);
setVariableData("ErrorPayload",decoded);
}
catch(UnsupportedEncodingException uee)
{
uee.printStackTrace();
}
How to avoid multiple instances of BPEL trying to access the same message in a High Available Environemnt .....(Singleton BPEL processes) You have to configure the bpel.xml file in your BPEL process to include the following 'clusterGroupId' property name: ..... SomeServicename.wsdl MyClusterName PollingLogicalDeleteService_ptt
This feature uses JGroups underneath for the implementation, hence the clusterGroupId property. These features require cluster and JGroups configuration in
$ORACLE_HOME/bpel/system/config/collaxa-config.xml and $ORACLE_HOME/system/config/jgroups-protocol.xml. All BPEL instances
participating in the cluster must share the same cluster name in collaxa-config.xml,and the same multicast address and port in jgroups-protocol.xml.
Rejection Message Handling
The "Rejected Message handlers" come in four different flavors. They must be defined as
part of the Activation Agent properties.
· File system based Rejection Handler
<property name="rejectedMessageHandlers">
file://<directory-path>
</property>
for example
<property name="rejectedMessageHandlers">
file://C:/orabpel/domains/default/rejectedMessages
</property>
This rejection handler is straight forward and the bad messages are written to the
configured directory using the file name pattern
INVALID_MSG_ + <process-name> + <operation-name> + <current-time>
· RAW Oracle Advanced Queue based Rejection Handler
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@<db-host>:<tns-port>:<sid>|<user>/<password>|<queue-name>
</property>
The <password> can be encrypted. For example
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@acme-sun:1521:ORCL|scott/tiger|JCA_BAD_MESSAGES
</property>
This rejection handler allows the user to designate a Oracle Rdbms RAW AQ queue
as the rejection storage. Note that the ":" and "|" must appear in the places shown.
Also note that the password can be encrypted using the encrypt.bat utility in
orabpel/bin.
· BPEL Process Rejection Handler
<property name="rejectedMessageHandlers">
bpel://<bpel-domain[:<password>]>|<process-name>|<operation-name>|<input-message-partname>
</property>
The <password> for the BPEL domain can be encrypted - "[]" means that the
property is optional. For example
<property name="rejectedMessageHandlers">
bpel://default|JCA-RejectionHandler|handleRejection|message
</property>
This rejection handler will send the bad message to another (designated error
handling) BPEL process. The user can thus define a process with a Receive operation
of his own choosing (WSDL and BPEL src) - the only constraint is on the Message
Type of the message that will be sent to this rejection handler. It must be declared to
have the type "RejectedMessage". This can conveniently be achieved by importing
the "xmllib" resident WSDL "RejectionMessage.wsdl" which defines such a message:
<message name="RejectionMessage">
<part name="message" element="err:RejectedMessage"/>
</message>
An xmllib WSDL import (from another WSDL) is achieved using the "well-known"
URL
<import namespace="http://xmlns.oracle.com/pcbpel/rejectionHandler"
location="http://localhost:9700/orabpel/xmllib/jca/RejectionMessage.wsdl"/>
i.e. the Receive operation WSDL which the user defines for his Rejection Handler BPEL Process would simply contain this import and then the port type would
reference this:
<definitions ...
xmlns:rej="http://xmlns.oracle.com/pcbpel/rejectionHandler"
<portType name="MyRejectionHandlerPortType">
<operation name="myHandleRejectionOperation">
<input message="rej:RejectionMessage"/>
</operation>
</portType>
· WSIF Based Rejection Handler
<property name="rejectedMessageHandlers">
wsif://<wsif-wsdl-location>|<operation-name>|<input-message-part-name>
</property>
For example
<property name="rejectedMessageHandlers">
wsif://file:/C:/orabpel/samples/test/ErrorTest/FileAdapterWrite.wsdl|write|message
</property>
This last rejection handler lets the user configure any type of WSIF WSDL (JCA, EJB,
JMS, HTTP, Java etc), i.e. any kind of Service which can be reached via WSIF - as
the bad message handler. The exact same constraint vis-a-vis the Message Type as
described above for the BPEL Process Rejection Handler also applies here.
Notes: (1) BPEL supports all four types of rejection handlers
(2) ESB supports only 3 types of rejection handlers except the BPEL based rejection handler ( Until Soa Suite 10.1.3.5) .
The following examples demostrate how rejectionmessageHandler can be defined in ESB
(a) ESB AQ rejected Message Handler:
queue://jdbc:oracle:thin:@localhost:1521:XE|jmsuser/jmsuser|ESB_REJ_MSG_TOPIC
(b) ESB BPEL rejected Message Handler:
bpel://default|CaptureRejectedMessage|process|message
(c) ESB WSIF based rejection handler:
wsif://http://localhost:8888/orabpel/default/CaptureRejectedMessage/1.0/CaptureRejectedMessage?wsdl|handleRejection|message
part of the Activation Agent properties.
· File system based Rejection Handler
<property name="rejectedMessageHandlers">
file://<directory-path>
</property>
for example
<property name="rejectedMessageHandlers">
file://C:/orabpel/domains/default/rejectedMessages
</property>
This rejection handler is straight forward and the bad messages are written to the
configured directory using the file name pattern
INVALID_MSG_ + <process-name> + <operation-name> + <current-time>
· RAW Oracle Advanced Queue based Rejection Handler
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@<db-host>:<tns-port>:<sid>|<user>/<password>|<queue-name>
</property>
The <password> can be encrypted. For example
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@acme-sun:1521:ORCL|scott/tiger|JCA_BAD_MESSAGES
</property>
This rejection handler allows the user to designate a Oracle Rdbms RAW AQ queue
as the rejection storage. Note that the ":" and "|" must appear in the places shown.
Also note that the password can be encrypted using the encrypt.bat utility in
orabpel/bin.
· BPEL Process Rejection Handler
<property name="rejectedMessageHandlers">
bpel://<bpel-domain[:<password>]>|<process-name>|<operation-name>|<input-message-partname>
</property>
The <password> for the BPEL domain can be encrypted - "[]" means that the
property is optional. For example
<property name="rejectedMessageHandlers">
bpel://default|JCA-RejectionHandler|handleRejection|message
</property>
This rejection handler will send the bad message to another (designated error
handling) BPEL process. The user can thus define a process with a Receive operation
of his own choosing (WSDL and BPEL src) - the only constraint is on the Message
Type of the message that will be sent to this rejection handler. It must be declared to
have the type "RejectedMessage". This can conveniently be achieved by importing
the "xmllib" resident WSDL "RejectionMessage.wsdl" which defines such a message:
<message name="RejectionMessage">
<part name="message" element="err:RejectedMessage"/>
</message>
An xmllib WSDL import (from another WSDL) is achieved using the "well-known"
URL
<import namespace="http://xmlns.oracle.com/pcbpel/rejectionHandler"
location="http://localhost:9700/orabpel/xmllib/jca/RejectionMessage.wsdl"/>
i.e. the Receive operation WSDL which the user defines for his Rejection Handler BPEL Process would simply contain this import and then the port type would
reference this:
<definitions ...
xmlns:rej="http://xmlns.oracle.com/pcbpel/rejectionHandler"
<portType name="MyRejectionHandlerPortType">
<operation name="myHandleRejectionOperation">
<input message="rej:RejectionMessage"/>
</operation>
</portType>
· WSIF Based Rejection Handler
<property name="rejectedMessageHandlers">
wsif://<wsif-wsdl-location>|<operation-name>|<input-message-part-name>
</property>
For example
<property name="rejectedMessageHandlers">
wsif://file:/C:/orabpel/samples/test/ErrorTest/FileAdapterWrite.wsdl|write|message
</property>
This last rejection handler lets the user configure any type of WSIF WSDL (JCA, EJB,
JMS, HTTP, Java etc), i.e. any kind of Service which can be reached via WSIF - as
the bad message handler. The exact same constraint vis-a-vis the Message Type as
described above for the BPEL Process Rejection Handler also applies here.
Notes: (1) BPEL supports all four types of rejection handlers
(2) ESB supports only 3 types of rejection handlers except the BPEL based rejection handler ( Until Soa Suite 10.1.3.5) .
The following examples demostrate how rejectionmessageHandler can be defined in ESB
(a) ESB AQ rejected Message Handler:
queue://jdbc:oracle:thin:@localhost:1521:XE|jmsuser/jmsuser|ESB_REJ_MSG_TOPIC
(b) ESB BPEL rejected Message Handler:
bpel://default|CaptureRejectedMessage|process|message
(c) ESB WSIF based rejection handler:
wsif://http://localhost:8888/orabpel/default/CaptureRejectedMessage/1.0/CaptureRejectedMessage?wsdl|handleRejection|message
SOA Fault Handling
A BPEL fault has a fault name called a Qname
(name qualified with a namespace) and a possible messageType
. There are two categories of BPEL faults:
-
Business faults
-
Run-time faults
(2)Run-time faults: Run-time faults are the result of problems within the running of the BPEL process or Web service
targetNamespace="http://schemas.oracle.com/bpel/extension" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
bindingFault : A
bindingFault
is thrown inside an activity if the preparation of the invocation fails. For example, the WSDL of the process fails to load. AbindingFault
is not retryable. This type of fault usually must be fixed by human interventionremoteFault : A
remoteFault
is also thrown inside an activity. It is thrown because the invocation fails. For example, a SOAP fault is returned by the remote service. AremoteFault
can be configured to be retried
Subscribe to:
Posts (Atom)