Email Template module issue

0
Hi guys, I've used the Email Template module before and again followed the same steps to integrate it in my new project. However, this time, upon Running Locally I get the following Java Compile Errors:   Buildfile: C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\deployment\build_core.xml compile:     [javac] Compiling 45 source files to C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\deployment\run\bin     [javac] C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\javasource\emailtemplate\actions\SendEmail.java:159: error: cannot find symbol     [javac]             throw new CoreException("Unable to convert the Html body to plain text for email: " + this.Subject + " to: " + this.ToAddresses, e);     [javac]                                                                                                       ^     [javac]   symbol: variable Subject     [javac] C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\javasource\emailtemplate\actions\SendEmail.java:163: error: cannot find symbol     [javac]             EmailModule.mail(config, this.HtmlBody, this.PlainBody, this.Subject, toList, ccList, bccList, this.getContext(), this.__AttachmentList, headerMap);     [javac]                                                                         ^     [javac]   symbol: variable Subject     [javac] C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\javasource\emailtemplate\actions\SendEmail.java:166: error: cannot find symbol     [javac]             this._logNode.info("Did not send email '"+this.Subject + "' to '"+ this.ToAddresses + "' since the 'EmailTemplate.SendingEnabled' constant is not enabled.");      [javac]                                                           ^     [javac]   symbol: variable Subject     [javac] 3 errors BUILD FAILED C:\Users\rcojocaru\Documents\Mendix\CheatSheet-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 3 seconds   Can you please help me understand what's going on? I do not have any Java experience at all, but if guided can understand the code. Many thanks, Razvan
asked
1 answers
0

Hello Razvan, 

I would suggest debugging this in eclipse - it's very likely that you have two app store modules that have added different versions of the same jar. On build Mendix loads the jars ascending in order of name which leads to the older jars taking precedence in the build order. 

If this is not the case you can still correct the error manually in eclipse. 

You'll need to do the following: 

1) Install eclipse

2) Open eclipse and navigate to File>Import 

3) Select "Existing projects from workspace"

4) Navigate to your mendix app folder as your root directory

5) Import the project

Under your project you can now navigate to javasource and with a refresh there you should see clearly the origin of the error. 

To find the libraries loaded navigate to Project>Properties>Java Build Path

Hope you find this helpful

answered