Support Article
Connect-Java JAR files not found, runtime exception
SA-35880
Summary
During run time, external Java classes are not available and an error is thrown.
Error Messages
com.pega.pegarules.pub.clipboard.PRObjectWrapperException: Unexpected exception caught trying to generate wrapper class 'com.ace.pogo.workforce.types.prpcwrapper.GetWorkforcememberResponse, com.pega.pegarules.pub.PRRuntimeException: Compilation failed. See file://runtime:/PRGenJava//objwrapper_1489164361986000.log for details.
Steps to Reproduce
1. Log in to Pega 7.2.2.
2. Allow an activity to call an external class from the JAR file at run time.
3. Observe the error indicating that the class files cannot be found.
Root Cause
A defect or configuration issue in the operating environment
An external class is not available during run time.
Resolution
Perform the following local-change:
- Add the JAR file or Java class file to the run-time classpath.
- Verify that the Java class or JAR file is located in Process Commander's classloader hierarchy:
Do this using SMA, Advanced > ETier Runtime Environment > Search for class and check if it is available. - In Process Commander, from the Rules by Type explorer, click SysAdmin > Dynamic System Settings.
- Select either the compiler/defaultClasses setting or the compiler/defaultPaths setting, as appropriate.
- If you are using the compiler/defaultClasses setting, enter the fully qualified Java class name.
- If you are using the compiler/defaultPaths setting, enter the full path to and the name of the JAR file or the path to and directory name of the unarchived Java classes.
- In either case, use semicolons (;) to separate entries from each other in the Value field.
- Semicolons (;) are used as the delimiter only. Hence, an ending semicolon is not required and changes will not work if you add the classpath entries with ending semicolon.
- If you use compiler/defaultPaths, a value should be file:/opt/dirContainingJar/...
- Save the settings.
- In the System Management Application (SMA), select Advanced > Class Management.
- Click Refresh External Jars to add the class or JAR file to the compile-time classpath.
If it is already included, it will not get added again. - Restart the server.
- Test the activity again and confirm there are no error messages getting thrown.
Published April 28, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.