Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c

================================================================================================

Unable to deploy ADF UI app - java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet

You may get the following exception while deploying the ADF UI application from Jdev/WLS

Operation 'deploy' on application 'ProjectInitiate_V3_UI' has failed on 'AdminServer'
java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet
oracle.adf.library.webapp.ResourceServlet
Deploy operation failed.

Reason being the .war file that you are trying to deploy does not contain the whole lot of classes required. You make .ear file instead which has all the resources required.

The way you do it is, deploy the same at the Application level instead of Project Level from Jdev


OR

If you are deploying directly from EM/Console, deploy the .ear file instead of .war file

SOA Deployment taking indefinite time

Sometimes, you may encounter the following issue

The task cannot be processed further until the current edit session is activated. When this occurs, task processing will continue. The user can exit the deployer tool without affecting the task.

and the deployment never happens.

This happens because there you may have mistakenly/intentionally changed certain parameters in the WLS console, and did not activate/revert those. If you open the console (http://host:port/console), you see the 'Activate Changes' button enabled at the left top corner.
You just have to either activate/revert the changes, and the deployment happens now.

Runtime Operation Error in BPM - ORABPEL-30017 - Invalid task definition

Hi

When you encounter this issue of getting a 'Runtime Operation Exception' while logging into BPM Workspace, or find a similar log

ORABPEL-30017

Invalid task definition.
The task definition at default/PrjTaskReminderNotification!1.0*soa_5cb0ae06-9485-488f-91b1-1b2872276fb9/Initiator could not be read. The task definition is associated with workflow default/PrjTaskReminderNotification!1.0*soa_5cb0ae06-9485-488f-91b1-1b2872276fb9/Initiator.
Make sure that the task definition is available at the specified URL and that it is a valid XML document.






Here's the solution.
This happens when there are more than one active record in BPM_CUBE_PROCESS table.
You just have to make sure that there is only one active record per process.

Execute the following query by connecting to the SOA_INFRA schema of the database

select processId, processName, compositeName, revision, status, from BPM_CUBE_PROCESS;

If it returns multiple records for the same ProcessName, make the status of all those entries to -1,commit and redeploy the process.
Now, you can see the process in the workspace without any problem

Publish Message to JMS Queue

This post takes you through a step-by-step procedure to create a JMSAdapter that publishes a message

1. Create a new SOA Project 
2. Define a message schema of the following type

3. Drag and drop JMSAdapter from the component palette to References section of composite.xml 
4. Configure the JMSAdapter as per the screenshots given below




The below wizard is important
Select the Queue where the message is to be published(which is created in previous tutorial)
Set the TimeToLive property whose meaning is obvious. The message disappears after this time
Also, set the JNDI name of the ConnectionPool that you've created in the previous tutorial






Your composite would look like this




5. Create a one-way Mediator with the input type similar to the one for JMSAdapter(with SOAP endpoint) and wire it to the JMSAdapter


6. Composite looks like this

7. Now, open the mediator, create the transformation file in the Routing Rule and deploy

Testing
Open the composite in EM and test it (give a payload of your choice)


To check if the message is published to JMS,
Goto Services --> Messaging --> JMS Modules --> MyJMSModule --> myQueue --> Monitoring tab --> click on the Queue name --> Show Messages --> click on the message



This message stays in the queue for the time that is configured in the wizard. After that time, the message expires.

Configuring JMS Resources for JMSAdapter

This post is a step-by-step guide to configure JMS resources in Weblogic Server in order to work with JMSAdapter

Working with JMSAdapter in Oracle SOA Suite 11g involves configuration of various JMS resources in WLS

  1. JMS Module(Optional) : Is a definition that contains various JMS Resources like queues, topics, etc.
  2. Sub-Deployment(Optional) : used to group target servers
  3. Connection Factory : is a Weblogic resource that enables JMS clients to create connections to JMS destinations
  4. Queue / Topic : the actual destination of the message, either a queeu(point to point) or topic(publish-subscribe)
  5. Connection Pool : Create a pool of connections for the JMSAdapter application

Creating a JMS Module
This step is not mandatory, you can use the default module 'SOAJMSModule'
Weblogic Console --> Services --> Messaging --> JMS Module --> New --> Provide a JMS Module Name --> select the target server(to which you want to deploy this, usually the managed server where SOA is configured) --> Leave the check box(define resources in this module) --> Finish





This step creates a new JMSModule 'MyJMSModule'.

Creating a sub-deployment
Every JMSModule has to be targetted to a Sub-Deployment. A Sub-Deployment is used to group targets

Click on the just created MyJMSModule --> click on Subdeployments tab at the top --> New --> Give name to the subdeployment --> select the target (can either be a server or JMSServer. As this is specific to JMS, I've selected SOAJMSServer(default available JMS Server. You can even create your own JMSServer))


 
 

 
Creating a Connection Factory
A Connection Factory is used to create connections for the JMS Clients to interact with JMS Resources
Click on the just created MyJMSModule --> New --> Connection Factory --> Give name & JNDI name --> soa_server1(selected by default) --> Finish



 
Creating a Queue
Queue is the actual destination
Click on the just created MyJMSModule --> New --> Queue --> Give name & JNDI name --> select subdeployment --> Finish




 
This sets up all the JMS Resources.

You are still left with one configuration to be done to use this queue with a JMS Adapter, which is creating an outbound connection pool
For this, go to Deployments --> JMSAdapter --> Configuration --> Outbound Connection Pools --> New --> oracle.tip.adapter.jms.IJmsConnectionFactory --> Next --> Provide JNDI Name for the Connection Pool(This will be used in the JMSAdapter configuration in the Composite)
This will create a Connection Pool, but Connection Factory(the resource used to connect to Queue) is not yet configured, which is done in the next step




Click on the just created connection pool --> enter the ConnectionFactoryLocation as the JNDI name that you've created in Step 2 (which is jms/myConnFactory and hit Enter) --> Save

Update the JMSAdapter deployment
Console --> Deployments --> click on JmsAdapter checkbox --> Update --> select defaults --> Finish

Now, you can use the ConnectionPool name eis/jms/myConnPool in the dbAdapter in your SOA Composite
If you get any error saying the connectionPool not found, restart the SOA Server

Please read the next post on working with JMS Adapter