Showing posts with label EM. Show all posts
Showing posts with label EM. Show all posts

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, 13 November 2017

SOA 12c DBAdapter : JCA Binding execute of Reference operation 'insert' failed Caused by java.sql.SQLException: Attempt to set connection harvestable to false but the connection is already closed.

Recently when trying to test a DBAdapter service I came across this issue. You can follow the same steps as I did to resolve the problem.

Error:
com.oracle.bpel.client.BPELFault: faultName:
{{http://schemas.oracle.com/bpel/extension}remoteFault} messageType:
{{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=Exception occurred when binding was invoked.
 Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to:
 DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [EmpTemp.Emp_Temp]
Caused by java.sql.SQLException: Attempt to set connection harvestable to false but the connection is already closed.

Actual Reason:
DS that you are using is stale.
Means, lately the DBMS that you are connecting to, was restarted or refreshed and WebLogic Server lost the connection to it.

Why this happened?
You have not yet configured the pool to test connections, so once the connection is dead,
WLS still knows nothing about that, and will save and serve up dead connections until the pool is rebuilt.

Do one or both of the below things:

Solution: Enable test-connection-on-reserve (so that is does not happen again).
Or
Implement Work-around: Reset the datasource from the console after the DBMS is back up.

When you reset the database connections in a JDBC data source, WebLogic Server closes and recreates all available database connections in the pool of connections in the data source.

To reset database connections in a JDBC data source:

1. Navigate to the data source that you want to reset:
2. Select the Control tab.
3. On the Control page, select the instances of the data source that you want to reset.
    Date source instances are listed by the server on which they are deployed.
4. Click the Reset button.
5. Click Yes to confirm the action.

     Results are displayed at the top of the page, and the Status of Last Action is changed to SUCCESS for each data source that you selected to reset.


Helpful? Please Comment.

Happy Learning!!


SOA 12c : Deployment Error MDS-00039: error while attempting to parse the document .diagram.xml

If you are trying to deploy a recently changed service composite to Enterprise Manager and getting the below error:

Deploying on "/Domain/soa_domain/soa_server1" failed!
There was an error deploying the composite on soa_server1: oracle.mds.transfer.TransferException:
MDS-00001: exception in Metadata Services layer
oracle.mds.exception.MDSRuntimeException: MDS-00039: error while attempting to parse the document /deployed-composites/Test/TestBPEL_rev1.0/SCA-INF/TestBPEL.diagram.xml using SAX.
oracle.xml.parser.v2.XMLParseException; lineNumber: 1; columnNumber: 1; Start of root element expected.
MDS-00001: exception in Metadata Services layer:

Reason: The SCA-INF folder contents are stale.

Here is what you should do.

1. In JDeveloper navigate to your project, select it.
2. Under tab Build (Alt + B), select Clean project.jpr
3. Re-build your project/sar and deploy.

Helpful? Please Comment.

Happy Learning!!

Wednesday, 18 October 2017

SOA 12c Security : SOADeployer role

Oracle Enterprise Manager Fusion Middleware Control supports the notion of role-based access. Users are mapped to different roles; each role corresponds to a different set of privileges. Using this mechanism, you can provision certain users with simple monitoring privileges (for instance view-only access), while administrators can be granted full access, including the ability to update configurations, restart servers, and so on.

The following roles have been defined for Oracle WebLogic Server in Oracle Enterprise Manager Fusion Middleware Control:

1. Administrator
2. Operator
3. Monitor

The actions that you can perform in Oracle Enterprise Manager Fusion Middleware Control are protected using Oracle WebLogic Server enterprise roles. To obtain the appropriate behavior in Oracle Enterprise Manager Fusion Middleware Control, you must correctly map either the user or enterprise role to the Oracle SOA Suite application role.

SOAAdmin -to- Administrator
SOAOperator -to- Operator
SOAMonitor -to- Monitor

There is no default mapping of the SOAMonitor and SOAOperator roles to Oracle WebLogic Server groups or users. These roles must be manually mapped in Oracle Enterprise Manager Fusion Middleware Control.

However we do not have any role SOADeployer.

This is what you should do if you want to create a custom role in Oracle EM Fusion Middleware control.

The role will have the below grants only:
1. Deploy Applications to WebLogic servers
2. Life-cycle SOA composites for all folders.

Steps:
1. Create SOADeployerUsersGroup
    a. Login to WebLogic console
    b. Navigate to Security Realms > myrealm > Users&Groups > Groups tab
    c. Create new Group SOADeployerUsersGroup
    d. Click on SOADeployerUsersGroup and under Membership tab add Deployers and Save.

2. Create Role
    a. Login to EM
    b. Navigate to WebLogic domain (soa_domain) > Security > Application Roles
    c. Select Application Stripe - soa-infra
    d. Create new Role SOADeployerCustomRole
    e. Under Membership section, Add > Group > SOADeployerUsersGroup
    f. Save

3. Create Principal
    a. On EM navigate to WebLogic domain (soa_domain) > Security > Application Policies
    b. Create Principal
    c. On Add Principal section, Search for Application Role > Select SOADeployerCustomRole
    d. Under Permissions, Click on Add
    e. Select Class - CompositePermission and filter Resource Name > Includes > *

       

    e. Select first resource and click on Next
    f. Under Customize, select read, provision and life-cycle
    g. Continue ans Save.

Now you can create a User in Weblogic Server add it to SOADeployerUsersGroup membership.

You can then deploy your code from JDeveloper or using scripts with this user to any SOA folder.

Helpful? Please Comment.

Happy Learning!!

Wednesday, 11 October 2017

SOA 12c ESS : Oracle Enterprise Scheduler Service - Creating Job definition & Schedules

Part of SOA Suite 12c, Oracle Enterprise Scheduler is primarily a Java EE application that provides time and schedule based callbacks to other applications to run their jobs.
Oracle Enterprise Scheduler applications define jobs and specify when those jobs need to be executed, and Oracle Enterprise Scheduler gives these applications a callback when that time or when a particular event arrives.

Oracle Scheduler (ESS) is not part of your development activities. It is more considered a runtime configuration. This basically means that at runtime you can decide to create new jobs and apply scheduling configuration.

In this post we will learn how to schedule a web-service using ESS which broadly this requires 3 steps:
1. Create Job Definition
2. Define a Schedule
3. Submit a Job request

We will also learn how to Cancel Job requests.

Lets Start by creating a Job Definition.

1. Take the WSDL URL of your service, SOA(from EM) or OSB(from sbconsole)
2. Login to EM  console
3. In the left-pane, Topology Navigator,  navigate to ESSAPP under Scheduling Services



4. Right click on ESSAPP > Job Metadata > Job Definition






















5. Select Create

 

6. On the Create Definition screen, fill the below fields and leave rest as default.

Name: HelloWorldJob
Display Name:  HelloWorldJob
Package: soa [you can leave blank or put soa, osb, etc to logically group your jobs]
Description: HelloWorld Job
Job Type: OnewayWebserviceJobType [you can select the job type based on your WSDL's Message Exchange Pattern; sync, asysnc, oneway]

 

7. Click on the 'Select Web Service..' button
     a. Paste the WSDL URL
     b. Select Web Service Type : SOA [if OSB service you can select Service Bus] 
     c. Click on Go


    



      

d. Select the Service, Port Type, Operation and provide your dummy Input.













e. Click on OK.

All WSDL and payload information is displayed as a set of system properties in the definition like below:




8. Click on OK [top-right corner of page] to create the Job Definition.


Now we will create a Job Schedule and Submit Job Request

1. Navigate to  ESSAPP > Job Requests >Submit Job Request



2.  Click the search icon for Job Definition and select the Job definition created above and click OK.

 


3. On the right-hand select radio 'Specify schedule'

 

4. Click on OK to create schedule and submit Job.

Now we will Search Job Request that we created and scheduled above.

1. Navigate to ESSAPP > Job Requests > Search Job Requests 

 


2. Click on Search. It will list all the job requests.

Note : In the list you will see 2 things:
 a. RequestID with row values n/a - this is the parent job id
 b. RequestIDs with Parent ID as the above - these are the schedule requests

Parent IDs are in wait state until the schedule is complete or cancelled.
Request IDs will be in wait sate till the scheduled execution time, then change to either Succeeded or Error.

3. You can go to the composite Flow Instances, you will see the completed flows.

If you want to Cancel the Job Request, here is what you should do.

1. Navigate to ESSAPP > Job Requests > Search Job Requests
2. Click on Search
3. In the list navigate to the Parent ID (will have n/a for values and WAIT state)
4. Click on the Request ID hyperlink, 
5. Right side of page click on Action and Cancel.
6. On the Search page you will see that the parent and pending jobs are cancelled. 

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