Solution: ADF Faces & BC, oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object

refactor

Cliffs: If you encounter MDS-00013 exception referring to a .jpx file after refactoring an ADF BC project, check for references within your projects that has an invalid reference.

Complex refactoring can be a daunting task with ADF! A tough lesson learned when I attempted to refactor a package structure for a set of ADF BC files (Vos,Eos,AMs). After which I encountered the following exception upon running my jsf pages:

oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/org/mskcc/team/common/model/Model.jpx"
at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1285)
at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:3210)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1220)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1166)
at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:193)
...

Since there is no mechanism within JDeveloper (11.1.2.4) that I know of to refactor the Model.jpx file, I had to move it manually into a new directory structure, i.e. from /org/mskcc/team/common/model/Model.jpx to /org/mskcc/common/model/Model.jpx. The problem was that there are other files which reference this .jpx file, one of which turns out to be one of many bc4j.xcfg files. Closer inspection of the generated code reveals the cause of the error:

<AppModuleConfig name="CommonAppModuleLocal" … jbo.project="org.mskcc.team.common.model.Model” …>

Which can be easily fixed by replacing the jbo.project attribute with the right value.

Another tip is to use the “Find in files” dialog to search for text within files.

find

review the results and open the code to check for invalid references.

findresults

My JDeveloper version: 11.1.2.4

Advertisements

About wesfang

www.linkedin.com/in/wesfang/ https://twitter.com/wesleyfang
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Solution: ADF Faces & BC, oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object

  1. rajendra says:

    Check the paths in viewcontroller.jpr files.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s