Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

External jar file is not recongnized in Library- throwing error.

SA-1264
SUMMARY

Imported the external jar file through PRPC import tool in developer portal but while compiling the Rule-Utility-Library rule with the included the package, the following error is encountered –

pyLibraryName: The Library failed to compile
General Error: Error(s) detected while generating java. Compiler reported: ----------
1. ERROR in com/pegarules/generated/test.java (at line 48)
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
^^^^^^^^^^^^^^^^^^^^
The import com.crystaldecisions cannot be resolved
----------
2. ERROR in com/pegarules/generated/test.java (at line 49)
import com.crystaldecisions.sdk.exception.SDKServerException;
^^^^^^^^^^^^^^^^^^^^
The import com.crystaldecisions cannot be resolved
----------
3. ERROR in com/pegarules/generated/test.java (at line 50)
import com.company.*;
^^^^^^^^^^^^^^^^^
The import com.company cannot be resolved
----------
3 problems (3 errors)

ERROR MESSAGES

ON SCREEN:

pyLibraryName: The Library failed to compile
General Error: Error(s) detected while generating java. Compiler reported: ----------
1. ERROR in com/pegarules/generated/test.java (at line 48)
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
^^^^^^^^^^^^^^^^^^^^
The import com.crystaldecisions cannot be resolved
----------
2. ERROR in com/pegarules/generated/test.java (at line 49)
import com.crystaldecisions.sdk.exception.SDKServerException;
^^^^^^^^^^^^^^^^^^^^
The import com.crystaldecisions cannot be resolved
----------
3. ERROR in com/pegarules/generated/test.java (at line 50)
import com.company.*;
^^^^^^^^^^^^^^^^^
The import com.company cannot be resolved
----------
3 problems (3 errors)

PRPC ERROR:
2014-09-04 16:13:26,701 [ PegaRULES-Batch-5] [ STANDARD] [ Beacon:01.05.01] (ga_importexport_pximportexport) ERROR - ImportArchive: Encountered the following error: Unable to establish connection to database - See System.err for detail.
java.lang.RuntimeException: Unable to establish connection to database - See System.err for detail.
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.<init>(JarLoaderTool.java:478)
at com.pega.pegarules.deploy.internal.archive.JavaArchiveImpl.doImport(JavaArchiveImpl.java:220)
at com.pegarules.generated.pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.pxImportArchive06_02_01(pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.java:140)
at com.pegarules.generated.pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.invoke(pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.java:82)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:131)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:108)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:7895)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_importexport_pximportexport.pxImportArchive(pega_importexport_pximportexport.java:258)
at com.pegarules.generated.activity.ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.step7_circum0(ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.java:802)
at com.pegarules.generated.activity.ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.perform(ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.java:193)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3019)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivities(ThreadRunner.java:545)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivities(PRThreadImpl.java:573)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.executeBatchTask(QueueProcessor.java:253)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:316)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:784)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1055)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:760)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:550)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:991)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:532)
at java.lang.Thread.run(Thread.java:796)




System.err:

[9/4/14 15:55:59:533 EDT] 000000ed SystemErr R Database not configured or usable for storing classes.
[9/4/14 16:13:26:697 EDT] 000000f1 SystemErr R No patch date specified, using current date: 2014-09-04 16.13 EDT
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R java.sql.SQLException: No datasource available
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.internal.bootstrap.phase2.jdbc.JdbcJarWriter$WriteConnection.getConnection(JdbcJarWriter.java:851)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.internal.bootstrap.phase2.jdbc.JdbcJarWriter.<init>(JdbcJarWriter.java:766)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.initDBConnection(JarLoaderTool.java:1853)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.<init>(JarLoaderTool.java:477)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.deploy.internal.archive.JavaArchiveImpl.doImport(JavaArchiveImpl.java:220)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pegarules.generated.pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.pxImportArchive06_02_01(pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.java:140)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pegarules.generated.pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.invoke(pxImportArchive_060201_OJxD6VU15TYjlV46nBfmsw.java:82)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:131)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:108)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:7895)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pegarules.generated.pega_importexport_pximportexport.pxImportArchive(pega_importexport_pximportexport.java:258)
[9/4/14 16:13:26:700 EDT] 000000f1 SystemErr R at com.pegarules.generated.activity.ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.step7_circum0(ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.java:802)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pegarules.generated.activity.ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.perform(ra_action_pegarulesmove_zip_to_db_e4924d20b1810d077ea3a44a2411c7cb.java:193)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3019)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivities(ThreadRunner.java:545)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivities(PRThreadImpl.java:573)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.async.agent.QueueProcessor.executeBatchTask(QueueProcessor.java:253)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:316)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:784)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1055)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:760)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:550)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:991)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:532)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R at java.lang.Thread.run(Thread.java:796)
[9/4/14 16:13:26:701 EDT] 000000f1 SystemErr R Database not configured or usable for storing classes.




STEPS TO REPRODUCE

Import third-party jar file and create a library in PRPC.

ROOT CAUSE

In a multinode PRPC environment any client code performing a PegaRULES datasource lookup across JVMs should use the JNDI name “jdbc/PegaRULES” instead of “java:comp/env/jdbc/PegaRULES”. 

RESOLUTION

Extract the prpc_j2ee14_ws.ear available from the distribution and rebuild new EAR by making the changes as described below to bootstrap & prconfig settings.

Change the following setting in prbootstrap.properties
From:
# The jndi name of the datasource to be used for loading classes
com.pega.pegarules.bootstrap.allclasses.datasource=java:comp/env/jdbc/PegaRULES

Change to:
# The jndi name of the datasource to be used for loading classes
com.pega.pegarules.bootstrap.allclasses.datasource=jdbc/PegaRULES

Change the following setting in prconfig.xml

From:
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
Change to:
<env name="database/databases/PegaRULES/dataSource" value="jdbc/PegaRULES"/>

Please use newly created EAR file for the deployment as below:

1. Stop the prpc_j2ee14_ws
2. Uninstall prpc_j2ee14_ws deployment form WebSphere and save the changes.
3. Stop Websphere app server and start back it back again once it’s fully stopped.
4. Install prpc_j2ee14_ws using newly built EAR file and start it upon saving changed successful deployment.
5. Check PRPC logs and WebSphere logs.
6. Confirm from SMA->Administration-> Configuration Management that changes made to bootstrap & prconfig were picked up fine upon restart.


 
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us