Issue
When using 'String' as an entity name, Studio Pro throws the below Java compilation error:
C:\Users\<UserName>\Documents\Mendix\<Project name>\javasource\myfirstmodule\proxies\classname.java:29: error: cannot find symbol
[javac]throw new java.lang.IllegalArgumentException(String.format("The given object is not a %s", entityName));
[javac] ^
[javac]symbol: method format(java.lang.String,java.lang.String)
[javac]location: class myfirstmodule.proxies.StringEnvironment
Studio Pro version 8.1.0 to 9.14.2
Cause
This issue is caused when an entity is named 'String' inside the Domain model, as it is a reserved word. In Mendix, a reserved word is a term or identifier that has a special, predefined meaning within the Mendix platform and cannot be used as a custom identifier in your applications. These words are “reserved” for specific purposes in the Mendix language and development environment.
Solution/Workaround
- Rename the entity 'String' to a different name, and run the project to fix this issue.
- Alternatively, upgrade the project to Studio Pro 9.15.0 or a newer version to fix the issue.
Internal information related
- 147900, 243018, 147093
- SOLP-943
Additional information
Below is a list of words that either throw a warning beforehand, throw an error when trying to run, or do not throw an error at all while used in Studio Pro version 8.1.0 to 9.14.2.
| String | Studio Pro throws error during compilation |
| Long | Studio Pro provides a warning that the word is reserved |
| Integer | Allowed to run |
| Hashed string | Studio Pro provides a warning that the name is not in the proper format |
| Enumeration | Allowed to run |
| Decimal | Allowed to run |
| Date and time | Studio Pro provides a warning that the name is not in the proper format |
| Boolean | Studio Pro provides a warning that the word is reserved |
| Binary | Allowed to run |
| AutoNumber | Allowed to run |
0 Comments