DatabaseReplication module errors

2
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\ImportActivitySet.java:43: 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\ImportActivitySet.java:50: 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 java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 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$class.map(TraversableLike.scala:233) at scala.collection.JavaConversions$JMapWrapper.map(JavaConversions.scala:792) 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(HttpAdminHandler.java:121) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:642) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) at java.lang.Thread.run(Thread.java:662) I look forward to your suggestions. Regards, Paul
asked
2 answers
4

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.

answered
0

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?

answered