The following topics are discussed:
Get Started with Troubleshooting and Logging Basics for Oracle Metadata Services Repository
Troubleshoot Applications Performing Slowly Due to MDS Repository
Diagnose Exceptions with Oracle Metadata Services Repository
Some procedures in this section refer to content in the Oracle Fusion Middleware guides. These guides describe procedures using Fusion Middleware Control. These procedures also apply to Fusion Applications Control.
To troubleshoot Oracle Metadata Services Repository issues, use the following tools:
For general instructions on managing the metadata for Oracle Fusion Middleware components in the Oracle Metadata Services Repository, see the Managing the Metadata Repository section in the Administering Oracle Fusion Middleware Guide.
The Oracle WebLogic Scripting Tool (WLST) is a command-line scripting environment that can be used to create, manage, and monitor Oracle WebLogic Server domains.
You can manage Oracle Metadata Service (MDS) Repository by using the MDS Repository commands described in the Metadata Services (MDS) Custom WLST Commands section of the WLST Command Reference for WebLogic Server.
To manage application metadata in the MDS repository, perform the following steps:
To modify configuration and runtime MBean properties, perform the following steps:
Modify the AutoPurgeTimeToLive
and MaximumCacheSize
configuration MBean property in Fusion Applications Control. See the Changing MDS Configuration Attributes for Deployed Applications section in the Administering Oracle Fusion Middleware.
Invoke the clearCache
runtime MBean operation in Fusion Applications Control. If it seems that metadata updates are not being picked up, invoke this operation to see if it is related to caching. Note that the use of this operation has a short-term performance impact while the cache is re-populated.
To invoke the clearCach
runtime MBean operation in Fusion Applications Control, perform the following steps:
From the navigation pane, expand the farm, then expand Application Deployments.
Click the application that uses MDS Repository.
In the Java EE Application home page, from the Application Deployment menu, choose MDS Configuration.
The MDS Configuration page appears.
In the Advanced Configuration section, click Runtime MBean Browser link.
In the System MBean Browser page, expand Application Defined MBeans, oracle.mds.lcm, Server: Managed Server, Application: Application Name, MDSAppRuntime, and MDSAppRuntime.
The System MBean Browser displays the Application Defined MBeans: MDSAppRuntime:MDSAppRuntime page.
Click the Operations tab, as shown in the following figure.
Figure 17-1 Expansion of MDSAppRuntime in the System MBean Browser
Click the clearCache.
Click Invoke.
To modify logging attributes, use WebLogic Script Tools (WLST) commands. See Fusion Middleware WebLogic Scripting Tool Command Reference. Alternatively, the logs can be viewed and the logger levels can be changed.
To view the logs, perform the following steps:
Right-click the domain under WebLogic Domain, then choose View Log Messages.
From the navigation pane, expand the farm, then expand WebLogic Domain, and Managed_Server.
Choose Logs, then View Log Messages.
If the problem still cannot be solved, increase the log level of the system to debug the transactions.
To simplify troubleshooting, it is recommended to enable the loggers listed in the following steps at the TRACE:32 (FINEST) level. (See exception below related to oracle.mds).
To change logger levels, use the setLogLevel
WLST command or perform the following steps:
From the navigation pane, expand the farm, then expand WebLogic Domain, and then Managed_Server.
Choose Logs, and then Log Configuration.
In the Logger Name column, expand the oracle, and then oracle.mds to display the loggers. Typically oracle.mds is set at FINER for initial investigation to get an overall view. Multiple loggers can be enabled and one or more of the FINEST loggers can subsequently be added to drill down into more detail.
Warning: Setting oracle.mds to FINEST (rather than FINER) will enable a huge amount of tracing as it effectively switches on all of the oracle.mds. loggers at FINEST.
In the Oracle Diagnostic Logging Level (Java Level) column, enable tracing for the following loggers, depending on the functional area to be investigated. For example, change the logging level to TRACE:32 for the following loggers:
oracle.mds.query - for detailed diagnostics for SQL statements, bind variables, and timing information about MDS database queries.
oracle.mds.jsp - for trace JSP integration with MDS.
oracle.mds.dbstore - for detailed logging about all operations done at the persistence level for the database-based MDS repository.
oracle.mds.sandbox - for debug level information for all the sandbox operations. Use this logger when troubleshooting creation of a sandbox, managing the sandbox metadata, applying a sandbox or any other sandbox lifecycle-related operations. Use this logger in conjunction with the oracle.mds.dbstore logger.
oracle.mds.coretxn - for detailed logging for MDSTransaction
methods. MDSTransaction
is an internal class which is associated with an MDSSession
that is being used to make changes to metadata. Enabling this logger includes diagnostics to help verification that the same MDSSession
is not being used by multiple threads, which while not illegal is unusual and can cause problems if done incorrectly.
oracle.mds.pdcache - to trace document cache access and invalidation. Shows labels being used for lookups and versions being returned from the cache.
oracle.mds.remotechange - for detailed tracing on polling thread, synchronous polling on flushChanges() and optional distributed notifications feature (not enabled for Fusion Applications).
oracle.mds.corecache - to trace core cache access and invalidation.
oracle.mds.rename - for detailed diagnostics for listing dependency references during rename operation.
oracle.mds.custupdate - for detailed diagnostics for change events handling and optimization, and creation of MDS customization instructions during update of MDS customizations.
oracle.mds.custmerge - for detailed diagnostics when applying MDS customization instructions.
oracle.mds.mnfe - for tracing of MetadataNotFoundException
and isStale()
evaluation.
The change should take effect within a few minutes. In a production system, setting the trace at a fine-grained level can result in a large amount of output that must be diagnosed. Alternatively, use selective tracing that provides a way to get a detailed, on-disk trace selectively (for example, by user name, thereby eliminating trace output for other users).
To activate selective tracing, right-click the domain under WebLogic Domain, then choose Logs, and then Selective Tracing.
Note that Selecting Tracing does not display as an option when you right-click an Administration Server or Managed Server and choose Logs.
From the Option Name list, choose the type of selective trace (for example, based on user name), and then start the trace.
When the problem has been reproduced, disable the trace and view the output to narrow down the issue.
For more information on selective tracing, see the Configuring and Using Selective Tracing section of Administering Oracle Fusion Middleware.
Review the error logs (from Fusion Applications Control) for more information on the error.
Cross layer, server, and family functionality can be correlated through the execution context ID (ECID) (for example, look up the composite instance for a given expense report by correlating all the log entries with the ECID associated with that expense report transaction). For more information, see the Correlating Messages Across Log Files and Components section of Administering Oracle Fusion MiddlewareGuide.
If the application is performing slowly, there could be an issue with the MDS Repository. Approach the issue in the following ways:
To check the MDS Repository performance and adjust the cache size, perform the following steps:
Check performance metrics for cache performance.
Navigate to the application's home page and expand the farm, then Application Deployments, and then select an application.
The application's home page appears.
From the Application Deployment menu, choose Performance Summary.
The Performance Summary page appears.
Click Show Metric Palette.
Expand MDS Metrics and select IOs Per Metadata Object Get and IOs Per MO Content Get.
Monitor the value of these metrics. A value of 0 is ideal since it indicates that all requests are being serviced from the cache.
Metadata updates
User customizations that are only cached for the duration of the user session at most
IO operations that were not due to calls from the Metadata Object APIs
Modify the MaximumCacheSize
configuration MBean property, gradually increasing it in size to see if that improves performance. See the Changing MDS Configuration Attributes for Deployed Applications section in the Administering Oracle Fusion Middleware.
To resolve this problem from the MDS Repository database, perform the following steps:
Capture an Automatic Workload Repository (AWR) report. See the Gathering Database Statistics Using the Automatic Workload Repository section in the Oracle Database 2 Day + Performance Tuning Guide.
Check if any specific MDS SQL is taking too long.
Regather the Oracle Database statistics for each MDS schema by executing the GATHER_SCHEMA_STATS
procedure in the DBMS_STATS
PL/SQL package from SQL, as a privileged database user, such as SYS.
execute dbms_stats.gather_schema_stats(
ownname =>'schemaOwner',
options => 'Gather Auto');
Replace <schemaOwner> with the name of the schema, for example FUSION_MDS. Also, place the entire command in a single line at the time of execution.
Analyze the DMS data from DMSSpy.
If there is continuous growth in metadata in Oracle Database tables, it could be due to the purge not being executed or labels are preventing metadata from being purged.
Use the following queries to identify the cause of the problem:
Determine how many versions can be purged in partitions. In the following examples, :B1 is a bind variable.
Define the variable as the appropriate partition name. For example, Oracle ADF metadata is stored in the FAGlobal partition and Oracle SOA Suite metadata is stored in the soa_infra partition.
SELECT count( * ) FROM mds_paths path, mds_txn_locks, mds_partitions WHERE path_low_cn <= lock_txn_cn AND path_low_cn > 0 AND NOT EXISTS (SELECT label_cn from mds_labels WHERE path.path_low_cn <= label_cn AND (path.path_high_cn > label_cn OR path.path_high_cn IS NULL) AND label_partition_id = path.path_partition_id) AND path_high_cn IS NOT NULL AND path_partition_id = lock_partition_id and path_partition_id = partition_id AND partition_name =:B1
To determine how many document versions in the repository are held by labels:
select label_name, label_cn, (SELECT count( * ) FROM mds_paths path, mds_partitions WHERE path_high_cn IS NOT NULL and path_low_cn <= label_cn AND path_low_cn > 0 and path_high_cn > label_cn AND path_partition_id = partition_id and partition_name=:B1) versHeld, txn_time from mds_labels, mds_transactions, mds_partitions where label_partition_id=txn_partition_id and label_cn=txn_cn and label_partition_id=partition_id and partition_name=:B1 order by versHeld desc
To determine partition-wise statistics of tip and non-tip, purgeable versions:
select docs.*, labels.count_labels, can_be_purged, round(100*(can_be_purged/docs.total)) pct_can_be_purged from (select partition_name, count(*) total, sum(decode(PATH_HIGH_CN, null, 1, 0)) tip, sum(decode(PATH_HIGH_CN, null, 0, 1)) non_tip, round(100*(sum(decode(PATH_HIGH_CN, null, 0, 1))/count(*))) percent_non_tip from MDS_PATHS x, MDS_PARTITIONS y where x.PATH_PARTITION_ID = y.PARTITION_ID and path_type = 'DOCUMENT' group by partition_name) docs, (select PARTITION_name, count(label_name) count_labels from MDS_LABELS l, MDS_PARTITIONS p where p.partition_id = l.label_partition_id(+) group by PARTITION_name, partition_id) labels, (SELECT partition_name, count (*) can_be_purged FROM MDS_PATHS path, MDS_TXN_LOCKS, MDS_PARTITIONS p WHERE partition_id = path_partition_id and path_low_cn <= lock_txn_cn AND path_low_cn > 0 AND NOT EXISTS (SELECT label_cn from MDS_LABELS WHERE path.path_low_cn <= label_cn AND (path.path_high_cn > label_cn OR path.path_high_cn IS NULL) AND label_partition_id = path.path_partition_id) AND path_high_cn IS NOT NULL AND path_partition_id = lock_partition_id and path_type = 'DOCUMENT' GROUP BY partition_name ) can_purge WHERE docs.partition_name = labels.partition_name AND docs.partition_name = can_purge.partition_name(+) order by total
Execute the purgeMetadata
WLST command to clean up the content. In some cases, it is necessary to reclaim the space manually. See the Tuning the Database Repository section of the Tuning Performance.
If a large portion of non-tip versions are held by labels, consider removing those (older) labels using Fusion Middleware Control.
If a label on which a sandbox is based is deleted, the sandbox becomes unusable, so using the purgeMetadataLabels
WLST command can be risky. However, the Manage Labels page in Fusion Middleware Control automatically hides sandbox labels to avoid accidentally deleting sandbox labels. To delete a label that contains no sandboxes:
Expand the farm, then Metadata Repositories.
Select the repository.
On the repository home page, select a partition, and then click Manage Labels.
On the Manage Labels page, search for a label.
By default, labels associated with sandboxes and deployed applications are not shown. To display those labels, select Sandboxes or Deployment or both. Fusion Middleware Control will not let a label associated with a sandbox be deleted.
Select the label, and then click Delete Selected.
In the confirmation box, click OK.
This section offers tips and solutions for the following MDS error messages:
The following error code is seen in the diagnostic.log
file:
MDS-01273: The operation on the resource {0} failed because source metadata store mapped to the namespace {1} is read only.
For example:
ReadOnlyStoreException: MDS-01273: @ The operation on the resource /oracle/apps/cdm/foundation/parties/flex/orgContactNew/test.xsd failed because source @ metadata store mapped to the namespace / BASE DEFAULT is read only
Ensure that adf-config.xml
contains a mapping that covers the resource and is mapped to DBMetadataStore.
The diagnostic.log
file is stored in the following directories:
(UNIX) DOMAIN_HOME/servers/server_name/logs/server-name-diagnostic.log
This error occurs because the resource is not mapped in adf-config.xml
. When it is not mapped, it defaults to ClasspathStore
, which is read-only.
To resolve this problem, perform the following steps:
Check the persistence configuration in adf-config.xml
. Specifically, the repository pointing to the namespace should have its metadata-store
element with the class name attribute set to oracle.mds.persistence.stores.db.DBMetadataStore
. For example:
<mdsC:adf-mds-config>
<mds-config>
...
<persistence-config>
<metadata-namespaces>
<namespace path="/oracle/apps/cdm/foundation/parties/flex/orgContact" metadata-store-usage="globalStore-by-adfconfigfilter"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="globalStore-by-adfconfigfilter" default-cust-store="true" deploy-target="true">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="repository-name" value="mds-ApplicationMDSDB"/>
<property name="partition-name" value="FAGlobal"/>
<property name="jndi-datasource" value="jdbc/mds/mds-ApplicationMDSDBDS"/>
</metadata-store>
</metadata-store-usage>
....
</persistence-config>
</mds-config>
</mdsC:adf-mds-config>
Check if a namespace that includes the document is mapped to DBMetadataStore. For example, if MDS-01273 is reported for /oracle/apps/cdm/foundation/parties/flex/orgContactNew/test.xsd
, check that its package /oracle/apps/cdm/foundation/parties/flex/
or any parent package is mapped to DBMetadataStore in adf-config.xml
.
In the adf-config.xml
file or the customization document, ensure the read-only-mode
element is not set to true
. This can also be done in the System MBean Browser of Fusion Middleware Control:
In Fusion Middleware Control, from the navigation pane, navigate to the domain and select it.
From the WebLogic Domain menu, choose System MBean Browser.
Expand Application Defined MBeans, then oracle.adf.share.config, then Server: name, then Application: name, and then ADFConfig.
Check that the ReadOnly attribute is not set to true.
The following error code is seen in the diagnostic.log
file:
MDS-00013: no metadata found for metadata object "{0}"
For example:
oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/oracle/apps/cdm/foundation/parties/flex/orgContact/AtkHomePageWelcome" MDS-00201: PDocument not found in MetadataStore : [store-type=DefaultMetadataStore app-name=HomePageApp(V2.0) lookup-order=ServletContext,Classpath]
The diagnostic.log
file is stored in the following directories:
(UNIX) DOMAIN_HOME/servers/server_name/logs/server-name-diagnostic.log
To resolve this problem, perform the following steps:
The following error code is seen in the diagnostic.log
file:
MDS-01330: unable to load MDS configuration document
Typically, there will be nested exceptions that describe the actual reason for failure. For example:
MDSConfigurationException : parseADFConfigurationMDS-0133
Typically, this error occurs when the data source cannot connect to the database. For example, when the database is overloaded, Oracle WebLogic Server thinks it is inaccessible. For DB issues, check the DB alert logs.
This error can also occur when the repository is configured incorrectly or if the Oracle Database is down. For example:
MDSConfigurationException encountered in parseADFConfigurationMDS-01330: unable to load MDS configuration document MDS-01329: unable to load element "persistence-config" MDS-01370: MetadataStore configuration for metadata-store-usage "OWSM_TargetRepos" is invalid. MDS-01377: Unable to get database connection from data source configured with JNDI name "jdbc/mds/owsm". weblogic.common.resourcepool.ResourceDeadException: 0:weblogic.common.ResourceException: Could not create pool connection
The diagnostic.log
file is stored in the following directories:
(UNIX) DOMAIN_HOME/servers/server_name/logs/server-name-diagnostic.log
To resolve this problem, try one or both of the following options:
Test the data source to see if the database is currently accessible.
Capture an Automatic Workload Repository (AWR) report. Check if any specific SQL is taking too long. Analyze the log (if needed with oracle.mds logger set to FINER) or DMS data from DMSSpy.
See the Gathering Database Statistics Using the Automatic Workload Repository section in the Oracle Database 2 Day + Performance Tuning Guide
During runtime, an exception stack displays with a concurrent modification exception:
java.util.ConcurrentModificationException
This error occurs during runtime, when working with objects using JEDI or customizing using Page Composer. Essentially, the same document at the same layer is being customized by multiple users. You encounter the conflicts when changes are published.
Resolve the concurrency. See the CMR Extensibility Guide for information on resolving this issue.