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

Plugins not importing successfully #78

Open
BusiWork opened this issue Sep 3, 2024 · 1 comment
Open

Plugins not importing successfully #78

BusiWork opened this issue Sep 3, 2024 · 1 comment

Comments

@BusiWork
Copy link

BusiWork commented Sep 3, 2024

I am following the Getting Started tutorial, and there is mention of logging. However, if I add a logging import as follows to my whistle file:

import "class://com.google.cloud.verticals.foundations.dataharmonization.plugins.logging.LoggingPlugin"

Gradle run throws an ImportException:

gradle :runtime:run -q --args=-m\ mapping.wstl\ -i\ data.json


Exception in thread "main" java.lang.NullPointerException
        at com.google.cloud.verticals.foundations.dataharmonization.imports.ImportPath.resolve(ImportPath.java:104)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.DefaultImportProcessor.processImports(DefaultImportProcessor.java:92)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.DefaultImportProcessor.processImports(DefaultImportProcessor.java:62)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.ProtoParserBase.parseConfig(ProtoParserBase.java:88)
        at com.google.cloud.verticals.foundations.dataharmonization.init.initializer.ConfigExtractorBase.initialize(ConfigExtractorBase.java:58)
        at com.google.cloud.verticals.foundations.dataharmonization.init.Engine$Builder.initialize(Engine.java:302)
        at com.google.cloud.verticals.foundations.dataharmonization.init.Engine$Builder.initialize(Engine.java:325)
        at com.google.cloud.verticals.foundations.dataharmonization.Main.main(Main.java:120)

Is there a step I am missing?

@BusiWork
Copy link
Author

BusiWork commented Sep 3, 2024

The error varies depending on where my whistle files are. Above reported error is when wstl file is in the runtime directory but if I run from the root directory I get the following error:

Exception in thread "main" com.google.cloud.verticals.foundations.dataharmonization.exceptions.ImportException: Error processing import class:///com.google.cloud.verticals.foundations.dataharmonization.plugins.logging.LoggingPlugin
Class not found: com.google.cloud.verticals.foundations.dataharmonization.plugins.logging.LoggingPlugin. Make sure it is in the current classpath.
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.DefaultImportProcessor.processImports(DefaultImportProcessor.java:116)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.DefaultImportProcessor.processImports(DefaultImportProcessor.java:62)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.ProtoParserBase.parseConfig(ProtoParserBase.java:88)
        at com.google.cloud.verticals.foundations.dataharmonization.init.initializer.ConfigExtractorBase.initialize(ConfigExtractorBase.java:58)
        at com.google.cloud.verticals.foundations.dataharmonization.init.Engine$Builder.initialize(Engine.java:302)
        at com.google.cloud.verticals.foundations.dataharmonization.init.Engine$Builder.initialize(Engine.java:325)
        at com.google.cloud.verticals.foundations.dataharmonization.Main.main(Main.java:120)
Caused by: java.io.IOException: Class not found: com.google.cloud.verticals.foundations.dataharmonization.plugins.logging.LoggingPlugin. Make sure it is in the current classpath.
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.PluginClassLoader.load(PluginClassLoader.java:44)
        at com.google.cloud.verticals.foundations.dataharmonization.imports.impl.DefaultImportProcessor.processImports(DefaultImportProcessor.java:109)
        ... 6 more

I also want to note that the "Getting Started" guide uses:

import "logging"

which also doesn't work, the import statement I ended up using was taken from the doc/logging.md documentation

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