JavaActionEvent failed: PxEnvironmentException: class cannot be found in classpath

Document ID : KB000075516
Last Modified Date : 19/04/2018
Show Technical Document Details
We are trying to execute a java file which is placed in a jar file by calling it from an action of a policy Xpress. We are getting the below error. Complete log for this task is attached to the case. Please let us know if the jar should be added to any configuration file/placed in a particular location. The jar is currently placed in the following locations /amp/apps/wsidm00/wsidm-c01/installedApps/wsidm-c01/iam_im.ear/user_console.war/WEB-INF/lib and /amp/apps/wsidm00/wsidm-c01/installedApps/wsidm-c01/iam_im.ear/custom/isim/ Class cannot be found in classpath at at at com.netegrity.ims.businessprocess.IMSEventController.executing( at com.netegrity.ims.businessprocess.IMSController.executing( at com.netegrity.ims.bootstrap.IMSMessageListener.processEventToNextSavePoint( at com.netegrity.ims.bootstrap.IMSMessageListener.processToEndState( at com.netegrity.ims.bootstrap.IMSMessageListener.onMessage( at com.netegrity.ejb.message.subscriber.SubscriberMessageBean.onMessage( at at at at com.sun.proxy.$Proxy63.onMessage(Unknown Source) at at at$ at at$ Caused by: java.lang.ClassNotFoundException: at java.lang.Class.forNameImpl(Native Method) at java.lang.Class.forName( at ... 16 more [3/21/18 11:48:37:772 GMT] 000006c1 SystemOut O 11:48:37,772 ERROR [com.netegrity.ims.exception.EventExecuteStateException] Execution of event: JavaActionEvent failed. Exception encountered: PxEnvironmentException:Class cannot be found in classpath Error from IDM user console: Failed to execute JavaActionEvent. ERROR MESSAGE: PxEnvironmentException:Class com.ameriprise.isimtest.TestISIMWS cannot be found in classpath
To load a custom jar in the classpath is a bit difficult. The log snipet that you have given from WAS does not show the server preamble where the base classpath would be shown. There is nothing in our docs for adding a custom jar file to be accessed in policy express, so you would have to add the class to the WAS classpath then access it from the base WAS. We were able to call the java class file by updating the file location in application server's classpath.