Monday, April 2, 2012

Red Samurai MDS Cleaner V2.0

Here we go, you can download Red Samurai MDS Cleaner V2.0. This tool is designed to work with plain ADF applications, as well as with WebCenter Portal or WebCenter Spaces applications. It allows to delete and edit corrupted or obsolete MDS entries. Functionality summary - search, view, edit and delete MDS customizations for ADF/WebCenter applications. Why we need such tool - MDS is black box and is really hard to revert to correct state when user creates corrupted MDS customizations or MDS breaks by itself. Red Samurai MDS Cleaner is designed to help Oracle Fusion administrators to resolve MDS related issues quickly. There are many ways how to break MDS, user don't need to be Chuck Norris to break it, you know it. We are here to help you.

Key features:

0. Works with ADF/WebCenter 11g PS1 - PS5

1. Plug&Play ADF Task Flow concept. Integrate into any ADF or WebCenter project, assign ADF security permission and you are ready to perform MDS housekeeping

2. Allows to search for MDS entries by package path or file name. Supports wildcard search options

3. Allows to delete one or many MDS files during single transaction

4. Allows to view MDS file content

5. Allows to edit and save updated MDS file content

In order to add MDS Cleaner into your project, register MDS Explorer JAR as ADF Library within JDeveloper:

You will find MDS Cleaner ADF Task Flow inside this JAR, reference it from your project:

Add MDS Explorer ADF Library to the project:

If you want to test MDS Cleaner functionality, make sure ADF application is enabled with MDS functionality:

One of the most typical use cases for MDS, when working with plain ADF application - table column reordering - changed column order is stored in MDS:

Now if you want to review applied MDS customization, open Red Samurai MDS Cleaner and search for employeesView.jsff fragment customization - %employee%:

Press Edit Source XML - it will load customization content for selected file. Here we can see custom order for table columns:

Let's say we want to clear applied customizations completely - so, just delete customization file:

Confirm delete - file is removed and customization entry is cleared completely:

Now if you go back to ADF page with table component, column order will be reset to original one as it was designed by developer.

Let's have a look now into WebCenter Portal application. Red Samurai MDS Cleaner is integrated into WebCenter Portal navigation model:

Don't forget to grant ADF Security permission (any permission, even authenticated role will work) to Red Samurai MDS Cleaner - otherwise it will not be rendered:

We can access Red Samurai MDS Cleaner from WebCenter Portal and view customizations for any portal resource:

I will present WebCenter Composer use case. Assume we have WebCenter Composer, and user added couple of ADF Task Flows:

User decides to edit Composer entry and types invalid EL expression:

This action caused error and WebCenter Composer view is corrupted:

How to fix this? You can export entire MDS package, look through the files - fix files and try to upload entire MDS package again. This is bad practice - because it will conflict in concurrent environment, if other users are doing MDS customizations right now. Answer - use Red Samurai MDS Cleaner, search for Composer page - %comp%:

Open customization file - remove region reference:

Changes will be stored into MDS, do same for Composer Page Definition file. MDS repository was updated:

Go back to the Composer page - it works now, corrupted MDS entries gone away. Let's do one more test:

1. Reorder table columns
2. Deactivate table filter

Search MDS customizations for jobs fragment - %jobs%:

Edit and remove only custom column reordering - save MDS change through Red Samurai MDS Cleaner:

Go back to ADF Task Flow - column order is reset back to the original, table filter remains deactivated as expected:

Next release plan:

1. Option to set MDS label from ADF/WebCenter application


Arvind said...


When I uptook this jar file, I get this error on searching

Caused by: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.mds.exception.MDSRuntimeException, msg=MDS-01201: An invalid parameter cannot be used when constructing a query condition.

Is there anything that I have to do, to get the search performed as expected?


Andrejus Baranovskis said...


This error is from internal Oracle MDS API. Most likely your search parameter is invalid.

Please post search parameter value, I will advice.


Vladimir Savochkin said...

I cannot either save modified document or delete any.

Caused by: java.lang.NullPointerException
at com.redsamurai.mdsexplorer.view.beans.MDSCleaner.mdsDeleteDocDialogListener(

May you publish source code of this very useful tool?

Andrejus Baranovskis said...


This error means - ADF is not able to get selected entry from UI table. May be there is issue with ADF runtime on your server. MDS explorer is tested on ADF 11g P3, PS4 and PS5 versions.

Sorry..., we distribute source code for MDS explorer only through commercial license. We offer commercial support as well.

Please be in contact offline by email, if you are interested.


Sudipto Desmukh said...

Thanks for the wonderful article.
I'm geting an error accessing the application though post integrating the MDS cleaner and following the steps (like enabling user cc). Could you please suggest ?

Andrejus Baranovskis said...

Tell me the errors you are getting?