Skip to Content
Author's profile photo Former Member

Finding (or any other class) on the PI Server

I have had a really hard time finding the jar file containing the interface

After googling for about 3 hours I finally decided to utilize Java itself to find this class.

After all it’s quite easy…

I was following the How To… Create Modules for the JEE Adapter Engine How-To Guide, so I already had some code running on PI…

All I had to do was add this code into the process method (after the audit variable had been initialized!):

public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
     try {
          Class c = Class.forName("");
          URL loc = c.getProtectionDomain().getCodeSource().getLocation();
          audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, c + " found at " + loc);
     } catch (Exception e) {
          audit.addAuditLogEntry(key, AuditLogStatus.ERROR, "Class not found");

Then I just ran the example and looked into the RWB Message-Monitoring to find the filesystem location where the class was located.

It turned out that was located at /usr/sap/<sid>/<instance>/j2ee/cluster/bin/core_lib/

From here on it’s just a simple step to a universal “Where-Is-My-Jarfile” Adapter Module, but that’s something I’ll leave to you 🙂

Greez, Markus

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Nice Info. Thanks Markus for sharing.


      Praveen Gujjeti