Updating to Mendix 7 Error

1
Hi there, I am receiving the following java compile error after updating to V7 from 6.10.4. Buildfile: C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\deployment\build_core.xml compile:     [javac] Compiling 322 source files to C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\deployment\run\bin     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\appcloudservices\OpenIDHandler.java:350: error: cannot find symbol     [javac]             resp.addCookie(RequestHandler.XAS_SESSION_ID, "", "/", "", 0, true);     [javac]                                          ^     [javac]   symbol:   variable XAS_SESSION_ID     [javac]   location: class RequestHandler     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\appcloudservices\SessionInitializer.java:46: error: cannot find symbol     [javac]         String sessionid = req.getCookie(RequestHandler.XAS_SESSION_ID);     [javac]                                                        ^     [javac]   symbol:   variable XAS_SESSION_ID     [javac]   location: class RequestHandler     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\appcloudservices\SessionInitializer.java:64: error: cannot find symbol     [javac]         resp.addCookie(RequestHandler.XAS_SESSION_ID, session.getId().toString(),"/" ,"" ,-1, true );     [javac]                                      ^     [javac]   symbol:   variable XAS_SESSION_ID     [javac]   location: class RequestHandler     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\implementation\IDataManager.java:77: error: cannot find symbol     [javac]             this.settings.setContext( this.settings.getContext().getSudoContext() );     [javac]                                                                 ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:51: error: cannot find symbol     [javac]             SQLServerReader.processTables(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                              ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:52: error: cannot find symbol     [javac]             SQLServerReader.processColumns(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                               ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:55: error: cannot find symbol     [javac]             PostgresReader.processTables(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                             ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:56: error: cannot find symbol     [javac]             PostgresReader.processColumns(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                              ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:59: error: cannot find symbol     [javac]             OracleReader.processTables(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                           ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:60: error: cannot find symbol     [javac]             OracleReader.processColumns(this, dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                            ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:63: error: cannot find symbol     [javac]             AS400Reader.processDatabase(dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                      ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:66: error: cannot find symbol     [javac]             DMS2Reader.processDatabase(dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                     ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:69: error: cannot find symbol     [javac]             CustomReader.processDatabase(dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                       ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\javasource\databasereplication\actions\SyncDatabaseInfo.java:75: error: cannot find symbol     [javac]                 MSAccessReader.processDatabase(dbSettings, this.getContext().getSudoContext(), this.CurDatabase);     [javac]                                                                             ^     [javac]   symbol:   method getSudoContext()     [javac]   location: interface IContext     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 14 errors BUILD FAILED C:\Users\bertr\Documents\Mendix\CIM Optimization Engine-main\deployment\build_core.xml:25: Compile failed; see the compiler error output for details. Total time: 2 seconds
asked
3 answers
2

Import the AppCloudServices from the AppStore again.

answered
1

Yes there are quite a few issues to resolve in the Java code. You need to update all App Store Modules, but not all app store modules are upgraded to Mx7 yet, you can wait for a new release or fix them yourself. Things like RequestHandler.XAS_SESSION_ID, and Core.getConfiguration().getSessionIdCookieName() are gone, while others are moved or have an alternative library.

This page gives you an overview of the API changes from Mx 6 to Mx7.

Eclipse will show you per error what is missing.

 

answered
0

I had the error related to "resp.addCookie(RequestHandler.XAS_SESSION_ID, "", "/", "", 0, true);" on one of my test projects, that was converted from 6.x.

I tried to remove cloudservices, and add it again, but failed (Error occurred in the modeller popup)

To get things up and running again, I

  • exported the modules I created from the converted project
  • created a new project
  • removed MyFirstModule from it
  • replaced MyFirstModule with the exported module from the converted project
  • Fixed the errors in project navigation (changed homepages)
  • Run => works (for now)

 

Since this was just a test project with hardly any changes in the project navigation, no security, and I didn't care about the test data etc, it was easier/faster than solving the java errors

answered