My Oracle Support Banner

Unexpected Annotatedclassnotfoundexception When Loading Metric Collector Class (Doc ID 376530.1)

Last updated on OCTOBER 11, 2019

Applies to:

Oracle Containers for J2EE - Version 10.1.3.0.0 and later
Information in this document applies to any platform.

Symptoms

You have implemented a custom metric collector for the Oracle Containers For J2EE (OC4J) component of
Oracle Application Server 10g version 10.1.3.0.0

You have:

You may have also tried adding the JAR file location as a "code-source" for a <shared-library> definition in sever.xml:

<shared-library name="my.custom.metric" version="1.0">
   <code-source path="/path/to/MyCustomDMSMetric.jar"/>
</shared-library>

and added an "import" for the shared library in the <imported-shared-libraries> section of system-application.xml:

<imported-shared-libraries>
   <import-shared-library name="oracle.dms"/>
   <import-shared-library name="oracle.jdbc"/>
         :
   <import-shared-library name="my.custom.metric"/>
</imported-shared-libraries>


However, at startup time you receive an AnnotatedClassNotFoundException exception, similar to the following:

oracle.classloader.util.AnnotatedClassNotFoundException:

Missing class: my.package.MyMetricCollector

Dependent class: com.evermind.server.OC4JMonitorThread
         Loader: oc4j:10.1.3
    Code-Source: /u01/app/oracle/mid1013a/j2ee/home/lib/oc4j-internal.jar
  Configuration: <code-source> in META-INF/boot.xml in
                 u01/app/oracle/mid1013a/j2ee/home/oc4j.jar

This load was initiated at oc4j:10.1.3 using the Class.forName() method.

The missing class is available from the following locations:

1. Code-Source: /path/to/MyCustomDMSMetric.jar
   (from <code-source> in /u01/app/oracle/mid1013a/j2ee/home/config/server.xml)
   This code-source is available in loader my.custom.metric:1.0.
   This shared-library can be made visible to the "oc4j" loader by modifying
   the boot descriptor.

Changes

It is possible that you encounter this issue while migrating an application from Oracle Application Server 10.1.2 to the 10.1.3.0.0 release.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.