Powered By Blogger

Thursday, December 12, 2013

OSB polling with JCA in clustered environment

We all know that OSB supports JCA protocol.In this post I will discuss one issue that we encountered when we implemented FTP poll with JCA in OSB  in soa/osb clustered environment

Setup 
  1. Created JCA FTP deployment connection factory with HA parameters
  2. Created FTP adapter in Jdeveloper
  3. Imported required artifacts from Jdev project into OSB
  4. Created OSB proxy with JCA
When we tested OSB proxy for polling files,we saw below error

Error in osb log

<Error> <JCA_FRAMEWORK_AND_ADAPTER> <osb01> <[ACTIVE] ExecuteThread: '145' for queue: 'weblogic.kernel.Default (self-tuning)'>  <097b277aaf0a827d:40ef1fa1:142b5024552:-8000-0000000000079fde> <1386802596992> <BEA-000000> Unable to create clustered resource for inbound.
Unable to create clustered resource for inbound.
Unable to create clustered resource for inbound.
Please make sure the database connection parameters are correct.
[Caused by: Unable to resolve 'jdbc.SOADataSource'. Resolved 'jdbc']>

<Error> <JCATransport> <osb01> <[ACTIVE] ExecuteThread: '145' for queue: 'weblogic.kernel.Default (self-tuning)'> <pravva01> <> <097b277aaf0a827d:40ef1fa1:142b5024552:-8000-0000000000079fde> <1386802596993> <BEA-381959> <Failed to activate JCABindingService for wsdl: servicebus:/WSDL, operation: Get, exception: BINDING.JCA-12600
Generic error.
Generic error.
Cause: {0}.
Please create a Service Request with Oracle Support.
BINDING.JCA-12600
Generic error.
Generic error.
Cause: {0}.
Please create a Service Request with Oracle Support.
        at oracle.tip.adapter.sa.impl.inbound.JCABindingActivationAgent.activateEndpoint(JCABindingActivationAgent.java:340)
        at oracle.tip.adapter.sa.impl.JCABindingServiceImpl.activate(JCABindingServiceImpl.java:113)
        at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.activateService(JCATransportInboundOperationBindingServiceImpl
 

Solution

As highlighted in color 'jdbc/SOADataSource'  is one of parameters configured on JCA adapter connection factory and it is mandatory parameter.This data source is available with installation and  points to soa dehydration store schema SOAINFRA where high availability features are installed

By default this data source is targeted to soa cluster but in our case it is OSB which is using JCA framework.When OSB access configured FTP JNDI connection factory which is configured with 'jdbc/SOADataSource', this data source could not be looked up since it is not being targeted to OSB cluster

So we need to target  data source to osb cluster in addition to soa cluster and bounce OSB managed servers.This would resolve the issue

Monday, December 9, 2013

OSB Business Service with JCA

Configuring OSB services to work with JCA protocol is easy, but I would like to post one error I faced when I generated OSB business service with FTP JCA file

Eclipse and OSB console gives a way to generate OSB services from JCA file.
If it is from OSB console, import JCA file and its dependency artifacts,go to resource browser,select JCA bindings from left side menu and click on actions icon from required JCA file on right side page
If it is from Eclipse,import JCA file and its dependency artifacts, right click on it, select Oracle service bus then select generate service.

With above steps you can generate business service.We use Jdeveloper to model adapter interface and use generated files to design OSB service.
Jdeveloper creates abstract wsdl but OSB requires concrete WSDL.When we generate OSB service either from Eclipse or console it will generate concrete WSDL by adding binding and service elements to newly generated WSDL and import abstract WSDL in it for abstract definitions.

If you choose  to add concrete definitions(bindings and service) to WSDL manually and trying to use that WSDL in service definition then that works fine for proxy service but business service fails with below error

An error occured while validating JCA transport endpoint properties, exception: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: Please specify a Service. Choices are: {{http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP}putFTP, {http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP}putFTP_ep} oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException:

I could not figure out why business service fails and proxy generation is fine but it could be resolved by generating service automatically either from eclipse or console