Wednesday, July 13, 2011

How to fix "java.lang.NoClassDefFoundError: oracle/jrf/PortabilityLayerException" ?

In EMGC 11 env., while monitoring FMW targets if you encounter following Error in emagent log:
2011-07-11 02:08:37,133 [nmefmgr_getJNIFetchlet] ERROR fetchlets.FabricFetchletWrapper logp.251 - Invocation Error in Fabric Fetchlet wrapper:
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at oracle.sysman.emd.fetchlets.FabricFetchletWrapper.getMetric(FabricFetchletWrapper.java:109)
  at oracle.sysman.emd.fetchlets.FetchletWrapper.getMetric(FetchletWrapper.java:382)
...
Caused by: java.lang.NoClassDefFoundError: oracle/jrf/PortabilityLayerException
  at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupBean(EJBLocatorImpl.java:741)
  at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupFinderBean(EJBLocatorImpl.java:728)
  at oracle.soa.management.internal.ejb.EJBLocatorImpl.<init>(EJBLocatorImpl.java:165)
  at oracle.soa.management.facade.LocatorFactory.createLocator(LocatorFactory.java:35)
  at oracle.sysman.emd.fetchlets.FabricFetchlet.getLocator(FabricFetchlet.java:813)
  at oracle.sysman.emd.fetchlets.FabricFetchlet.getMetric(FabricFetchlet.java:194)
  ... 6 more
Caused by: java.lang.ClassNotFoundException: oracle.jrf.PortabilityLayerException
  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
  at oracle.sysman.emd.fetchlets.thirdparty.TPJMXFetchletClassLoader.loadClass(TPJMXFetchletClassLoader.java:78)
..
Reason: This error is appearing as emagent requires "jrf-api.jar" to be present in its CLASSPATH.

A simple workaround to fix the issue is:
1. Stop the agent
2. Add following jarfile to CLASSPATH property in emd.properties of emagent
$MW_HOME/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar
where MW_HOME is the Middleware Home of FMW target .
3. Restart the agent.

4 comments:

Anonymous said...

thank you so much. Very helpful.

Suman said...

Thanks much. Saved my day.

udaykiran pulipati said...

Download here

http://prefiles.com/9lc6dwozx1hr/jrf-api-11.1.1.4.0.jar

Anonymous said...

Thank you. :-)