Introduction
When adding the OpenAI Connector module to a project, a compilation error occurs. The error message indicates that the symbol "properties()" cannot be found for the JsonNode type.
error: cannot find symbol
Iterator<Map.Entry<String, JsonNode>> fields = arguments.properties().iterator();
^
symbol: method properties()
location: variable arguments of type JsonNode
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compile'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --scan to get full insights.
BUILD FAILED in 10sEnvironment
OpenAI Connector module (all versions)
Instructions/Procedure
The issue is caused by conflicting Java libraries. Specifically, old userlibs (from Mendix 9) are creating conflicts with newer vendorlibs of the same libraries. Since the older Jackson version does not contain the JsonNode.properties() method, the Java compilation fails. To resolve this issue, follow these steps:
- Make sure to take a backup of your project's userlib folder.
- Locate the Jackson JAR files in userlib folder.
- Remove these Jackson JAR files from the userlib folder.
- Run Clean Deployment Directory in Studio Pro.
- Run the application again.
Outcome
After removing the Jackson JAR files, Mendix will use its own bundled, compatible Jackson version, which should resolve the compilation error.
Internal information related
- 269174
Additional information
Not Applicable
0 Comments