Updated the LogTransporter module and got error: cannot find symbol .setFlushThreshold(logTransporterConfig.getFlushTreshold())

0
Hi everyone,I recently updated the LogTransporter module to version 5.2.0 in my Mendix project.During the update I received a warning that the following files in the vendorlib folder would be overwritten:mendixProject\vendorlib\fastjson2-2.0.60.jarmendixProject\vendorlib\jackson-annotations-2.15.4.jarmendixProject\vendorlib\jackson-core-2.15.4.jarmendixProject\vendorlib\jackson-databind-2.15.4.jarmendixProject\vendorlib\java-jwt-4.5.0.jarAfter the update, when I run the application I get the following compilation error:C:\mendixProject\javasource\logtransporter\actions\Start_LogTransporter.java:69: error: cannot find symbol .setFlushThreshold(logTransporterConfig.getFlushTreshold()) symbol: method setFlushThreshold(Integer) location: class LogTransporterConfigurationBuilder This causes the build to fail with: FAILURE: Build failed with an exception. Execution failed for task ''. Compilation failed; see the compiler error output for details. Has anyone encountered this issue after upgrading the LogTransporter module?Is the "setFlushThreshold" method removed or renamed in version 5.2.0?Any help would be appreciated.
asked
3 answers
1

Hi Edwin Cornelisse


In Start_LogTransporter.java, change the method call to match the method name that actually exists in your updated LogTransporterConfigurationBuilder.


replace this

.setFlushThreshold(logTransporterConfig.getFlushTreshold())


With this:

.setFlushTreshold(logTransporterConfig.getFlushTreshold())


The module historically used the misspelled method setFlushTreshold, and after your upgrade the builder no longer has setFlushThreshold.


I hope this helps

answered
0

It looks like this may be caused by a breaking change in the LogTransporter Java API after the upgrade.


The important part is the compiler error:


cannot find symbol

setFlushThreshold(Integer)


That usually means the method name in the underlying Java code no longer matches what Start_LogTransporter.java is calling.


Looking at this line:


.setFlushThreshold(logTransporterConfig.getFlushTreshold())


there may also be a spelling mismatch involved between Threshold and Treshold. So one possibility is that the method was renamed or corrected in the newer module version, but the generated Java action in the project is still referring to the old method signature.


A few things I would check:


First, clean the deployment directory and rebuild the app.


Second, refresh or resync the project files in Studio Pro.


If the error is still there, open Start_LogTransporter.java and check line 69. It is worth verifying whether the builder still exposes setFlushThreshold(...) or whether that method was renamed, removed, or changed in the new version.


The vendorlib overwrite warning is usually expected during a module upgrade and is probably not the direct cause of this compilation error. It looks more like the Java action and the updated module code are out of sync.


If needed, comparing the new LogTransporter Java classes with the generated Start_LogTransporter.java should make the mismatch clear.


If this resolve your issue, please close the topic. 


answered
0

Hi,


This error happens because LogTransporter 5.2.0 removed the setFlushThreshold() configuration method, but the Java action in your project (Start_LogTransporter.java) is still calling that old method. That is why the compiler says:

cannot find symbol
.setFlushThreshold(...)

In LogTransporter ≤ 5.1, the configuration builder supported:

LogTransporterConfigurationBuilder.setFlushThreshold(Integer)

But starting from LogTransporter 5.2.0, this parameter was removed from the configuration API, so the builder class no longer contains that method.

So the Java action generated in your project still references an API that no longer exists in the updated library.

Correct Fix (Working Solution)

You need to update the Java action to match the new LogTransporter API.

Open the file:

javasource/logtransporter/actions/Start_LogTransporter.java

Find the line around where the error occurs (around line ~69):

.setFlushThreshold(logTransporterConfig.getFlushThreshold())

Remove that line completely.

Your configuration block should look something like this:

Before:

LogTransporterConfiguration config =
    LogTransporterConfigurationBuilder.newBuilder()
        .setEndpoint(logTransporterConfig.getEndpoint())
        .setApiKey(logTransporterConfig.getApiKey())
        .setFlushThreshold(logTransporterConfig.getFlushThreshold())
        .build();

After fix:

LogTransporterConfiguration config =
    LogTransporterConfigurationBuilder.newBuilder()
        .setEndpoint(logTransporterConfig.getEndpoint())
        .setApiKey(logTransporterConfig.getApiKey())
        .build();

Why this works

In LogTransporter 5.2.0:

  • The flush batching mechanism was changed internally.
  • flushThreshold configuration was removed from the public API.
  • The transporter now manages batching automatically.

So keeping that method call causes the Java compiler failure.

Important extra step (recommended)

After updating the module:

  1. Delete the folder
deployment

  1. Click Project → Clean Deployment Directory
  2. Run the application again.

This ensures no old compiled classes remain.

Summary

Cause:

LogTransporter 5.2.0 removed setFlushThreshold() but your Java action still calls it.

Fix:

Remove the line:

.setFlushThreshold(...)

from Start_LogTransporter.java.

After that the project will compile and run normally.

If you want, I can also show you the safest way to upgrade Mendix Marketplace modules like LogTransporter without breaking Java actions (most Mendix developers follow that method).


answered