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

NoClassDefFoundError: org/citydb/gui/plugin/view/ViewExtension when running the Importer/Exporter CLI #285

Closed
spechtx opened this issue May 31, 2023 · 4 comments

Comments

@spechtx
Copy link

spechtx commented May 31, 2023

Describe the bug:
When attempting to use the Importer/Exporter command line interface (version 5.3.0), a java.lang.NoClassDefFoundError is thrown with the message org/citydb/gui/plugin/view/ViewExtension.

To Reproduce:
Steps to reproduce the behavior:

Run the following command:

java -jar lib/impexp-client-cli-5.3.0.jar import --duplicate-log=/mnt/data/temp/3dcitydb/duplicate.log --import-log=/mnt/data/temp/import.log --input-encoding=utf-8 --log-file=/mnt/data/temp/3dcitydb/logfile.log --log-level=info --import-mode=import_all --worker-threads=16 --db-type=postgresql --db-host=localhost --db-port=5434 --db-name=3DCITYDB --db-schema=citydb --db-username=***** --db-password=***** /mnt/data/temp/3dcitydb/hh/

See error:

[12:22:15 INFO] Starting 3D City Database Importer/Exporter, version 5.3.0
[12:22:15 INFO] Loading plugins
Exception in thread "main" java.lang.NoClassDefFoundError: org/citydb/gui/plugin/view/ViewExtension

Expected behavior:
The Importer/Exporter should start and load the plugins without any exceptions.

Environment (please complete the following information):

OS: Ubuntu Server 22.04
Java version: OpenJDK 11
Database: PostgreSQL 15]

@spechtx
Copy link
Author

spechtx commented May 31, 2023

Workaround:
Interestingly, when running the command with the client GUI, instead the CLI, the import proceeds without any issues:
java -jar lib/impexp-client-gui-5.3.0.jar import --duplicate-log=/mnt/data/temp/3dcitydb/duplicate.log --import-log=/mnt/data/temp/import.log --input-encoding=utf-8 --log-file=/mnt/data/temp/3dcitydb/logfile.log --log-level=info --import-mode=import_all --worker-threads=16 --db-type=postgresql --db-host=localhost --db-port=5434 --db-name=3DCITYDB --db-schema=citydb --db-username=***** --db-password=***** /mnt/data/temp/3dcitydb/hh/

This is unexpected, as I am working in a shell environment and should not require the GUI version to run the import.

@clausnagel
Copy link
Member

clausnagel commented May 31, 2023

Seems like you have a plugin in your plugins folder that requires a GUI. Delete the plugin from the plugins folder to prevent it from being loaded at startup.

Btw, I recommend starting the CLI using the impexp executable in the bin folder rather than using the lib/impexp-client-cli-5.3.0.jar directly.

@spechtx
Copy link
Author

spechtx commented May 31, 2023

Thank you very much for your helpful reply! It makes sense that a plugin requiring a GUI could have caused the issue when using the CLI. Turns out, I was following some older documentation, which is where I got the lib folder usage from...

Have a nice day!

@clausnagel
Copy link
Member

Added proper log messages in case a plugin cannot be loaded through #287

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

2 participants