Tuesday, December 2, 2014

WS Security Error while trying to invoke a BPEL Component

In case of any WS Security error while trying to invoke a BPEL service, verify whether any security policies are attached to that service.

To override the security requirement you can attach the no-authentication policy to the reference exposed to the client . i.e client_ep



This can be done either from emconsole after deployment of the service or in jdev before deploying

Monday, November 24, 2014

Please make sure that the port attribute for the binding defined in the composite file is correct by checking the namespace service name and port name

There was an error deploying the composite Deployment Failed: Unable to find a WSDL that has a definition for service . Please make sure that the port attribute for the binding defined in the composite file is correct by checking the namespace service name and port name. In addition check that the WSDL associated with the binding namespace is imported and currently reachable (check the import nodes at the top of the composite file). Finally validate the HTTP proxy settings for the server..

This is a common error while deploying the composite from JDEV

One of the major reason for this error is due to invalid imports. Sometimes local MDS reference might have used during development time, but at deployment time it will be referring the target environment's MDS. In such cases ensure that your local MDS and target MDS are in sync.

Check all the import statements in the composite.xml. Ensure that each and every import statement is valid and the corresponding target resource is available.

Try to open the composite.xml in design view to see any wsdl loading errors happening.

Other reason could be because of the wrong config plan file used or
Wrong values for binding.ws port attribute in the composite.xml or
Wrong value for interface.wsdl interface in the composite.xml


If  there is a change in the reference/service/import sections in the composite.xml ensure you regenerate the config plan file.

Checking binding.ws port attribute in composite.xml
===============================
Follow the below rule to verify the correctness of binding.ws port attribute

<NAME_SPACE>#wsdl.endpoint(<SERVICE>/<PORT>)

For e.g

  <binding.ws port="http://xmlns.oracle.com/POCApplication/ApprovalService/ApprovalProcess#wsdl.endpoint(approvalprocess_client_ep/ApprovalProcess_pt)"/>

Where
Namespace is  - http://xmlns.oracle.com/POCApplication/ApprovalService/ApprovalProcess
Service is -  approvalprocess_client_ep
Port is -  ApprovalProcess_pt

Checking  interface.wsdl interface attribute in composite.xml
===============================
Follow the below rule to verify the correctness of  interface.wsdl interface port attribute

<NAME_SPACE>#wsdl.interface(<COMPONENTNAME>)

For e.g

http://xmlns.oracle.com/POCApplication/ApprovalService/ApprovalProcess#wsdl.interface(ApprovalProcess)

Where
namespace is - http://xmlns.oracle.com/POCApplication/ApprovalService/ApprovalProcess
component name is  - ApprovalProcess

Saturday, November 22, 2014

The process domain is encountering the following errors while loading the process : Validation of BPEL2.0 process failed.. This error contained an exception thrown by the underlying process loader module.


The process domain is encountering the following errors while loading the process : Validation of BPEL2.0 process failed..
This error contained an exception thrown by the underlying process loader module.
Check the exception trace in the log (with logging level set to debug mode). If there is a patch installed on the server, verify that the bpelcClasspath domain property includes the patch classes.

Even though our BPEL project is compiled in jdev, during deployment it can throw the above error.

From the error message we cant make out anything.


But one of the reasons for this compilation failure could be the java embedding used inside the BPEL process. If the java code refers some external classes and if that jar files are not set in the project in the SCA/lib folder this error can happen


To resolve the error at run time the same custom jar files must be made avaiable to the BPEL Process Manager at run time .

This can be achieved by following the below process

Navigate to Oracle_Home\soa\soa\modules\oracle.soa.ext_11.1.1 directory.

Copy your custom jar files under the classes directory

Open the command prompt and navigate to \Oracle_Home\soa\soa\modules\oracle.soa.ext_11.1.1

Run the ant command


\Oracle_Home\soa\soa\modules\oracle.soa.ext_11.1.1>ant
Buildfile: C:\installed\Oracle\Middleware12C\Oracle_Home\soa\soa\modules\oracle.
soa.ext_11.1.1\build.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xm
l. It could not be found.

create-manifest-jar:
   [delete] Deleting: \Oracle_Home\soa\soa\modu
les\oracle.soa.ext_11.1.1\oracle.soa.ext.jar
      [jar] Building MANIFEST-only jar: \Oracle
_Home\soa\soa\modules\oracle.soa.ext_11.1.1\oracle.soa.ext.jar

BUILD SUCCESSFUL
Total time: 0 seconds

Restart the Server

Importantly ensure that your .BPEL file uses the import statements for such referred classes

e.g

     <import location="oracle.xml.parser.v2.XMLElement" importType="http://schemas.oracle.com/bpel/extension/java"/>
  <import location="java.io.BufferedReader" importType="http://schemas.oracle.com/bpel/extension/java"/>
  <import location="java.io.ByteArrayOutputStream" importType="http://schemas.oracle.com/bpel/extension/java"/>
  <import location="java.io.InputStream" importType="http://schemas.oracle.com/bpel/extension/java"/>
  <import location="java.io.InputStreamReader" importType="http://schemas.oracle.com/bpel/extension/java"/>

After adding all  the  required import statements , redeploy the process

Wednesday, November 19, 2014

BINDING.JCA-11975 AQ_INVALID_QUEUE Unable to obtain queue table name


The invocation resulted in an error: Invoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: WSIF JCA Execute of operation 'Enqueue' failed due to: AQ_INVALID_QUEUE.
Unable to obtain queue table name.
Queue does not exist or not defined correctly.
; nested exception is:
BINDING.JCA-11975
AQ_INVALID_QUEUE.
Unable to obtain queue table name.
Queue does not exist or not defined correctly.
Drop and re-create queue.



This issue normally happens when the underlying schema changes.

For eg. while migrating AQAdapter from one ENV to another ENV normally only the following parameters might need to change

database name
hostname
port
service/sid

Usually we change these values in the datasource configuration in weblogic console

But in some situations if the target schema name is different than the one configured in the .jca file, this issue could happen

In such cases you may need to verify your .jca file and see the following property value reflect the correct schema name

<property name="DatabaseSchema" value="AQ_USER"/>

Redeploy the service after updating the jca file


How to rollback a patch for oracle soa suite

The simplest way of roll back a patch is :

opatch rollback -id <patch_number> 

Tuesday, November 11, 2014

Passing Custom Header from BPEL to OSB and vice versa

Sometimes we might have a requirement to pass some information via Header between BPEL and OSB.

In this post I am trying to explain one of the approaches possible to achieve that requirement

BPEL side
=========================

As a first step, create an xsd as shown below


=============Header.xsd==========================

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/Custom/Header"
            targetNamespace="http://xmlns.oracle.com/Custom/Header"
            elementFormDefault="qualified">
  <xsd:element name="SessionHeader" type="SessionHeaderType"/>
  <xsd:complexType name="SessionHeaderType">
        <xsd:sequence>
            <xsd:element name="sessionToken" type="xsd:string"/>
            <xsd:element name="type" type="xsd:string"/>
        </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

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

Create two variables of type SessionHeader in the BPEL Process.

customHeader is to pass header values to the target service.

customHeaderIn is to receive the header values from a response received from target service.









On the invoke activity configure the input and output Header variables as follows


  <invoke name="InvokeTokenProcess" partnerLink="TokenProcess"
            portType="ns1:EmployeePortType" operation="GetEmployeeByEmpId" inputVariable="TokenProcess_IV"
            outputVariable="TokenProcess_OV" bpelx:invokeAsDetail="no" bpelx:inputHeaderVariable="customHeader" bpelx:outputHeaderVariable="customHeaderIn"/>


Use an assign activity before the invoke activity to set the required values in the customHeader variables

After invoke activity use another assign activity to retrieve the passed header- from target service on the customHeaderIn variable




OSB Side
=====================

 The passed custom Header can be retrieved in OSB pipeline as given below




 To send a custom header from OSB use the insert activity as given below



================
Deploy both BPEL and OSB service and do a test to see the header being passed correctly



Thursday, November 6, 2014

weblogic.jndi.internal.AdminModeAccessException

This issue happens mostly while doing lookup for ConnectionFactory,Queues,Topics etc

 One of the reason for this exception is that the managed servers stays at ADMIN mode rather than RUNNING mode.

In such cases ensure that the server state is RUNNING by debugging the issues seen on the logs while startup