Trying to compile but get JAVA compilation errors because of _

0
compile: [javac] Compiling 139 source files to C:\....main\deployment\run\bin [javac] C:\....main\javasource\restservices\publish\RestServiceHandler.java:250: 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:\....main\javasource\mxmodelreflection\actions\ValidateTokensInMessage.java:43: error: cannot find symbol [javac] return TokenReplacer.validateTokens(this.getContext(), this.Text, __TokenList); [javac] ^ [javac] symbol: variable Text [javac] Note: C:\....main\javasource\restservices\util\JCIFS_NTLMScheme.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: C:\....main\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 Anyone have an idea how to fix this??
asked
2 answers
5

The first line about '_' is just a compile warning that only shows up if there are also errors. Most often it's only the actual error you should look at.

In your error it mentions that it cannot find 'Text' in the parameters. The action you are getting this comes from the appstore (model reflection) and doesn't have compile errors in it. The only thing that I can think of is that the modeler renamed the input parameter in the Java code.

To prevent name classes the modeler automatically renames input parameters if there is an entity or enum with the same name. I would assume that you have an entity called 'Text' somewhere in your project. If you would rename that entity it solves the compile error.

answered
0

Did you clean your project deployment directory? Did you check for any errors in eclipse after deploying your project for eclipse? Did your modeler select the correct java version? https://world.mendix.com/display/refguide6/System+Requirements

answered