SFTPConnection module java errors

0
Hello Added the SFTPConnection module but am getting the following java errors when compiling...anyone got any ideas?   Buildfile: C:\MENDIX PROJECTS\HRConnect-main_2\deployment\build_core.xml compile:     [javac] Compiling 20 source files to C:\MENDIX PROJECTS\HRConnect-main_2\deployment\run\bin     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:74: error: cannot find symbol     [javac]         char pass[] = this.PrivateKey.getPassPhrase_Plain().toCharArray();     [javac]                           ^     [javac]   symbol: variable PrivateKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:75: error: cannot find symbol     [javac]         PGPKeyRingGenerator krgen = generateKeyRingGenerator(this.PrivateKey.getEmailAddress(), pass);     [javac]                                                                  ^     [javac]   symbol: variable PrivateKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:91: error: cannot find symbol     [javac]         Core.storeFileDocumentContent(getContext(), this.PublicKey.getMendixObject(), pubFilename, new FileInputStream(tempASC));     [javac]                                                         ^     [javac]   symbol: variable PublicKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:109: error: cannot find symbol     [javac]         Core.storeFileDocumentContent(getContext(), this.PrivateKey.getMendixObject(), skrFilename, new FileInputStream(tempSKR));     [javac]                                                         ^     [javac]   symbol: variable PrivateKey     [javac] 4 errors BUILD FAILED C:\MENDIX PROJECTS\HRConnect-main_2\deployment\build_core.xml:25: Compile failed; see the compiler error output for details. Total time: 1 second     After I add the SFTP module into a new fresh empty project using modeller 6.8.1 it works fine (I can run it locally). When I export that package and load it into 7.4 or 7.5 of the modeller I get the java errors. My application works fine without this module...here is the latest java error   Buildfile: C:\MENDIX PROJECTS\HRConnect-main_2\deployment\build_core.xml compile:     [javac] Compiling 23 source files to C:\MENDIX PROJECTS\HRConnect-main_2\deployment\run\bin     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\sftpconnection\actions\DisconnectIdleSessions.java:13: error: package com.mendix.core.session does not exist     [javac] import com.mendix.core.session.UserSession;     [javac]                               ^     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\sftpconnection\helpers\HandleFileSftp.java:41: error: package com.mendix.core.session does not exist     [javac] import com.mendix.core.session.UserSession;     [javac]                               ^     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:74: error: cannot find symbol     [javac]   char pass[] = this.PrivateKey.getPassPhrase_Plain().toCharArray();     [javac]                     ^     [javac]   symbol: variable PrivateKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:75: error: cannot find symbol     [javac]   PGPKeyRingGenerator krgen = generateKeyRingGenerator(this.PrivateKey.getEmailAddress(), pass);     [javac]                                                            ^     [javac]   symbol: variable PrivateKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:91: error: cannot find symbol     [javac]   Core.storeFileDocumentContent(getContext(), this.PublicKey.getMendixObject(), pubFilename, new FileInputStream(tempASC));     [javac]                                                   ^     [javac]   symbol: variable PublicKey     [javac] C:\MENDIX PROJECTS\HRConnect-main_2\javasource\encryption\actions\GeneratePGPKeyRing.java:109: error: cannot find symbol     [javac]   Core.storeFileDocumentContent(getContext(), this.PrivateKey.getMendixObject(), skrFilename, new FileInputStream(tempSKR));     [javac]                                                   ^     [javac]   symbol: variable PrivateKey     [javac] 6 errors   BUILD FAILED C:\MENDIX PROJECTS\HRConnect-main_2\deployment\build_core.xml:25: Compile failed; see the compiler error output for details. Total time: 1 second  
asked
2 answers
0

Looking at the location of the errors (/javasource/encryption), this is not about the SFTP module, but about the encryption module. I believe the SFTPModule does not depend on the encyption module.

 

I would suggest updating the encryption module, although I don't see a version specifically for Mendix 7. Alternatively, since it seems both modules contain an entity called PrivateKey, you could check if the encryption module points to the right entity.

 

Update

I see that there are errors in the SFTPConnection module. These errors occur when trying to import Java classes which are actually unnecessary. You can safely remove the line

import com.mendix.core.session.UserSession;

from both DisconnectIdleSessions.java and HandleFileSftp.java files.

answered
0

I encounter this issue today, after including the sftp module into a 6.10.11, I have updated the encryption module also...anyone an idea?

answered