Open woj-tek opened 1 month ago
OK, I think the problem is with groovy (we are planning to get rid of it…) that I missed previously:
13:42:38,976 [WARNING] There were problems parsing some source files, run with --errors to see full stack traces
13:42:38,976 [WARNING] There were problems parsing src/main/groovy/tigase/admin/ListNodes.groovy
13:42:39,157 [WARNING] There were problems parsing src/main/groovy/tigase/admin/ListItems.groovy
13:42:39,212 [WARNING] There were problems parsing src/main/groovy/tigase/admin/RetrieveUserSubscriptions.groovy
13:42:39,215 [WARNING] There were problems parsing src/main/groovy/tigase/pubsub/repository_migrator.groovy
13:42:39,416 [WARNING] There were problems parsing src/main/groovy/tigase/rest/pubsub/PubSubAdHocActions.groovy
Curiously enough there doesn't seem to be any logging reference so it's even weirder: https://github.com/tigase/tigase-pubsub/blob/master/src/main/groovy/tigase/admin/ListNodes.groovy
Full ST:
13:40:28,026 [DEBUG]
org.openrewrite.groovy.GroovyParsingException: Failed to parse src/main/groovy/tigase/admin/ListNodes.groovy at cursor position 2228. The next 10 characters in the original source are `
get`
at org.openrewrite.groovy.GroovyParserVisitor.visit (GroovyParserVisitor.java:191)
at org.openrewrite.groovy.GroovyParser.lambda$parseInputs$4 (GroovyParser.java:154)
at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:212)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1709)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining (StreamSpliterators.java:310)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:734)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:734)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining (StreamSpliterators.java:310)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential (ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential (ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:265)
at java.util.stream.ReferencePipeline.forEach (ReferencePipeline.java:611)
at java.util.stream.ReferencePipeline$7$1.accept (ReferencePipeline.java:291)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1709)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:921)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:265)
at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:702)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.sourcesWithAutoDetectedStyles (AbstractRewriteBaseRunMojo.java:174)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.loadSourceSet (AbstractRewriteBaseRunMojo.java:136)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.listResults (AbstractRewriteBaseRunMojo.java:117)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:63)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1570)
Caused by: java.lang.IllegalArgumentException: Unable to parse method call
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitMethodCallExpression (GroovyParserVisitor.java:1560)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit (MethodCallExpression.java:76)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitMethodCallExpression (GroovyParserVisitor.java:1528)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit (MethodCallExpression.java:76)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitMethodCallExpression (GroovyParserVisitor.java:1528)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit (MethodCallExpression.java:76)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitMethodCallExpression (GroovyParserVisitor.java:1528)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit (MethodCallExpression.java:76)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitMethodCallExpression (GroovyParserVisitor.java:1528)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit (MethodCallExpression.java:76)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement (CodeVisitorSupport.java:117)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.lambda$visitExpressionStatement$6 (GroovyParserVisitor.java:1326)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.labeled (GroovyParserVisitor.java:654)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitExpressionStatement (GroovyParserVisitor.java:1325)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit (ExpressionStatement.java:40)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitBlockStatement (GroovyParserVisitor.java:935)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit (BlockStatement.java:69)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitTryCatchFinally (GroovyParserVisitor.java:1894)
at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit (TryCatchStatement.java:47)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitBlockStatement (GroovyParserVisitor.java:935)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit (BlockStatement.java:69)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitIfElse (GroovyParserVisitor.java:1406)
at org.codehaus.groovy.ast.stmt.IfStatement.visit (IfStatement.java:41)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitBlockStatement (GroovyParserVisitor.java:935)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit (BlockStatement.java:69)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitTryCatchFinally (GroovyParserVisitor.java:1894)
at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit (TryCatchStatement.java:47)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visitBlockStatement (GroovyParserVisitor.java:935)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit (BlockStatement.java:69)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.visit (GroovyParserVisitor.java:588)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyVisitor.access$1200 (GroovyParserVisitor.java:576)
at org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyClassVisitor.visitMethod (GroovyParserVisitor.java:553)
at org.openrewrite.groovy.GroovyParserVisitor.convertTopLevelStatement (GroovyParserVisitor.java:2075)
at org.openrewrite.groovy.GroovyParserVisitor.visit (GroovyParserVisitor.java:177)
at org.openrewrite.groovy.GroovyParser.lambda$parseInputs$4 (GroovyParser.java:154)
at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:212)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1709)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining (StreamSpliterators.java:310)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:734)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:734)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining (StreamSpliterators.java:310)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining (Streams.java:735)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential (ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential (ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:265)
at java.util.stream.ReferencePipeline.forEach (ReferencePipeline.java:611)
at java.util.stream.ReferencePipeline$7$1.accept (ReferencePipeline.java:291)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1709)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:556)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:546)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:921)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:265)
at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:702)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.sourcesWithAutoDetectedStyles (AbstractRewriteBaseRunMojo.java:174)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.loadSourceSet (AbstractRewriteBaseRunMojo.java:136)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.listResults (AbstractRewriteBaseRunMojo.java:117)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:63)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1570)
13:40:28,215 [WARNING] There were problems parsing some source files
13:40:28,215 [WARNING] There were problems parsing src/main/groovy/tigase/admin/ListNodes.groovy
13:40:28,215 [WARNING] org.openrewrite.groovy.GroovyParsingException: Failed to parse src/main/groovy/tigase/admin/ListNodes.groovy at cursor position 2228. The next 10 characters in the original source are `
get`
org.openrewrite.groovy.GroovyParserVisitor.visit(GroovyParserVisitor.java:191)
Thanks for the added details! I think the Groovy parsing issues are separate; when we fail to parse a file then we don't run any recipes on those. They are instead turned into a ParseError and logged, as you can here.
Did you manually truncate the Error while visiting src/main/java/<…>.java
above? That would be the best indication of which file fails. Are there any logging-like methods in that particular file?
Did you manually truncate the
Error while visiting src/main/java/<…>.java
above? That would be the best indication of which file fails. Are there any logging-like methods in that particular file?
Yes, nad indeed it was originally java file:
14:33:23,566 [ERROR] Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run (default-cli) on project tigase-pubsub: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run failed: Error while visiting src/main/java/tigase/pubsub/utils/PubSubRepositoryManagerExtension.java: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
14:33:23,567 [ERROR] java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
14:33:23,567 [ERROR] java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
14:33:23,567 [ERROR] java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
14:33:23,567 [ERROR] java.base/java.util.Objects.checkIndex(Objects.java:365)
14:33:23,567 [ERROR] java.base/java.util.ArrayList.get(ArrayList.java:428)
14:33:23,567 [ERROR] org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments(JavaTemplateParser.java:210)
14:33:23,567 [ERROR] org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:414)
14:33:23,567 [ERROR] org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:56)
14:33:23,567 [ERROR] org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
14:33:23,567 [ERROR] org.openrewrite.java.tree.J.accept(J.java:59)
14:33:23,567 [ERROR] org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
14:33:23,567 [ERROR] org.openrewrite.TreeVisitor.visit(TreeVisitor.java:151)
14:33:23,567 [ERROR] org.openrewrite.java.JavaTemplate.apply(JavaTemplate.java:101)
14:33:23,567 [ERROR] org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:104)
14:33:23,567 [ERROR] org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:71)
14:33:23,567 [ERROR] org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
There is no entry with this file in regular output (apart from the error). I re-ran the thing with -X
to get the debug:
14:35:02,125 [INFO] ------------------------------------------------------------------------
14:35:02,126 [ERROR] Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run (default-cli) on project tigase-pubsub: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run failed: Error while visiting src/main/java/tigase/pubsub/utils/PubSubRepositoryManagerExtension.java: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
14:35:02,126 [ERROR] java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
14:35:02,126 [ERROR] java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
14:35:02,126 [ERROR] java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
14:35:02,126 [ERROR] java.base/java.util.Objects.checkIndex(Objects.java:365)
14:35:02,126 [ERROR] java.base/java.util.ArrayList.get(ArrayList.java:428)
14:35:02,126 [ERROR] org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments(JavaTemplateParser.java:210)
14:35:02,126 [ERROR] org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:414)
14:35:02,126 [ERROR] org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:56)
14:35:02,126 [ERROR] org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
14:35:02,126 [ERROR] org.openrewrite.java.tree.J.accept(J.java:59)
14:35:02,126 [ERROR] org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
14:35:02,126 [ERROR] org.openrewrite.TreeVisitor.visit(TreeVisitor.java:151)
14:35:02,128 [ERROR] org.openrewrite.java.JavaTemplate.apply(JavaTemplate.java:101)
14:35:02,128 [ERROR] org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:104)
14:35:02,128 [ERROR] org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:71)
14:35:02,128 [ERROR] org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
14:35:02,128 [ERROR] ...
14:35:02,128 [ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run (default-cli) on project tigase-pubsub: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run failed: Error while visiting src/main/java/tigase/pubsub/utils/PubSubRepositoryManagerExtension.java: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
java.base/java.util.Objects.checkIndex(Objects.java:365)
java.base/java.util.ArrayList.get(ArrayList.java:428)
org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments(JavaTemplateParser.java:210)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:414)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:56)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
org.openrewrite.java.tree.J.accept(J.java:59)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:151)
org.openrewrite.java.JavaTemplate.apply(JavaTemplate.java:101)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:104)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:71)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
...
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1570)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:5.35.0:run failed: Error while visiting src/main/java/tigase/pubsub/utils/PubSubRepositoryManagerExtension.java: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
java.base/java.util.Objects.checkIndex(Objects.java:365)
java.base/java.util.ArrayList.get(ArrayList.java:428)
org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments(JavaTemplateParser.java:210)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:414)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:56)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
org.openrewrite.java.tree.J.accept(J.java:59)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:151)
org.openrewrite.java.JavaTemplate.apply(JavaTemplate.java:101)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:104)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:71)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
...
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1570)
Caused by: java.lang.RuntimeException: Error while visiting src/main/java/tigase/pubsub/utils/PubSubRepositoryManagerExtension.java: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
java.base/java.util.Objects.checkIndex(Objects.java:365)
java.base/java.util.ArrayList.get(ArrayList.java:428)
org.openrewrite.java.internal.template.JavaTemplateParser.parseMethodArguments(JavaTemplateParser.java:210)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:414)
org.openrewrite.java.internal.template.JavaTemplateJavaExtension$1.visitMethodInvocation(JavaTemplateJavaExtension.java:56)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
org.openrewrite.java.tree.J.accept(J.java:59)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:151)
org.openrewrite.java.JavaTemplate.apply(JavaTemplate.java:101)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:104)
org.openrewrite.java.logging.ParameterizedLogging$1.visitMethodInvocation(ParameterizedLogging.java:71)
org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3945)
...
at org.openrewrite.maven.AbstractRewriteBaseRunMojo$ResultsContainer$1.lambda$preVisit$0 (AbstractRewriteBaseRunMojo.java:280)
at java.util.Optional.ifPresent (Optional.java:178)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo$ResultsContainer$1.preVisit (AbstractRewriteBaseRunMojo.java:277)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo$ResultsContainer$1.preVisit (AbstractRewriteBaseRunMojo.java:273)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo_ResultsContainer_1_JavaVisitor.preVisit (AbstractRewriteBaseRunMojo_ResultsContainer_1_JavaVisitor.zig:102)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:247)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.visitIf (JavaVisitor.java:721)
at org.openrewrite.java.tree.J$If.acceptJava (J.java:2551)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.visitCase (JavaVisitor.java:431)
at org.openrewrite.java.tree.J$Case.acceptJava (J.java:1092)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitSwitchExpression (JavaVisitor.java:1132)
at org.openrewrite.java.tree.J$SwitchExpression.acceptJava (J.java:5108)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.visitCase (JavaVisitor.java:431)
at org.openrewrite.java.tree.J$Case.acceptJava (J.java:1092)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitSwitchExpression (JavaVisitor.java:1132)
at org.openrewrite.java.tree.J$SwitchExpression.acceptJava (J.java:5108)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitReturn (JavaVisitor.java:1102)
at org.openrewrite.java.tree.J$Return.acceptJava (J.java:5016)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitMethodDeclaration (JavaVisitor.java:883)
at org.openrewrite.java.tree.J$MethodDeclaration.acceptJava (J.java:3685)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitClassDeclaration (JavaVisitor.java:488)
at org.openrewrite.java.tree.J$ClassDeclaration.acceptJava (J.java:1290)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitRightPadded (JavaVisitor.java:1369)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4 (JavaVisitor.java:401)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitBlock (JavaVisitor.java:400)
at org.openrewrite.java.tree.J$Block.acceptJava (J.java:841)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.visitClassDeclaration (JavaVisitor.java:488)
at org.openrewrite.java.tree.J$ClassDeclaration.acceptJava (J.java:1290)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast (TreeVisitor.java:324)
at org.openrewrite.java.JavaVisitor.lambda$visitCompilationUnit$10 (JavaVisitor.java:501)
at org.openrewrite.internal.ListUtils.map (ListUtils.java:176)
at org.openrewrite.java.JavaVisitor.visitCompilationUnit (JavaVisitor.java:501)
at org.openrewrite.java.tree.J$CompilationUnit.acceptJava (J.java:1568)
at org.openrewrite.java.tree.J.accept (J.java:59)
at org.openrewrite.TreeVisitor.visit (TreeVisitor.java:250)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo$ResultsContainer.getRecipeErrors (AbstractRewriteBaseRunMojo.java:284)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo$ResultsContainer.getFirstException (AbstractRewriteBaseRunMojo.java:264)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:64)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1570)
14:35:02,437 [ERROR]
14:35:02,437 [ERROR]
14:35:02,437 [ERROR] For more information about the errors and possible solutions, please read the following articles:
14:35:02,437 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
14:35:02,442 [DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
14:35:02,442 [DEBUG] Shutting down 'file-lock' factory
14:35:02,442 [DEBUG] Shutting down 'rwlock-local' factory
14:35:02,460 [DEBUG] Shutting down 'semaphore-local' factory
14:35:02,460 [DEBUG] Shutting down 'noop' factory
Hmm; a mental parse doesn't immediately spot any problematic logging statements, but perhaps there's some interplay between first making them parameterized and then converting. Attaching a debugger would likely help. No immediate time for that here, but hope you're willing and able to help out once more.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
Maven call from CLI as above on the project: https://github.com/tigase/tigase-pubsub/
What is the smallest, simplest way to reproduce the problem?
n/a
What did you expect to see?
What did you see instead?
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?