Showing posts with label Oracle SOA Suite. Show all posts
Showing posts with label Oracle SOA Suite. Show all posts

Monday, January 1, 2018

How to receive Outbound Message notification from Salesfore through Salesforce Adapter in Oracle SOA Suite 12c

How to receive Outbound Message notification from Salesfore through Salesforce Adapter in Oracle SOA Suite 12c

Salesforce Outbound messaging allows you to specify that changes to fields within Salesforce can cause messages with field values to be sent to designated external servers.

Outbound messaging is part of the workflow rule functionality in Salesforce. Workflow rules watch for specific kinds of field changes and trigger automatic Salesforce actions, such as sending email alerts, creating task records, or sending an outbound message.

After you set up outbound messaging, when a triggering event occurs, a message is sent to the specified endpoint URL. The message contains the fields specified when you created the outbound message. Once the endpoint URL receives the message, it can take the information from the message and process it. To do that, you need to examine the outbound messaging WSDL.

The Salesforce Adapter in Oracle SOA Suite help to integrate with Salesforce cloud. This post will explain the steps to enable the Outbound messaging in Salesfore and receive the notifications in Oracle SOA Suite via Salesforce Adapter.

Define Outbound message in Salesforce:


Login to Salesforce
Click on Setup

salesforce_setup

Search for Outbound messages and click on Workflow & Approvals -  Outbound Messages

salesforce_outbound_messages

Click on Continue in the next screen
Click on New Outbound Message

salesforce_outbound_messages

Select the required Object and Click on Next


Sunday, December 31, 2017

How to integrate with Salesforce.com through Salesforce Adapter in Oracle SOA Suite 12c

How to integrate with Salesforce.com through Salesforce Adapter in Oracle SOA Suite 12c

Oracle SOA Suite Salesforce adapter helps to integrate with Salesfore to perform different operation on objects like CURD, QUERY etc.
This post will explain the approach to configure Salesfore Adapter to perform different operations.

Installing Salesforce.com  SSL certificates to Weblogic server:


Download the certificates(I am using the test salesforce instance): 


Open login.salesforce.com in browser(here I am using chrome browser)
Click on certificate icon and valid

export_salesfoce_login_certificate


Click on Details and Copy to File

export_salesfoce_login_certificate


Click on Next

Saturday, December 30, 2017

JCA Binding execute of Reference operation 'search' failed due to: LDAP_ERROR_IX_INVALID_IN_REC

JCA Binding execute of Reference operation 'search' failed due to: LDAP_ERROR_IX_INVALID_IN_REC

I was getting the below exception while integrating with Ldap Adapter for search operation in Oracle SOA Suite 12c

A fault occurred while invoking the webservice operation. The fault is : <env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>env:Server</faultcode>
<faultstring>Exception occurred when binding was invoked.
Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'search' failed due to: LDAP_ERROR_IX_INVALID_IN_REC.
Ldap Adapter has encountered an invalid operation request payload while executing an outbound interaction.
Operation request payload should be a valid instance of the ldap adapter request schema.
Please ensure that the request payload is a valid instance of the request operation schema.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</faultstring>
<faultactor/>
<detail>
<exception>Element not completed: 'searchRequest'</exception>
</detail>
</env:Fault>
oracle.sysman.emInternalSDK.webservices.util.SoapTestException: Client received SOAP Fault from server : Exception occurred when binding was invoked.
Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'search' failed due to: LDAP_ERROR_IX_INVALID_IN_REC.
Ldap Adapter has encountered an invalid operation request payload while executing an outbound interaction.
Operation request payload should be a valid instance of the ldap adapter request schema.
Please ensure that the request payload is a valid instance of the request operation schema.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.

This exception occurred due to the missing input mapping for baseDN and searchFilter in the Ldap input variable(Invoke activity), make sure the variable is mapped with required input e.g. below



Configure Ldap Adapter connection factories through WLST script - Oracle SOA Suite 12c

Creating Ldap Adapter connection factories through WLST script - Oracle SOA Suite 12c

The below WLST script will help us to create the Ldap adapter connection factories in Oracle SOA Suite 12c

Change the Ldap/SOA server details accordingly in the script.

Before executing the script make sure the LdapAdapter is targeted to the SOA servers.


traget_ldap_adapter_soa_server

CreateLdapAdapterFactory.py

targetServerName='AdminServer' 

soaHome='C:\Albin\SW\SOA-12c\Oracle\Middleware\Oracle_Home\soa'

appPathLdap=soaHome+'\soa\connectors\LdapAdapter.rar'
appNameLdap='LdapAdapter'
moduleOverrideNameLdap=appNameLdap+'.rar'
LdapJNDIName = 'eis/Ldap/BlogSample'

bindDN='uid=admin,ou=system'
hostName='localhost'
password='secret'
port='10389'
trustAll='false'
trustStorePassword='false'


moduleDescriptorName='META-INF/weblogic-ra.xml'
planPathLdap='C:\Albin\workarea\Plan_Ldap.xml'

def createLdapConnectionFactory():  

edit()
startEdit()
startApplication(appNameLdap)
myPlanLdap=loadApplication(appPathLdap, planPathLdap)
makeDeploymentPlanVariable(myPlanLdap,'ConnectionInstance_eis/Ldap_JNDIName_13102979357209', LdapJNDIName , '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/jndi-name',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Host_Name_13102979357210', bindDN,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="bindDN"]/value',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Port_13102979357211', hostName,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="hostName"]/value',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Port_13102979357212', password,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="password"]/value',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Port_13102979357213', port,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="port"]/value',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Port_13102979357214', trustAll,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="trustAll"]/value',moduleOverrideNameLdap)
makeDeploymentPlanVariable(myPlanLdap, 'ConfigProperty_eis/Ldap_JNDIName_Port_13102979357215', trustStorePassword,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+LdapJNDIName+'"]/connection-properties/properties/property/[name="trustStorePassword"]/value',moduleOverrideNameLdap)


myPlanLdap.save();
save();
cd('/AppDeployments/LdapAdapter/Targets');
updateApplication(appNameLdap, planPathLdap);
startApplication(appNameLdap);
activate(block='true');

    
def makeDeploymentPlanVariable(wlstPlan, name, value, xpath,overrideName, origin='planbased'):
    wlstPlan.destroyVariable(name)
    wlstPlan.destroyVariableAssignment(name, overrideName, moduleDescriptorName)
    variableAssignment = wlstPlan.createVariableAssignment(name, overrideName, moduleDescriptorName)
    variableAssignment.setXpath(xpath)
    variableAssignment.setOrigin(origin)
    wlstPlan.createVariable(name, value)
    print 'moduleDescriptorName=',moduleDescriptorName


def main():
       #SOA Server Details
       adminURL='t3://localhost:7201'
       adminUserName='weblogic'
       adminPassword='Albin123!'
       connect(adminUserName, adminPassword, adminURL)
       createLdapConnectionFactory()
       disconnect()
main()

Creating Coherence Adapter connection factories through WLST script - Oracle SOA Suite 12c

Creating Coherence Adapter connection factories through WLST script - Oracle SOA Suite 12c

The below WLST script will help us to create the Coherence adapter connection factories in Oracle SOA Suite 12c

Change the Coherence/SOA server details accordingly in the script.

Before executing the script make sure the CoherenceAdapter is targeted to the SOA servers.


traget_coherence_adapter_soa_server

CreateCoherenceAdapterFactory.py

targetServerName='AdminServer' 

soaHome='C:\Albin\SW\SOA-12c\Oracle\Middleware\Oracle_Home\soa'

appPathCoherence=soaHome+'\soa\connectors\CoherenceAdapter.rar'
appNameCoherence='CoherenceAdapter'
moduleOverrideNameCoherence=appNameCoherence+'.rar'
CoherenceJNDIName = 'eis/Coherence/BlogSample'

CacheConfigLocation='C:\Albin\workarea\coherence-adapter-config.xml'
ClassLoaderMode='CUSTOM'
WLSExtendProxy='false'
PojoJarFile='C:\Albin\workarea\cache-pojos.jar' # Include this if Cache Type is POJO - Jar file contains the POJO classes
ServiceName='DistributedCache' #ServiceName configured in Cache Config File.

moduleDescriptorName='META-INF/weblogic-ra.xml'
planPathCoherence='C:\Albin\workarea\Plan_Coherence.xml'

def createCoherenceConnectionFactory():  

edit()
startEdit()
startApplication(appNameCoherence)
myPlanCoherence=loadApplication(appPathCoherence, planPathCoherence)
makeDeploymentPlanVariable(myPlanCoherence,'ConnectionInstance_eis/Coherence_JNDIName_13102979357209', CoherenceJNDIName , '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/jndi-name',moduleOverrideNameCoherence)
makeDeploymentPlanVariable(myPlanCoherence, 'ConfigProperty_eis/Coherence_JNDIName_Host_Name_13102979357210', CacheConfigLocation,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/connection-properties/properties/property/[name="CacheConfigLocation"]/value',moduleOverrideNameCoherence)
makeDeploymentPlanVariable(myPlanCoherence, 'ConfigProperty_eis/Coherence_JNDIName_Port_13102979357211', ClassLoaderMode,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/connection-properties/properties/property/[name="ClassLoaderMode"]/value',moduleOverrideNameCoherence)
makeDeploymentPlanVariable(myPlanCoherence, 'ConfigProperty_eis/Coherence_JNDIName_Port_13102979357212', WLSExtendProxy,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/connection-properties/properties/property/[name="WLSExtendProxy"]/value',moduleOverrideNameCoherence)
makeDeploymentPlanVariable(myPlanCoherence, 'ConfigProperty_eis/Coherence_JNDIName_Port_13102979357213', PojoJarFile,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/connection-properties/properties/property/[name="PojoJarFile"]/value',moduleOverrideNameCoherence)
makeDeploymentPlanVariable(myPlanCoherence, 'ConfigProperty_eis/Coherence_JNDIName_Port_13102979357214', ServiceName,'/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="'+CoherenceJNDIName+'"]/connection-properties/properties/property/[name="ServiceName"]/value',moduleOverrideNameCoherence)

myPlanCoherence.save();
save();
cd('/AppDeployments/CoherenceAdapter/Targets');
updateApplication(appNameCoherence, planPathCoherence);
startApplication(appNameCoherence);
activate(block='true');

    
def makeDeploymentPlanVariable(wlstPlan, name, value, xpath,overrideName, origin='planbased'):
    wlstPlan.destroyVariable(name)
    wlstPlan.destroyVariableAssignment(name, overrideName, moduleDescriptorName)
    variableAssignment = wlstPlan.createVariableAssignment(name, overrideName, moduleDescriptorName)
    variableAssignment.setXpath(xpath)
    variableAssignment.setOrigin(origin)
    wlstPlan.createVariable(name, value)
    print 'moduleDescriptorName=',moduleDescriptorName


def main():
       #SOA Server Details
       adminURL='t3://localhost:7201'
       adminUserName='weblogic'
       adminPassword='Albin123!'
       connect(adminUserName, adminPassword, adminURL)
       createCoherenceConnectionFactory()
       disconnect()

main()

Friday, December 29, 2017

Create Java DB connection in JDeveloper 12.2.1.3.0

Click on Windows - Database - Databases

Jdeveloper_Java_DB_connection
Create new IDE connection

Jdeveloper_Java_DB_connection

Select the Connection Type as Java DB/Apache Derby
Username -  soainftra
Driver Class - org.apache.derby.jdbc.ClientDriver
HostName - localhost (or enter the IP address)
JDBC Port -  1527
Database Name - soinfra
Password - Leave blank

Click on Test Connection - the result will display as success

The tables can  be accessed now - Open the SQL Worksheet and execute the required SQL queries

e.g - select * from soainfra.cube_instance

Jdeveloper_Java_DB_connection

ORABPEL-05215 error while deploying Oracle SOA Suite 12c composites

I was receiving the following exception while deploying the Oracle SOA Suite 12c composite from JDeveloper.

 [04:43:18 PM] Error deploying archive sca_Project1.jar to partition "default" on server AdminServer [http://DESKTOP-7UQNDE3:7201]
[04:43:18 PM] HTTP error code returned [500]
[04:43:18 PM] Error message from server:
There was an error deploying the composite on AdminServer: Error occurred during deployment of component: BPELProcess1 to service engine: implementation.bpel, for composite: Project1: ORABPEL-05215

Error while loading process.
The process domain is encountering the following errors while loading the process "BPELProcess1" (composite "default/Project1!1.0*soa_4c17e942-2799-4e2a-b152-bf969c7308ab"): null.
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.
.

[04:43:18 PM] Check server log for more details.
[04:43:18 PM] Error deploying archive sca_Project1.jar to partition "default" on server AdminServer [http://DESKTOP-7UQNDE3:7201]
[04:43:18 PM] Deployment cancelled.
[04:43:18 PM] ----  Deployment incomplete  ----.
[04:43:18 PM] Error deploying archive file:/C:/Albin/SW/SOA-12c/Workspace/deploy/sca_Project1.jar
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


ORABPEL-05215 will be thrown if there is any compilation error in the component while deploying to the server.

In my case, i have added a empty Java Embedding activity with out adding any java code into that.

The component successfully deployed after removing the Java Embedding activity or adding some sample java code into it.

Restrict the access to SOA Composite Service based on the User Role (Authorization to the SOA Composite Service) – Oracle SOA Suite 12c

Restrict the access to SOA Composite Service based on the User Role (Authorization to the SOA Composite Service) – Oracle SOA Suite 12c

Sometimes we may need to restrict the access to the SOA composite service based on the user role.
HTTP basic authentication and an authorization policy can be used to ensure that access is only granted to users who are members of a particular role.

This blog will explain the steps to enable authorization to our composite service.

Configure the Users and Group:

  • Login to the Weblogic console ('http://<host>:<port>/console')
  • In the left menu select 'Security Realms'
  • Select the realm where you want to create the users and groups.  The default is 'myrealm'
  • At the top select the 'Users and Groups' tab
  • Select User tab and Click 'New' and enter your user name and pwd.  Here am creating the user albin and albin1, create as many users as you want
  • Select ‘Groups’ tab and create a new group.  Here I am creating  ‘IntegrationGroup’
  • Go back to the users and click on  'Albin'
  • Select the 'Groups' tab and add ‘IntegrationGroup’.  The user albin1 will not be part of this group.

Configure the Application Role:

  • Login to EM console
  • Click on Target Navigation - WebLogic Domain - Domain Name 
  • Click on Weblogic Domain - Select Security and Click on Application Roles
soa-infra_application_roles
  • Select Application Stripe as soa-infra
  • Click on 'Create' to configure a new Application Role

Sunday, November 5, 2017

ORABPEL-05250 Error - JDeveloper Part2

ORABPEL-05250 Error - JDeveloper Part2

I was facing a strange issue while deploying the composite to the server but The composite was successfully build in JDeveloper but during deployment to the server received the following exception.

[02:02:37 PM] Sending archive - sca_SuppressSelectionFailure_rev1.0.jar
[02:02:49 PM] Received HTTP response from the server, response code=500
[02:02:49 PM] Error deploying archive sca_SuppressSelectionFailure_rev1.0.jar to partition "default" on server AdminServer [http://inkaban3ua-eai05:8000]
[02:02:49 PM] HTTP error code returned [500]
[02:02:49 PM] Error message from server:
There was an error deploying the composite on AdminServer: Error occurred during deployment of component: SuppressSelectionFailure to service engine: implementation.bpel, for composite: SuppressSelectionFailure: ORABPEL-05250

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/fmw/config/admin/domains/SOACoreDomain/servers/AdminServer/dc/soa_1b6f358e-8947-4572-a573-e036770c0591"; the exception reported is: java.lang.Exception: BPEL 1.1 compilation failed

This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
.

[02:02:49 PM] Check server log for more details.
[02:02:49 PM] Error deploying archive sca_SuppressSelectionFailure_rev1.0.jar to partition "default" on server AdminServer [http://localhost:8000]
[02:02:49 PM] ####  Deployment incomplete.  ####
[02:02:49 PM] Error deploying archive file:/C:/JDeveloper/mywork/Application1/SuppressSelectionFailure/deploy/sca_SuppressSelectionFailure_rev1.0.jar
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

Saturday, December 12, 2015

Issue with migrating BPEL from Orace SOA 11g to Oracle SOA 12C - An unexpected Server error has occurred in JDeveloper

Issue with migrating  BPEL from Orace SOA 11g to Oracle SOA 12C - An unexpected Server error has occurred in JDeveloper

Issue:

Trying to migrate some composites from Oracle SOA 11.1.1.5 to 12c. But after I load the project in JDeveloper 12c, its throwing the error "An unexpected Server error has occurred in JDeveloper" and its giving the options like 1)"save all files and exit" 2) Exit without saving 3) continue.

Selected “continue" option and after that tried opening "*.BPEL" file and its completely blank and also all the wires were disappeared from "Composite.xml".

1) Open your SOA project in JDeveloper version 11.1.1.5 and create the SAR ( deployable ) file into your deploy folder. ( Ex: scaSample_rev001.jar )

2) Close the JDeveloper 11.1.1.5 and now open JDeveloper 12c ,

3) File -> Import -> select "SOA Archive Into SOA Project" -> OK -> Next -> Composite Archive Browse to the above SAR file created ( Ex: scaSample_rev001.jar )

4) The composite.xml  and BPEL file will show the content now

Extension function error: Method not found 'setFlowInstanceTitle – Oracle SOA 12C(12.1.3)

Extension function error: Method not found 'setFlowInstanceTitle – Oracle SOA 12C(12.1.3)

We were getting the below exception while trying to set the title for composite instance in 12.1.3

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/<https://urldefense.proofpoint.com/v2/url?u=http-3A__schemas.xmlsoap.org_soap_envelope_&d=AwMFAw&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=8qQMQBAbDh32F7DyV0m3CH9kXdKLrWigXrO0p0cWQEir0H7fTd2J8_NC1cElkvWv&m=dRon_z2evK4VjWGP0oY9FibkrtcDAvecx7CgL26qjC0&s=7zNuyckO1P0yz595V1RJcVFjt7td9IRnkJf6OEWgRdE&e=>">
  <env:Header>
     <tracking:faultId xmlns:tracking="http://oracle.soa.tracking.core.TrackingProperty<https://urldefense.proofpoint.com/v2/url?u=http-3A__oracle.soa.tracking.core.trackingproperty_&d=AwMFAw&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=8qQMQBAbDh32F7DyV0m3CH9kXdKLrWigXrO0p0cWQEir0H7fTd2J8_NC1cElkvWv&m=dRon_z2evK4VjWGP0oY9FibkrtcDAvecx7CgL26qjC0&s=DwqbKOWHhDFBuDf9yc8Ur29O_D7KfSBO_exS-pWTjNE&e=>">10002</tracking:faultId>
  </env:Header>
  <env:Body>
     <env:Fault>
        <faultcode>env:Server</faultcode>
        <faultstring>An error occurs while processing the XPath expression; the expression is oraext:setFlowInstanceTitle("Title").</faultstring>
        <faultactor/>
        <detail>
           <exception>XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is oraext:setFlowInstanceTitle("Title").
The XPath expression failed to execute; the reason was: Extension function error: Method not found 'setFlowInstanceTitle'.
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.</exception>
        </detail>
     </env:Fault>
  </env:Body>
</env:Envelope>


To resolve the issue apply the patch with no 18310693.

Saturday, October 3, 2015

Server startup failed (FAILED_NOT_RESTARTABLE) with ORA-01882: timezone region not found error - Oracle SOA 12C

Server startup failed (FAILED_NOT_RESTARTABLE) with ORA-01882: timezone region not found error - Oracle SOA 12C

The server startup failed and the status changed to "FAILED_NOT_RESTARTABLE" with the following error. 

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 
ORA-01882: timezone region not found 

Error Code: 604 
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) 
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326) 
        at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) 
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) 
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:204) 
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:741) 
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:239) 
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:685) 
        ... 93 more 
Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 
ORA-01882: timezone region not found 

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466) 
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) 
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:391) 
        at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1126) 
        at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:507) 

The root cause of the issue is, the server not able to get the time zone configuration 
To fix the issue add "-Duser.timezone=UTC" to the server startup parameters - change the timezone with the value supported by database server, 



ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'. - Oracle SOA 12C

ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'. - Oracle SOA 12C

We were receiving the following exception while accessing the OSB console in Oracle SOA 12C.

[2014-10-15T09:18:45.702-04:00] [AdminServer] [ERROR] [] [oracle.help.web.rich.OHWFilter] [tid: [ACTIVE].ExecuteThread: '21' for queue: 'weblogic.kernel.Default
(self-tuning)'] [userId: weblogic] [ecid: bf088c45-bbd9-4379-a8f7-4e3fb8639324-0000017d,0] [APP: service-bus] [DSID: 0000K^JuMDh0ZrALnax0iZ1KFb1b000003] ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'.[[
oracle.adf.controller.security.AuthorizationException: ADFC-0619: Authorization check failed: User 'weblogic' does not have 'VIEW' permission on 'jsf.resourcesPageDef'.
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.handleFailure(AuthorizationEnforcer.java:198)
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.internalCheckPermission(AuthorizationEnforcer.java:166)
  at oracle.adf.controller.internal.security.AuthorizationEnforcer.checkPermission(AuthorizationEnforcer.java:120)


This is caused by using an incorrect JDK version(1.8).
All Fusion Middlleware 12.1.3 products will run on JDK 1.7.55+ version.

To fix the issue downgrade the JDK to supported version.

Downgrade the JDK:

Change all the JDK location referred in the following paths:

<<Middleware_Home>>/Oracle_Home/user_projects/SOA_domain/bin/setDomainEnv.sh

<<Middleware_Home>>/Oracle_Home/oracle_common/common/bin/commEnv.sh

<<Middleware_Home>>/Oracle_Home/user_projects/SOA_domain/nodemanager/nodemanager.properties

Restart the servers.

Friday, October 2, 2015

ORA-01882: timezone region not found while creating schemas through RCU utility - Oracle SOA 12C

 ORA-01882: timezone region not found while creating schemas through RCU utility - Oracle SOA 12C

We were receiving the following exception while running the RCU Utility to create the required schema's in Oracle SOA 12C

ORA-01882: timezone region not found while creating schema's through RCU utility - Oracle SOA 12C


This can be resolved by setting the TZ environment variable before starting the RCU Utility with the supported Timezone of database machine

e.g.

export TZ='UTC'
echo $TZ

Restart the RCU utility.

Node Manager startup fails in Oracle SOA 12C

Node Manager startup fails in Oracle SOA 12C

The Node Manager failed to start in Oracle SOA Suite 12C with the following error.

[Sat Nov 09 01:29:46 2013] [I] [RunJavaApp] Invoking main class
<Nov 9, 2013 1:29:47 AM GMT> <INFO> <Loading domains file:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager
\nodemanager.domains>
<Nov 9, 2013 1:29:50 AM GMT> <INFO> <Loading identity key store:
FileName=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager\security\DemoIdentity.jks, Type=jks, PassPhraseUsed=true>
<Nov 9, 2013 1:29:50 AM GMT> <SEVERE> <Fatal error in NodeManager server> weblogic.nodemanager.common.ConfigException: Identity key store file not found:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\nodemanager\security\DemoIdentity.jks
at weblogic.nodemanager.server.SSLConfig.loadKeyStoreConfig(SSLConfig.java:170)

The actual root cause of the problem is the jks file is not configured properly for nodemanager.

To fix the issue:-

Copy the file <domainhome>\security\DemoIdentity.jks to  <domainhome>\nodemanager\security\DemoIdentity.jks

Saturday, May 16, 2015

Suppressing the Selection Failure exception in Assign activity – Oracle SOA Suite

Suppressing the Selection Failure exception in Assign activity – Oracle SOA Suite

This post will explain how to suppress the Selection Failure exception BPEL Assign activity – Oracle SOA Suite
In BPEL Assign activity if the xpath returns empty result then SelectionFailure RuntimeFault will be thrown by the engine.

But some cases we may need to suppress the selectionFailure error while assigning the optional elements.

In my case I have a assign activity that will mapthe elements  input and input1 from inputVariable to result and result1 of outputVariable.


The input2 is optional and somecases input2 element  will not be available in the request payload.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sup="http://xmlns.oracle.com/Application1/SuppressSelectionFailure/SuppressSelectionFailure">
   <soapenv:Header/>
   <soapenv:Body>
      <sup:process>
         <sup:input>?</sup:input>
      </sup:process>
   </soapenv:Body>
</soapenv:Envelope>

Don't support MessageVariable in fromPart - Oracle SOA Suite

Don't support MessageVariable in fromPart -  Oracle SOA Suite:

This error will be thrown while invoking the service with Multipart Message type and the receive activity uses the fromPart to retrieve the parts data and assign to a variables created based on message type or invoke activity uses toPart to assign the data to parts based message type variable.




To resolve this whenever retrieving or assigning values to parts in receive/invoke activity through fromPart or toPart use the element based variables instead using the message type based variable.

Wednesday, April 29, 2015

How to get the audit level settings of a Composite through Java - Oracle SOA Suite

How to get the audit level settings of a Composite through Java - Oracle SOA Suite

This blog will explain how to get the audit level settings of a Composite through Java in Oracle SOA Suite

import java.util.Hashtable;
import java.util.Set;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

import javax.naming.Context;

import oracle.fabric.composite.model.CompositeNameModel;

public class GetCompositeAuditLevel {
    static MBeanServerConnection m_connection = null;

    public static String getCompositeAuditLevel(String compositeName,String version) throws Exception {
        String auditLevel = "";
        String mBeanName = "*:j2eeType=SCAComposite,revision=" + version + ",*,name=\"" + compositeName + "\"";
        Set<ObjectName> mbeans = m_connection.queryNames(new ObjectName(mBeanName), null);
        System.out.println(mbeans);
        ObjectName mbean = (ObjectName)mbeans.iterator().next();
        javax.management.openmbean.CompositeData[] properties =(javax.management.openmbean.CompositeData[])m_connection.getAttribute(mbean,"Properties");
        if (properties.length > 0) {
            for (int i = 0; i < properties.length; i++) {
                CompositeDataSupport cds = (CompositeDataSupport)properties[i];
                if (cds.get("name").equals("auditLevel")) {
                    auditLevel = (String)cds.get("value");
                    break;
                }
                auditLevel = "Inherit";
            }
        }
        if (auditLevel.equals("Inherit")) {
            auditLevel = getSOAINFRAAuditLevel();
        }
        return auditLevel;
    }

    public static String getSOAINFRAAuditLevel() throws Exception {
        String auditLevel = "";
        String mBeanName ="*:*,name=soa-infra,type=SoaInfraConfig,Application=soa-infra";
        Set<ObjectName> mbeans = m_connection.queryNames(new ObjectName(mBeanName), null);
        ObjectName mbean = (ObjectName)mbeans.iterator().next();
        auditLevel = (String)m_connection.getAttribute(mbean, "AuditLevel");
        return auditLevel;
    }


    public static String getDefaultCompositeRevision(String partiitionName,
                                                     String compositeName) throws Exception {
        ObjectName compositeLifeCycleMBean = null;
        Set queryResult = m_connection.queryNames(new ObjectName("*:j2eeType=CompositeLifecycleConfig,*"), null);
        if (!queryResult.isEmpty()) {
            compositeLifeCycleMBean =(ObjectName)queryResult.iterator().next();
        }
        //CompositeDN - DomainName/CompositeName
        String compositeDN = partiitionName + '/' + compositeName;
        String revision = null;
        CompositeData deployedComposite =(CompositeData)m_connection.invoke(compositeLifeCycleMBean, "getDefaultComposite",
                                               new Object[] { compositeDN },
                                               new String[] { String.class.getName() });
        if (deployedComposite != null) {
            CompositeNameModel cm = CompositeNameModel.parseDN((String)deployedComposite.get("DN"));
            revision = cm.getRevision();
        }
        return revision;
    }

    public static MBeanServerConnection getMbeanServerConnection(String host,int port,String userName,
                                                                 String password) throws Exception {
        String jndiroot = "/jndi/";
        MBeanServerConnection m_connection = null;
        try {
            Hashtable jndiProps = new Hashtable();
            jndiProps.put(Context.SECURITY_PRINCIPAL, userName);
            jndiProps.put(Context.SECURITY_CREDENTIALS, password);
            jndiProps.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");

            JMXServiceURL serviceURL =new JMXServiceURL("t3", host, port, jndiroot +"weblogic.management.mbeanservers.runtime");
            JMXConnector m_connector =JMXConnectorFactory.newJMXConnector(serviceURL, jndiProps);
            m_connector.connect();
            m_connection = m_connector.getMBeanServerConnection();

        } catch (Exception e) {
            e.printStackTrace();
        }
        return m_connection;
    }


    public static void main(String[] args) {
        try {
            m_connection =getMbeanServerConnection("localhost", 7001,"weblogic", "welcome1");
            String defaultVersion =getDefaultCompositeRevision("default", "TestComposite");
            String auditLevel=getCompositeAuditLevel("TestComposite", defaultVersion);
             System.out.println("auditLevel:"+auditLevel);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}

Jar files required in the class path:

  • SOA Runtime jars 
  • weblogic.jar

Tuesday, April 28, 2015

Saturday, April 18, 2015