InvocationTargetException by adding a new "create case command" in webchat channel
When I add a new create case comment to my WebChat channel, the modal dialog is not closing after submit click, and I get the following error on the clipboard page EditCommand:
The Flow Action post-processing activity pzAddCommand failed: java.lang.InternalError: java.lang.reflect.InvocationTargetException
There are no error in the logs.
When I add a new create case comment to my WebChat channel, the modal dialog is not closing after submit click, and I get the following error on the clipboard page EditCommand:
The Flow Action post-processing activity pzAddCommand failed: java.lang.InternalError: java.lang.reflect.InvocationTargetException
There are no error in the logs.
By tracing the whole process I found out that the root cause could be a java step in the activity pyUpdateTaxonomyFromClipboard (Ruleset Pega-NLP:08-01-01) which is not completed properly. The activity ends during execution of the java step 6.
Step 6 is a java step with the following code:
byte[] excelSource = com.pega.nlp.textanalytics.taxonomy.TaxonomyUtil.getTaxonomyFromCilpboard(tools);
try{
fileSource = Base64Util.encodeToString(excelSource);
}catch(Exception e){
throw new PRRuntimeException(e);
}
I have added oLog.infoForce steps before and after the method call:
com.pega.nlp.textanalytics.taxonomy.TaxonomyUtil.getTaxonomyFromCilpboard(tools);
There is no log written after the getTaxonomyFromCilpboard function call.
Seems some unexpected error is thrown within the method but I can not dig deeper into it.
Does anyone know what exactly com.pega.nlp.textanalytics.taxonomy.TaxonomyUtil.getTaxonomyFromCilpboard(tools) is doing? and how to investigate further?
About my environment:
Pega Version: 8.1.3
App Server: Tomcat 9
Running in a docker container using the pegasystems image https://github.com/pegasystems/docker-pega-web-ready
Database: Postgres 9.6
The framework is not really necessary as I'm getting this error also in new applications which are not suing any framework at all.
Anyway, on this environemnt we have imported two Frameworks Pega Sales Automation for Insurance and Customer Service for Insurance version 8.1.
***Edited by Moderator: Lochan to update platform capability tags***
We managed it to solve the issue by going back to Java 8.
As previously mentioned we used the latest https://hub.docker.com/r/pegasystems/pega-ready docker configuration which uses openjdk 11.
How we solved it:
Our own dockerfile is based on the pega-ready:latest container configuration.
Additionally to our configurations we have now remove the openjdk 11 Java Version which gets installed with the pega-ready configuration and imported openjdk 8. Also we have changed the JAVA_HOME path to the new openjdk 8 location.
The issue disappeared.
This was really the only change we have done. As soon we run the container with the Java 11 version we get again an InvokeTargetException by adding case types to a WebChat channel.
Additional configuration in our Dockerfile:
# Install OpenJDK-8
RUN apt-get update && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y ant && \
apt-get clean;
# Fix certificate issues
RUN apt-get update && \
apt-get install ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f;
# Setup JAVA_HOME -- useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
We managed it to solve the issue by going back to Java 8.
As previously mentioned we used the latest https://hub.docker.com/r/pegasystems/pega-ready docker configuration which uses openjdk 11.
How we solved it:
Our own dockerfile is based on the pega-ready:latest container configuration.
Additionally to our configurations we have now remove the openjdk 11 Java Version which gets installed with the pega-ready configuration and imported openjdk 8. Also we have changed the JAVA_HOME path to the new openjdk 8 location.
The issue disappeared.
This was really the only change we have done. As soon we run the container with the Java 11 version we get again an InvokeTargetException by adding case types to a WebChat channel.
Additional configuration in our Dockerfile:
# Install OpenJDK-8
RUN apt-get update && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y ant && \
apt-get clean;
# Fix certificate issues
RUN apt-get update && \
apt-get install ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f;
# Setup JAVA_HOME -- useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
# Remove default java version
RUN rm -rf /opt/java/openjdk/