objectionary / jeo-maven-plugin

This Maven plugin converts Java Bytecode binary files to EOLANG programs that use the "opcode" atom
https://www.objectionary.com/jeo-maven-plugin/
MIT License
11 stars 3 forks source link

Execution bytecode-to-eo of `jeo-maven-plugin:dissassemble` goal failed due to NullPointerException: Cannot invoke "java.util.List.stream()" because "cast.values" is null #787

Open h1alexbel opened 3 hours ago

h1alexbel commented 3 hours ago

I've added Spring Web dependency to it/spring-fat/pom.xml:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

Then, I run:

mvn clean integration-test -Dinvoker.test=spring-fat -DskipTests

Which runs jeo-maven-plugin:dissassemble goal first to convert bytecode to EO, but I getting this error:

[ERROR] Failed to execute goal org.eolang:jeo-maven-plugin:1.0-SNAPSHOT:disassemble (bytecode-to-eo) on project jeo-spring-fat-it: Execution bytecode-to-eo of goal org.eolang:jeo-maven-plugin:1.0-SNAPSHOT:disassemble failed. NullPointerException: Cannot invoke "java.util.List.stream()" because "cast.values" is null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eolang:jeo-maven-plugin:1.0-SNAPSHOT:disassemble (bytecode-to-eo) on project jeo-spring-fat-it: Execution bytecode-to-eo of goal org.eolang:jeo-maven-plugin:1.0-SNAPSHOT:disassemble failed.
    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.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
h1alexbel commented 3 hours ago

@volodya-lombrozo take a look, please

h1alexbel commented 3 hours ago

@volodya-lombrozo Found out that JEO with version 0.5.7 works with it just fine:

[INFO]
[INFO] --- invoker:3.7.0:run (default) @ jeo-maven-plugin ---
[INFO] Building: spring-fat/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           spring-fat/pom.xml ............................... SUCCESS (46.41 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 1, Failed: 0, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  52.448 s
[INFO] Finished at: 2024-10-22T12:10:38+03:00

Looks like something gets broken next release after 0.5.7: 0.6.7, 0.6.8 (latest) are broken.

volodya-lombrozo commented 1 hour ago

@h1alexbel Hm, it's strange. Can you try the same with the newest versions 0.6.9 and 0.6.10 as well, please? Also you can try to get more informative logs. The current logs don't say anything about the problem. Perhaps, you can use -e or -X params to print full logs, if you use maven.