comliation of java action failed

1
hello everyone . how to solve this java compaliatoin error?, this is happening when i start the app. even i update the comunity commns.   here are the errors.   C:\Users\User\Mendix\Swift Forwarding-main\javasource\sapodataconnector\utils\XPath.java:321: error: cannot find symbol                        synchronizedContext.rollbackTransAction();                                           ^  symbol:   method rollbackTransAction()  location: variable synchronizedContext of type IContextC:\Users\User\Mendix\Swift Forwarding-main\javasource\viewer3d\actions\httprouter\HttpRouter.java:58: error: method setStatus in interface IMxRuntimeResponse cannot be applied to given types;            response.setStatus(IMxRuntimeResponse.INTERNAL_SERVER_ERROR, ex.getCause().getMessage());                    ^  required: int  found: int,String  reason: actual and formal argument lists differ in lengthC:\Users\User\Mendix\Swift Forwarding-main\javasource\viewer3d\actions\httprouter\HttpRouter.java:61: error: method setStatus in interface IMxRuntimeResponse cannot be applied to given types;            response.setStatus(IMxRuntimeResponse.INTERNAL_SERVER_ERROR, ex.getMessage());                    ^  required: int  found: int,String  reason: actual and formal argument lists differ in lengthNote: 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.3 errors 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 --stacktrace option to get the stack trace.> Run with --debug option to get more log output.> Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 15s
asked
2 answers
3

Hi Ablikim,

 

Can you try upgrading/reinstalling the following module with the latest version?

OData Connector for SAP solutions

image.png

 

Also, check if any other modules that you have installed need to be updated (such as 3D Viewer, etc).

 

I hope that solves your issue, if it does please remember to mark the question as solved, best regards!

answered
0
  1. Error related to rollbackTransAction():

    • Error Message: cannot find symbol synchronizedContext.rollbackTransAction();
    • Cause: The method rollbackTransAction() is either misspelled, not defined, or not in the scope where it's being called.
    • Solution: Check if the method name is correctly spelled as it is in its definition. If it's a custom method, ensure it's correctly defined in the IContext interface or the class of synchronizedContext. Also, ensure that synchronizedContext is of the correct type where this method exists.
  2. Error with setStatus in IMxRuntimeResponse:

    • Error Message: method setStatus in interface IMxRuntimeResponse cannot be applied to given types;
    • Cause: The setStatus method is being called with the wrong number of arguments. It seems to expect an int, but it's being provided with an int and a String.
    • Solution: Check the documentation for IMxRuntimeResponse to see the correct usage of setStatus. Likely, you need to either pass only the status code or use a different method to set the error message.
answered