Showing posts with label 11g migration. Show all posts
Showing posts with label 11g migration. Show all posts

Monday, 2 October 2017

ANT : Common adf-config.xml to deploy SOA composites to different environments.

When you are using ANT for SOA deployment, It will look for the .adf defined in the scac.application.home location that you have passed to the ant-sca-package file.
By default for ANT it is the \SCA-INF\classes folder under each project.

However, the common adf-config.xml file can be used to deploy all the composites instead of using the adf-config file from the individual composite applications.

By below approach, we can reduce the maintenance of individual adf-config files also by using the same adf-config file the composites can be deployed to different environments.

Steps:

1. Copy.adf folder from any of the composite application to the common location.
2. Change the contents of the adf-config.xml like below (change the file according to your requirement.)

<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
            xmlns:sec="http://xmlns.oracle.com/adf/security/config">
  <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
                            credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
  </sec:adf-security-child>
  <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace path="/apps" metadata-store-usage="mstore-usage_1"/>
          <namespace path="/soa/shared" metadata-store-usage="mstore-usage_2"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
           <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
            <property
name="jdbc-userid" value="DEV_MDS"/>
            <property
name="jdbc-password" value="devmds"/>
            <property
name="jdbc-url" value="jdbc:oracle:thin:@//localhost:1521/XE"/>
            <property
name="partition-name" value="soa-infra"/>
           </metadata-store>
            </metadata-store-usage>
            <metadata-store-usage id="mstore-usage_2">
           <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
            <property
name="jdbc-userid" value="DEV_MDS"/>
            <property
name="jdbc-password" value="devmds"/>
            <property
name="jdbc-url" value="jdbc:oracle:thin:@//localhost:1521/XE"/>
            <property name="partition-name"
value="soa-infra"/>
           </metadata-store>
          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>
</adf-config>



3. Set the scac.application.home to the common location in step1 path during the deployment of the composites.The common adf-config.xml file will be used to deploy all the composites.

We are using DB-based MDS here.
You can also use the File-based connection, but make sure to change the metadata-path to the physical path of the MDS folder.

Example:
<metadata-store-usage id="mstore-usage_2">
      <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
      <property name="partition-name" value="seed"/>
      <property
name="metadata-path" value="E:/Oracle/Middleware/Oracle_Home/soa/integration"/>
      </metadata-store

</metadata-store-usage>


Helpful? Please Comment.

Happy Learning!!

Tuesday, 26 September 2017

SOA 12c DBAdapter: Error while validating JCA Reference Binding meta data during composite deployment

What you need to do if you are deploying you DBAdapter service and getting the below error:

Error deploying archive sca_SOADBAdapter_rev1.0.jar to partition "default" on
server soa_server1
HTTP error code returned [500]
Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed:
Error while validating JCA Reference Binding meta data during composite
deployment.: JCA deployment validation errors for 'Adapters/DBReference_db.jca'.

Check server log for more details.
Error deploying archive sca_SOADBAdapter_rev1.0.jar to   partition "default" on server
soa_server1
Deployment cancelled.
----  Deployment incomplete  ----.
Error deploying archive  file deploy/sca_SOADBAdapter_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


The possible cause for this issue is that the JNDI being used in .jca is unavailable, incorrect or invalid.

Solution - Create or Correct your JNDI.
Also, Check if your JNDI has the correct DataSource configured and the DataSource test is successful.
If all these are good and you still have the same error, open your DBAdapter configuration and check table imports and settings.


Helpful? Please comment.

Happy Learning!!

SOA 12c FileAdapter : JCA deployment validation errors

What you need to do if you have migrated your 11g code to 12c and you are getting the below error when deploying:

Error deploying archive sca_HelloWorldJCA_rev1.0.jar to partition "default" on server soa_server1
HTTP error code returned [500]
Error message from server:There was an error deploying the composite on soa_server1: Operation failed - Member(Id=3,member:soa_server1, Role=WeblogicServer):Error while validating JCA Reference Binding meta data during composite deployment. : JCA deployment validation errors for 'GetFile_file.jca'
; .  Please see the server diagnostic logs on soa_server1 for details.
 Check server log for more details.

First you will not get any error when you are compiling your code in JDeveloper.

Second this issue can be due to 2 reasons:

1. Your .jca file has a logical or physical directory entry which is invalid (means not a correct path or access permissions is not given to the folder)

Solution - Correct the path or give 777 access to the folder and retry.

2. When migrating your code form 11g to 12c, the resulting composite.xml has new empty property entries for the the logical directory like below:

<binding.jca config="GetFile_file.jca">
..
<property name="LoadDirectory" override="may" many="false" type="xs:string" source=""></property>
..
</binding.jca>

Solution - Remove the unwanted property and retry.

Helpful? Please comment.

Happy Learning!!

OSB 12c : Dynamic Routing to Business/Proxy Service

Dynamic routing is a kind of  Content-based Routing pattern, which is used when the BusinessService/ProxyService path is required to be de...