Show TOC Start of Content Area

Background documentation Troubleshooting: Finding Missing Parent-Child Relations  Locate the document in its SAP Library structure

Description

If a component uses a resource and does not have access to it due to a missing parent-child relation, NoClassDefFoundError exception is thrown. Typically, the exception is located in the defaultTrace.trc file of the AS Java. NoClassDefFoundError is followed by the name of the class that was not found and by the dump of the class loader that was not able to find the resource. In the dump, you can find the parent-child relations of this class loader.

 

Syntax

{0}#1#java.lang.NoClassDefFoundError:com/sap/jmx/provider/Provider

---------------------- Loader Info -----------------------

ClassLoader name: [sap.com/tc~lm~webadmin~sysconfig~app]

 Parent loader name: [system:Frame]

 References:

   service:servlet_jsp

   service:ejb

   service:jmsconnector

   library:jsse

   library:tc~lm~webadmin~sysconfig~lib

 Resources: 

C:\\usr\\sap\\W43\\JC00\\j2ee\\cluster\\apps\\sap.com\\tc~lm~webadmin~sysconfig~app\\servlet_jsp\\sysconfig\\root\\WEB-INF\\classes  

C:\\usr\\sap\\W43\\JC00\\j2ee\\cluster\\apps\\sap.com\\tc~lm~webadmin~sysconfig~app\\servlet_jsp\\sysconfig\\work

 

 

Solution

You can use all shell commands in this section through Telnet.

More information: Administration Using Telnet.

      To output detailed information about the class loader including its resources and parent-child relations, use

llr <loadername>

      To view all resources that contain the required class, use

llr –all –f <class name>

      To access an additional set of Telnet commands, use

add deploy

      To find the chain of parent-child relations that allow the component to obtain access to this resource, use one of the following options:

       To show all applications on the server and if they are started or not, use.

list_app

       To show  the resources of all applications, use

list_app_res

       To show only the resources of the specified application, use

list_app_res <applicationname>

       To show all loaders, use

ll

The options –a, -s, -l, -i are filtering options. For more information, use

man ll

       To show all parent-child relations of all loaders, use

ll -r

      To implement the chain of parent-child relations in the deployment descriptor of the component, use either application-j2ee-engine.xml (for applications) or provider.xml (for libraries and services).

      To test the newly created parent-child relation by

       Searching for the specified class with the specified loader, use

llr <loader name> -f <classname>

       Loading the specified class with the specified loader, use

llr <loader name> -l <classname>

      To show the graph of the application parent-child relations, use

app_refs_graph

Note

The format for the class name is: com/sap/…/<classname>.class.

 

End of Content Area