Hi Hartley,
The behavior you're seeing is actually a good clue: Studio Pro is regenerating BatchWriteItem.java, so I would not treat this as a random compilation issue.
Mendix regenerates the Java files for Java Actions when the app is deployed/built. Code outside the supported generated-code sections can therefore be replaced. Mendix explicitly recommends keeping custom implementation code between // BEGIN USER CODE / // END USER CODE and extra helper code between // BEGIN EXTRA CODE / // END EXTRA CODE.
The DynamoDB Connector is also a likely factor here. The current Marketplace release history shows that version 3.0.0 changed its dependency handling: third-party JAR dependencies were moved into the module and removed from userlib.
I would check this in the following order:
BatchWriteItem.java from the working revision with the failing revision.BatchWriteItem Java Action in Studio Pro.// BEGIN USER CODE // END USER CODE
then Studio Pro can regenerate it and bring back the generated implementation. Move custom code into the supported sections.
Amazon DynamoDB Connector AWS Authentication Connector AWS SDK / related JARs userlib contents
Don't manually add an AWS SDK JAR just to make the compilation pass if the connector version already manages that dependency. The connector changed its dependency management from version 3.0.0 onward.
BatchWriteItem.java. If the working file isn't actually committed to the repository, another build/pull can naturally bring back the old version.One important distinction: don't modify the generated Java file and expect that change itself to be permanent. Mendix states that code outside the preserved sections is regenerated on deployment.
So the fact that your temporary replacement works locally but gets reverted when you build a package strongly suggests that the source Java Action/dependency configuration in the project is still pointing to the old implementation.
I would start by comparing BatchWriteItem.java in the working Team Server revision vs the failing revision, and then check the DynamoDB Connector version/userlib differences. That should tell you whether this is a Java regeneration problem or a connector dependency/version problem.
Hope this helps.