Question

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.

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***

Correct Answer
September 18, 2019 - 12:36pm

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/

Comments

Keep up to date on this post and subscribe to comments

September 12, 2019 - 4:09pm

Hello WilhelmM,

Based on your current analysis, this issue would be better handled through a GCS Service Request.  Please be sure to include a link to this article when creating your request.  Please also update this article with the SR number once this has been submitted.

Regards,

September 13, 2019 - 12:18pm

Hello Michael,

thanks for responding.

We do not have any projects setup in the GCS Support Portal, as this is part of a demo application from my company. A SR requires to specify a project, so I cannot create one right know, but will check back with our account manager.

Regards,

September 17, 2019 - 3:08am
Response to WilhelmM

Looks like taxonomy CSV is corrupted. I will ask some questions for diagonistic purpose - 

  1. Did you add keyword based topics to taxonomy via 
    1. Channels and Interfaces
    2. Prediction Studio
  2. Is the taxonomy being updated or corrupt?
    1. Go to Prediction Studio, locate taxonomy and discard any ongoing updates
  3. Open text analyzer and go to taxonomy. Is CSV present? What happens when you download?

September 18, 2019 - 12:47pm
Response to Vikas@Multichannel

Yes I checked the Text Analyzer, the Decision Data Rule Rules and the taxonomy file.

I realized that the Taxonomy file was always named Template.xlsx, regardles how I named the WebChat Channel.

The Taxonomy file should be normally named, as far as I'm concerned, with the same name as the channel.

I commente our solution for this already below.

There was an incompatibility issue between java 8 and java 11, which let to the InvokeTargetException. As the process stopped immediately it is obiously why the taxonomy was not created properly.

September 18, 2019 - 12:36pm

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/