DatabaseReplication module errors

Hi, I upgraded the DatabaseReplication, ExcelImporter and MxModelReflection modules in my 4.1 project to the latest version. Now I get this error: Buildfile: C:\Users\...-main\deployment\build.xml compile: [javac] Compiling 196 source files to C:\Users\...-main\deployment\model\lib\bin [javac] C:\Users\...-main\javasource\databasereplication\actions\ cannot find symbol [javac] symbol : variable Activity [javac] location: class databasereplication.actions.ImportActivitySet [javac] paramMap.put("ImportActivity", this.Activity); [javac] ^ [javac] C:\Users\...-main\javasource\databasereplication\actions\ cannot find symbol [javac] symbol : variable Activity [javac] location: class databasereplication.actions.ImportActivitySet [javac] Core.getLogger(this.toString()).error( "Failed importing activityset: " + this.Activity.getValue(this.getContext(), ScheduledImportActivity.MemberNames.SortOrder.toString()), e); [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] 2 errors BUILD FAILED C:\Users\...-main\deployment\build.xml:70: Compile failed; see the compiler error output for details. Total time: 5 seconds In the past I have had issues with replication.jar; installing the modules in a certain order was required. Now I have tried various orders but I cannot get it fixed. Btw, in other orders more errors appear. And I deleted the appropriate directories in javasource and the file replication.jar before the updates. And when I click the proceed button, after the message above appears, the application starts and gives this error: Request action: start Message: runtime.start() should not throw anything other than AdminException! Cause: databasereplication.actions.ImportByImportCall Stack trace: com.mendix.m2ee.api.AdminException: runtime.start() should not throw anything other than AdminException! at fP.a(SourceFile:58) Caused by: java.lang.ClassNotFoundException: databasereplication.actions.ImportByImportCall at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at fF.b(SourceFile:66) at fF$aj.a(SourceFile:55) at fF$aj.apply(SourceFile:52) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) at scala.collection.Iterator$class.foreach(Iterator.scala:772) at scala.collection.JavaConversions$JMapWrapperLike$$anon$2.foreach(JavaConversions.scala:781) at scala.collection.IterableLike$class.foreach(IterableLike.scala:73) at scala.collection.JavaConversions$JMapWrapper.foreach(JavaConversions.scala:792) at scala.collection.TraversableLike$ at scala.collection.JavaConversions$ at fF.b(SourceFile:52) at fF.<init>(SourceFile:59) at com.mendix.core.MxRuntime.a(SourceFile:224) at com.mendix.core.MxRuntime.b(SourceFile:178) at fP.a(SourceFile:50) at fO.execute(SourceFile:26) at com.mendix.m2ee.server.handler.HttpAdminHandler.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest( at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete( at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.AsyncHttpConnection.handle( at at$ at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( at org.eclipse.jetty.util.thread.QueuedThreadPool$ at I look forward to your suggestions. Regards, Paul
2 answers

As you probably know by now, the problem was an entity called 'Activity'. A parameter of a Java action in the databasereplication module is also called 'Activity'. Having a parameter and an entity with the same name can lead to problems in the Java code. Therefore, the Modeler renamed the parameter to 'ActivityParameter1' but the user code still depended on 'Activity'.

It is good practice to let Java parameter names start with a lower-case character. This will avoid problems like these and it is in line with normal Java conventions. The databasereplication (which you imported) does not respect this convention and this caused the problem.

We accepted your ticket and will try to come up with a good solution for a future version of Mendix.


It seems like the database replication module which is build in version 3.2.1. is giving the errors. Submit a ticket to Mendix regarding this module and request a 4.1. version of the module? Some deprecated (in 4.1.0) java code is being used in the 3.2.1. version?