Compilation of Java actions failed warning popped while compiling after adding PushNotifications & Encryption modules to my project on Studio Pro 8.10

0
I’m getting the following warning which is blocking the app to run on my local environment. I’m trying to add PushNotifications to my app for which Encryption module was added from app store but unable to proceed due to this error. Log: Buildfile: Y:\Documents\Mendix\Timer-main\deployment\build_core.xml compile:     [javac] Compiling 52 source files to Y:\Documents\Mendix\Timer-main\deployment\run\bin     [javac] Y:\Documents\Mendix\Timer-main\javasource\encryption\actions\ValidatePrivateKeyRing.java:39: error: incompatible types: InputStream cannot be converted to Map     [javac]         new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(Core.getFileDocumentContent(getContext(), this.PrivateKeyRing.getMendixObject()) ), new BcKeyFingerprintCalculator());     [javac]                                                                ^     [javac] Y:\Documents\Mendix\Timer-main\javasource\encryption\pgp\PGPUtils.java:75: error: incompatible types: InputStream cannot be converted to Map     [javac]         PGPPublicKeyRingCollection keyRingCollection = new PGPPublicKeyRingCollection(PGPUtil.getDecoderStream(in), new BcKeyFingerprintCalculator());     [javac]                                                                                                               ^     [javac] Y:\Documents\Mendix\Timer-main\javasource\encryption\pgp\PGPUtils.java:114: error: incompatible types: InputStream cannot be converted to Map     [javac]         PGPSecretKeyRingCollection keyRingCollection = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(in), new BcKeyFingerprintCalculator());     [javac]                                                                                                               ^     [javac] Y:\Documents\Mendix\Timer-main\javasource\encryption\pgp\PGPUtils.java:166: error: incompatible types: InputStream cannot be converted to Map     [javac]         PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(keyIn), new BcKeyFingerprintCalculator());     [javac]                                                                                                    ^     [javac] Y:\Documents\Mendix\Timer-main\javasource\encryption\pgp\PGPUtils.java:420: error: incompatible types: InputStream cannot be converted to Map     [javac]         PGPPublicKeyRingCollection pgpRing = new PGPPublicKeyRingCollection(PGPUtil.getDecoderStream(keyIn), new BcKeyFingerprintCalculator());     [javac]                                                                                                     ^     [javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output     [javac] 5 errors BUILD FAILED Y:\Documents\Mendix\Timer-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 4 seconds
asked
3 answers
9

Hi Ankur,

The PushNotifications installs a jar file that is incompatible with the Encryption module.

This seems to fix it:

  • go to the userlib folder and remove bcpg-jdk15on-150.jar.
  • Then, go back to the modeler, synchronize the project directory (F4), clean deployment directory (just in case) and run again.

 

Ideally, Mendix should update the PushNotification module to include the bcpg-jdk15on-164.jar, you could file a ticket for that I guess.

 

Hope this helps,

Jeroen

answered
1

What other modules do you have installed from the App Store?

It looks like you may have two different versions of the bouncycastle libraries in your userlib (these are the .jar files with filenames that start with bcp) and they aren’t compatible.
 

If you do have multiple versions, one way to try to fix this is to wipe the contents of the userlib and then reinstall every module you’ve downloaded from the app store. This will hopefully ensure older versions are removed as long as the modules you’re using don’t reinstall incompatible versions.

Hope this helps

answered
0

I added CommunityCommons module along with PushNotifications & Encryption modules. Tried removing all three and downloading again but no luck!

answered