Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Migrate to 4.5.2 fails when there is no CLI installed #6341

Open
JoeFox82 opened this issue Nov 5, 2024 Discussed in #6338 · 0 comments
Open

[BUG] Migrate to 4.5.2 fails when there is no CLI installed #6341

JoeFox82 opened this issue Nov 5, 2024 Discussed in #6338 · 0 comments

Comments

@JoeFox82
Copy link

JoeFox82 commented Nov 5, 2024

Discussed in #6338

When there is no CLI installed the migration to version 4.5.2 fails and the server doesn't start. I took a look in the logs and saw that there is an error in line 40 of class com.mirth.connect.server.migration.Migrate4_5_2.

ERROR 2024-10-01 10:16:15.335 [Main Server Thread] Server: Exception in thread "Main Server Thread" java.lang.NullPointerException: Cannot invoke "java.net.URI.isAbsolute()" because "uri" is null
ERROR 2024-10-01 10:16:15.343 [Main Server Thread] Server: at java.base/java.io.File.(File.java:417)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.migration.Migrate4_5_2.migrateLog4jProperties(Migrate4_5_2.java:40)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.migration.Migrate4_5_2.migrate(Migrate4_5_2.java:23)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.migration.ServerMigrator.migrate(ServerMigrator.java:78)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.controllers.DefaultMigrationController.migrate(DefaultMigrationController.java:96)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.Mirth.startup(Mirth.java:319)
ERROR 2024-10-01 10:16:15.344 [Main Server Thread] Server: at com.mirth.connect.server.Mirth.run(Mirth.java:168)

I checked the code and it tells me:

builder = PropertiesConfigurationUtil.createBuilder(new File(ClassPathResource.getResourceURI("log4j2-cli.properties")));

Because there is no log4j2-cli.properties when the CLI is not installed the migration will always fail.

@JoeFox82 JoeFox82 changed the title Migrate to 4.5.2 fails when there is no CLI installed [BUG] Migrate to 4.5.2 fails when there is no CLI installed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant