[ 
https://issues.apache.org/jira/browse/IGNITE-15971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17448962#comment-17448962
 ] 

Kirill Tkalenko commented on IGNITE-15971:
------------------------------------------

[~rpuch] Looks good.

> Fix problems with dynamic configuration
> ---------------------------------------
>
>                 Key: IGNITE-15971
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15971
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 8.5h
>  Remaining Estimate: 0h
>
> The following problems were found with dynamic configuration.
> If configuration schema class name does not end with 'ConfigurationSchema' 
> suffix, configuration annotation processor fails a build like this:
> [ERROR] Failed to process configuration: 
> org.apache.ignite.internal.configuration.processor.ProcessorException: Failed 
> to generate class 
> org.apache.ignite.internal.configuration.notifications.StringPolyVariant
> [ERROR]     at 
> org.apache.ignite.internal.configuration.processor.Processor.buildClass(Processor.java:485)
> [ERROR]     at 
> org.apache.ignite.internal.configuration.processor.Processor.createPojoBindings(Processor.java:475)
> [ERROR]     at 
> org.apache.ignite.internal.configuration.processor.Processor.process0(Processor.java:209)
> [ERROR]     at 
> org.apache.ignite.internal.configuration.processor.Processor.process(Processor.java:103)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:980)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:896)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1222)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1335)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1258)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:936)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
> [ERROR]     at 
> org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
> [ERROR]     at 
> org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
> [ERROR]     at 
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
> [ERROR]     at 
> org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:180)
> [ERROR]     at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> [ERROR]     at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> [ERROR]     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> [ERROR]     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> [ERROR]     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> [ERROR]     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
> [ERROR]     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
> [ERROR]     at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
> [ERROR]     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [ERROR]     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR]     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR]     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [ERROR]     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
> [ERROR]     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
> [ERROR]     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
> [ERROR]     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
> [ERROR]   Caused by: javax.annotation.processing.FilerException: Attempt to 
> recreate a file for type 
> org.apache.ignite.internal.configuration.notifications.StringPolyVariant
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacFiler.checkNameAndExistence(JavacFiler.java:724)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:489)
> [ERROR]     at 
> jdk.compiler/com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:426)
> [ERROR]     at com.squareup.javapoet.JavaFile.writeTo(JavaFile.java:169)
> [ERROR]     at 
> org.apache.ignite.internal.configuration.processor.Processor.buildClass(Processor.java:483)
> [ERROR]     ... 39 more
> 2. If a configuration schema contains a polymorphic configuration schema, but 
> a ConfigurationRegistry is not supplied with the corresponding polymorphic 
> configuration schema classes, an NPE is thrown from ConfigurationRegistry 
> constructor.
> 3. If a configuration schema contains a polymorphic configuration schema 
> which is included using @ConfigValue (and not @NamedConfigValue), and the 
> corresponding polymorphic ID field is not supplied a default, then an 
> IllegalStateException is thrown on an attempt to initializeDefaults(), and 
> the message of this exception is not too clear.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to