Follow Us on Twitter

OSB 12c; tips for use DomainValueMap in Xquery

by Herman Brunnekreef on October 31, 2014 · 5 comments

Today I was building a Xquery with a reference to a DomainValueMap (DVM) in JDeveloper 12c for an OSB 12c project.

When testing my Xquery I ran into the following error:

Caused by: oracle.tip.dvm.exception.DVMValidationException: Unable to get Metadata Manager for DVM ""
Please ensure the Metadata Manager is available.
at oracle.tip.dvm.DVMManagerImpl.getDVMRTObject(DVMManagerImpl.java:223)
at oracle.tip.dvm.DVMManagerImpl.lookupValue(DVMManagerImpl.java:88)
at com.bea.wli.sb.functions.dvm.DVMFunctions.lookupValue(DVMFunctions.java:40)

When you create a dvm lookup function in Xquery you get this :

dvmtr:lookup(<dvm-location>,<dvm source-domain>, <dvm sourcevalue>, <dvm targetvalue>, <defaultvalue>).

This is the default folderstructure that I use for a servicebus project:

sb

The solution for the error I had is the following.  If you create a Xquery in the folder “Transformation” and use a reference to a domain-value-map remember of the next tips:

  1. use for <dvm-location> the name without the extension.
  2. also for the <dvm-location>; use the relative path, even when the files are in the same folder.

When you combine tip 1 and 2, the dvm-location of the example will be: ‘ServiceBusProject/Transformation/domainValueMapExample’ and your Xquery referenced with the DVM will run perfectly!

 

OSB 12c; tips for use DomainValueMap in Xquery , 5.0 out of 5 based on 6 ratings
Ratings:
VN:D [1.9.22_1171]
Rating: 5.0/5 (6 votes cast)

{ 5 comments… read them below or add one }

Ankur Arora March 2, 2015 at 5:25 pm

Thank you Herman 🙂

Reply

Shoaib Khan June 4, 2015 at 9:27 pm

Hi Herman,

I’m trying to access values of DVM in Java Code using DVMManager but it seems in 12c .DVM file is not getting recognized. Could you throw some light on what exactly is the format for specifying the .dvm file name along with location when lookup is being done using DVMManager interface.

Once I deploy my project I am able to see the DVM in SOA Composer but when execute the java class invoking DVM its giving exactly same error as you mentioned “Unable to get Metadata Manager for DVM “

Reply

Herman June 5, 2015 at 1:50 pm

Hi Shoaib,

In the situation I describe the dvm is being used in the servicebus project. So this is the relative path.
If for example the dvm is in the mds, you need to specify the full path. I think that in your case you need to specify the full path to the dvm. In the soa-composer you can bookmark your dvm and then you have the full path to your dvm.

Reply

Harish August 5, 2015 at 11:48 am

hi Shoaib,

I have a similar requirement to fetch DVM from MDS in service bus. Can I know if you have implemented the above succesfully. If so can you tell me how the invocation was from service bus?

Reply

Tej December 12, 2016 at 9:00 pm

Did anyone able to lookup DVM from MDS in ServiceBus ?

I published DVM to MDS and tried this xpath
dvm:lookup(‘oramds:/apps/dvm/DVMTest.dvm’, ‘domain1’, ‘value1’, ‘domain2’, ‘NotFound’)

I am getting this error
Caused by: oracle.tip.dvm.exception.DVMValidationException: Unable to get Metadata Manager for DVM “oramds:/apps/dvm/DVMTest”
Please ensure the Metadata Manager is available.
at oracle.tip.dvm.DVMManagerImpl.getDVMRTObject(DVMManagerImpl.java:223)
at oracle.tip.dvm.DVMManagerImpl.lookupValue(DVMManagerImpl.java:88)
at com.bea.wli.sb.functions.dvm.DVMFunctions.lookupValue(DVMFunctions.java:42)
… 64 more

Reply

Leave a Comment

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter