Unexpected Java Compile Error while trying to run locally

0
Hi When I tried to run locally I get this java compile error, according to the error output I need to recompile but no idea how to do this; Buildfile: C:\Users\SK\Desktop\abcd\deployment\build_core.xml compile: [javac] Compiling 219 source files to C:\Users\SK\Desktop\abcd\deployment\run\bin [javac] C:\Users\SK\Desktop\abcd-main\javasource\investmentsandloans\helpers\InvestmentHelpers.java:268: error: no suitable method found for setProgress_AmountInvestedPC(Long) [javac] totals.setProgress_AmountInvestedPC(Long.valueOf(pcint)); [javac] ^ [javac] method LoanTotals.setProgress_AmountInvestedPC(IContext,String) is not applicable [javac] (actual and formal argument lists differ in length) [javac] method LoanTotals.setProgress_AmountInvestedPC(String) is not applicable [javac] (actual argument Long cannot be converted to String by method invocation conversion) [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 1 error BUILD FAILED C:\Users\SK\Desktop\abcd\deployment\build_core.xml:27: Compile failed; see the compiler error output for details. Total time: 5 seconds
asked
4 answers
3

In 90% of my cases local deployment errors are solved by cleaning the deployment directory (Modeler --> Project --> Clean Deployment Directory)

answered
0

Clean deployment directory and run again. If the error persists, check this code is still used. The helpers directory is ofter created manually by developers. Otherwise migrate the code to your version of mendix

answered
0

The error says that there are two overloads of the method setProgress_AmountInvestedPC: one of them accepts an IContext and a String and the other accepts a String and nothing else.

The call is supplying a long integer to the method and that is not accepted. Did you mean to pass the string pcint instead? Like this:

totals.setProgress_AmountInvestedPC(pcint);
answered
0

cleaning deployment directory and deleting the system file out of javasource did not work. I will peruse through other forum posts. For now, thanks guys! --------------------------------------->my error----> Buildfile: C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\deployment\buildcore.xml

compile: [javac] Compiling 497 source files to C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\deployment\run\bin [javac] C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\javasource\restservices\publish\RestServiceHandler.java:251: warning: '' used as an identifier [javac] String _) { [javac] ^ [javac] (use of '' as an identifier might not be supported in releases after Java SE 8) [javac] C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\javasource\mxmodelreflection\actions\ReplaceToken.java:41: error: cannot find symbol [javac] return TokenReplacer.replaceToken(this.getContext(), this.Text, this.TokenObject, this.ValueObject); [javac] ^ [javac] symbol: variable Text [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\javasource\com\mendix\core\Core.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 1 error [javac] 1 warning

BUILD FAILED C:\Users\msc\Dropbox (Mendix)\Private Folder\Windows Folders (Synced)\My Documents\Test Projects - mpk\Large LossLV\deployment\buildcore.xml:27: Compile failed; see the compiler error output for details.

answered