Thursday 21 December 2017

SOA 12c DBAdapter : Exception occured during invocation of JCA binding: Could not create/access the TopLink Session.

Recently created a new DataSource and adapter JNDI and when trying to test I got the below error:

Exception occurred when binding was invoked. Exception occurred during invocation of JCA binding: “JCA Binding execute of Reference operation ‘merge’ failed due to: Could not create/access the TopLink Session. This session is used to connect to the datastore. Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services – 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.ValidationException Exception Description: Cannot acquire data source [jdbc/Demo_DB]. Internal Exception: javax.naming.NameNotFoundException: Unable to resolve ‘jdbc.Demo_DB’. Resolved ‘jdbc’; remaining name ‘DemoDB’. You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake. “. The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.


The solution was simple. Either you can;

1. Cross verify the DataSource name in the adapter JNDI connection pool and make sure to update the DBAdapter.

or

2. Check if your DataSource is targeted to the soa_server. If not, target it.


Helpful? Please Comment.

Happy Learning!!

Monday 11 December 2017

SOA 12c : Error JTA transaction is not in active state/The action "update action" cannot be performed on the instance

Today while I was testing a service I was seeing errors intermittently on EM instances.
My service was invoking a sync partner link and even with successful response the error was  happening.

Well turns out the error was due to the default JTA setting to 30 seconds.

Error:
JTA transaction is not in active state.
bpel engine can not execute activities without an active transaction. please debug the invoked subsystem on why the transaction  is not in active status. the bpel instance id is "448".
The reason was The execution of this instance "448" for process "App/ProjectBPEL!1.0*soa_3cd6576b-91bd-4992-afaf-3620d3509180" is supposed to be in an active jta transaction, the current transaction status is "MARKED_ROLLBACK" .
Consult the system administrator regarding this error.

or

Cannot access instance.
The action "update action" cannot be performed on the instance "9579" because of its current state ("unknown").
The current instance state did not allow the requested action to be performed.
Consult the product documentation for a list of all the permissible actions that can be performed on an instance when it is in the "unknown" state.

Solution:
1. Login to WebLogic console.
2. Navigate to JTA settings
3. Increase your JTA to a higher value.

JTA values can depend on the processing time that your partner may take in a sync exchange set globally.

Helpful? Please Comment.

Happy Learning!!

Thursday 7 December 2017

SOA 12c : Change BPEL Preference Property at Runtime on EM

Here is what you can do if you want to update your bpel.preference.variable value on 12c Enterprise Manager.

Example, if you have set variable as below in your composite.xml:

<property name="bpel.preference.Email">test@test.com</property>
  
1. Login to EM [http://hostname:port/em]
2. On Left Navigator, navigate to WebLogic Domain > soa_domain

 
 
3. Right-click and select 'System MBean Browser'
4. On next page, left pane scroll at the bottom and expand oracle.soa.config
5. Navigate under that to Server: soa_server > SCAComposite > Your composite[version]
6. Expand and select SCAComposite.SCAComponent > Click on your component
7. On the left pane, under Attributes column click on Properties
8. Under Key expand Element for Email and change the contents of value field.
9. Apply.

The new values should now reflect.

Helpful?  Please Comment.

Happy Learning!!

Tuesday 5 December 2017

SOA 12c : Clear MDS cache


Sometimes when we have made changes to the MDS the changes do not reflect. Even when we redeploy the composite its the same.
The below action helps other than restarting the server.

1. Start System MBean Browser; In Domain, pull down the WebLogic Domain menu and choose 'System MBean Browser'

2. Browse for the Application Defined Beans:
3. Expand it and navigate to oracle.mds.lcm, choose server (AdminServer or SOAServer1)




4. Navigate to the node Application em (AdminServer) or soa-infra (SOAServer) -> MDSAppRuntime > MDSAppRuntime. Click on the tab Operations, and then on clearCache
5. Click on Invoke

This should help in reflecting the MDS changes.

Helpful? Please Comment.

Happy Learning!!

Monday 4 December 2017

SOA 12c SOAPUI : How to add OWSM WS-Security Username Token

Lately I was trying to test a service that was using an OWSM Username Service Token policy using SOAPUI and was getting the below error:

<env:Fault xmlns:ns0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <faultcode>ns0:InvalidSecurity</faultcode>
         <faultstring>InvalidSecurity : error in processing the WS-Security security header</faultstring>
         <faultactor/>
</env:Fault>


I had added Basic Authorization with the required credentials.

Well the reason was quite simple.

I had not added the username token to the SOAP Header. Hence it was able to validate the security.

Here is what you must do:

Let the Basic Authorization be as is.
1. Right-click on your request message in SOAPUI
2. Select 'Add WSS Username Token'



3. Select Password Text and click on OK.



You can see that the Token is added to the Header




4. Test


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...