Code with @SneakyThrows fails to compile on the Mac at all #412

Closed
lombokissues opened this Issue Jul 14, 2015 · 20 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 339)

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 01, 2012 at 05:17 UTC

Every version since 0.10 has been failing on a mac.

blackbird:baw-email lprimak$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

blackbird:baw-email lprimak$ uname -a
Darwin blackbird 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:56:15 PDT 2011; root:xnu-1699.24.8~1/RELEASE_I386 i386

MacOS X Lion 10.7.2 with latest Java update as of Jan 2012

blackbird:baw-email lprimak$ mvn -Dlombok.version=0.10.8 clean package
[INFO] Scanning for projects...
Downloading: http://bawweb:8088/repo/com/flowlogix/tapestry-build-core/0.9.2-SNAPSHOT/maven-metadata.xml
Downloading: https://repository.apache.org/content/repositories/orgapachetapestry-160/com/flowlogix/tapestry-build-core/0.9.2-SNAPSHOT/maven-metadata.xml
Downloading: https://repository.apache.org/content/repositories/orgapachetapestry-160/com/flowlogix/flowlogix/0.9.2-SNAPSHOT/maven-metadata.xml
Downloading: https://projectlombok.org/mavenrepo/com/flowlogix/flowlogix/0.9.2-SNAPSHOT/maven-metadata.xml
Downloading: http://bawweb:8088/repo/com/flowlogix/flowlogix/0.9.2-SNAPSHOT/maven-metadata.xml
Downloading: http://download.java.net/maven/glassfish/com/flowlogix/flowlogix/0.9.2-SNAPSHOT/maven-metadata.xml
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bett-A-Way E-Mail Server 1.6
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ emailsrvr ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ emailsrvr ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.0:hgchangeset (buildid) @ emailsrvr ---
[INFO] Setting Mercurial Changeset: ad6a6ea869f4+
[INFO] Setting Mercurial Changeset Date: "2012-01-30 13:02 -0500"
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ emailsrvr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ emailsrvr ---
[INFO] Compiling 14 source files to /Volumes/Home/Users/lprimak/Documents/devel/baw-test/baw-email/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_29). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at lombok.libs.org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source)
at lombok.bytecode.FixedClassWriter.getCommonSuperClass(FixedClassWriter.java:36)
at lombok.libs.org.objectweb.asm.ClassWriter.a(Unknown Source)
at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
at lombok.libs.org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
at lombok.libs.org.objectweb.asm.MethodVisitor.visitMaxs(Unknown Source)
at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
at lombok.bytecode.SneakyThrowsRemover.applyTransformations(SneakyThrowsRemover.java:170)
at lombok.core.PostCompiler.applyTransformations(PostCompiler.java:40)
at lombok.core.PostCompiler$1.close(PostCompiler.java:68)
at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1452)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:618)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1298)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1268)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:768)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:730)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
at com.sun.tools.javac.main.Main.compile(Main.java:270)
at com.sun.tools.javac.Main.compile(Main.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.129s
[INFO] Finished at: Wed Feb 01 00:11:50 EST 2012
[INFO] Final Memory: 18M/81M
[INFO] ----------------------------------------------------------------------

@lombokissues
Collaborator

๐Ÿ‘ค grootjans ย  ๐Ÿ•— Feb 06, 2012 at 21:00 UTC

I'm not sure if this is a mac issue persay. The problem is being caused by the lombok bytecode post-processor. Apparently this part of the compilation process fails.

I'm somewhat limited by my options at this moment, but I'll pull out my macbook when I'm home to confirm this. I might ask you to give us a code example if reproduction isn't trivial.

@lombokissues
Collaborator

๐Ÿ‘ค fabrizio.giudici@tidalwave.it ย  ๐Ÿ•— Feb 10, 2012 at 09:50 UTC

I'm using Lombok (currently 0.10.6, but previously other versions) and it works fine on Mac OS X Lion and Linux. So I presume we should look at the source code that crashes.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Feb 11, 2012 at 16:46 UTC

Specifically it's a bug in ASM and not in lombok, which is going to make fixing this a little more problematic.

Lombok 0.10.8 uses a slightly newer version of ASM I believe (Roel - can you confirm that?). Maybe it was fixed there?

I've never been able to reproduce this. If you can reliably reproduce this error with a test case I'd love to see it. If not, I could try and make a version of lombok with a bunch of debug logging enabled so we can start figuring out what's causing this.

Current Status: Waiting for original reporter or someone else who is running into this bug to elaborate.

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 11, 2012 at 18:43 UTC

[i am the original reporter]
The error is definitely stil there and a showstopper for me. I don't have access to a laptop right now but hope to give you a test case next week or so.
There is nothing special about the test case there is just a lot of proprietary code that needs to be cleaned out.

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 16, 2012 at 07:37 UTC

After much trial and error, I managed to isolate a piece of code that (if I remove it)
makes it compile. The strange thing is that the code isn't anything special as far as I can tell.
The problem is still unresolved. Is there any way to debug this error?


import com.baw.emailsrvr.service.ResourceFactory;
import java.io.*;
+import java.util.logging.Level;
import lombok.Cleanup;

/**
@@ -98,7 +99,6 @@
}

  • @ SneakyThrows(SQLException.class)
    private void run()
    {
    boolean firstTime = true;
    @@ -144,7 +144,13 @@
    continue;
    }
    }

  •        rawEmailConnection = emailConnection.getMetaData().getConnection();
    
  •        try
    
  •        {
    
  •            rawEmailConnection = emailConnection.getMetaData().getConnection();
    
  •        } catch (SQLException ex)
    
  •        {
    
  •            Logger.getLogger(EmailServer.class.getName()).log(Level.SEVERE, null, ex);
    
  •        }
    
         log.info("Connected to Database");
         firstTime = false;
    

    @@ -529,7 +535,6 @@

    • @ throws FileNotFoundException
      */
      @ Override
  • @ SneakyThrows(IOException.class)
    public Properties loadPropertiesFromFile(String filename) throws FileNotFoundException
    {
    if(filename == null)
    @@ -537,9 +542,15 @@
    filename = defPropFile;
    }

  •    Properties props = new Properties();
    
  •    try
    
  •    {
     @ Cleanup InputStream in = readFile(filename);
    
  •    Properties props = new Properties();
    
  •    props.load(in);
    
  •        props.load(in);
    
  •    } catch (IOException ex)
    
  •    {
    
  •        Logger.getLogger(EmailServer.class.getName()).log(Level.SEVERE, null, ex);
    
  •    }
     return props;
    

    }

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 16, 2012 at 07:41 UTC

Unfortunately the code is proprietary and this patch is the best I can do as far as showing the code. I can tell you that there is nothing tricky about it, it's standard Java.

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 16, 2012 at 07:43 UTC

Also, FYI, I have javassist-3.15.0-GA on the class path, don't know if that could be affecting this.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Feb 16, 2012 at 09:03 UTC

It could be related. In lombok we use bytecode transformation when we the file is written to the disk if you use SneakyThrows to remove any call to Lombok.sneakyThrow, that is generated during the AST transformation.

So both javassist and lombok will modify the classfile.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Feb 16, 2012 at 09:12 UTC

In FixedClassWriter we've overwritten getCommonsuperType to return "java/lang/Object" if an Exception it thrown. In this case an Error is thrown. We could easily change this to catch Throwable or additionally catch java.lang.ClassFormatError, but I'm not sure if this solves the problem.

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Feb 16, 2012 at 10:09 UTC

I just tested without javassist, and the problem is still there. Sorry

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Feb 16, 2012 at 11:52 UTC

Weel, that might actually be good news.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Mar 19, 2012 at 22:59 UTC

We've added some debugging info to the ClassFormatError (actually, we create a new one). This code will be available in the next (edge) release.

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Mar 21, 2012 at 08:46 UTC

Just tried the latest trunk:

[INFO] Compiling 16 source files to /Volumes/Home/Users/lprimak/Documents/devel/ec_wks/baw/baw-email/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_29). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.ClassFormatError: Class.forName debug on java/util/Iterator: no issues
Class.forName debug on com/baw/emailsrvr/EmailServer: file size is 0

at lombok.bytecode.FixedClassWriter.getCommonSuperClass(FixedClassWriter.java:47)
at lombok.libs.org.objectweb.asm.ClassWriter.a(Unknown Source)
at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
at lombok.libs.org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
at lombok.libs.org.objectweb.asm.MethodVisitor.visitMaxs(Unknown Source)
at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
at lombok.bytecode.SneakyThrowsRemover.applyTransformations(SneakyThrowsRemover.java:71)
at lombok.core.PostCompiler.applyTransformations(PostCompiler.java:40)
at lombok.core.PostCompiler$1.close(PostCompiler.java:68)
at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1452)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:618)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1298)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1268)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:768)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:730)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
at com.sun.tools.javac.main.Main.compile(Main.java:270)
at com.sun.tools.javac.Main.compile(Main.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Bett-A-Way Parent Project ......................... SUCCESS [3.298s]
[INFO] Bett-A-Way E-Mail Server .......................... FAILURE [2.745s]
[INFO] Bett-A-Way Web Site ............................... SKIPPED
[INFO] Bett-A-Way Application Bundle ..................... SKIPPED
[INFO] Bett-A-Way Admin Utility .......................... SKIPPED
[INFO] Bett-A-Way Additional Dependencies ................ SKIPPED
[INFO] Bett-A-Way Root ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.647s
[INFO] Finished at: Wed Mar 21 04:44:08 EDT 2012
[INFO] Final Memory: 19M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project emailsrvr: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] An exception has occurred in the compiler (1.6.0_29). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
[ERROR] java.lang.ClassFormatError: Class.forName debug on java/util/Iterator: no issues
[ERROR] Class.forName debug on com/baw/emailsrvr/EmailServer: file size is 0
[ERROR]
[ERROR] at lombok.bytecode.FixedClassWriter.getCommonSuperClass(FixedClassWriter.java:47)
[ERROR] at lombok.libs.org.objectweb.asm.ClassWriter.a(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.Frame.a(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.MethodVisitor.visitMaxs(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
[ERROR] at lombok.libs.org.objectweb.asm.ClassReader.accept(Unknown Source)
[ERROR] at lombok.bytecode.SneakyThrowsRemover.applyTransformations(SneakyThrowsRemover.java:71)
[ERROR] at lombok.core.PostCompiler.applyTransformations(PostCompiler.java:40)
[ERROR] at lombok.core.PostCompiler$1.close(PostCompiler.java:68)
[ERROR] at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1452)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:618)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1298)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1268)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:768)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:730)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[ERROR] at com.sun.tools.javac.Main.compile(Main.java:87)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
[ERROR] at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
[ERROR] at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
[ERROR] at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :emailsrvr
blackbird:baw lprimak$

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Mar 26, 2012 at 19:52 UTC

Can you tell us about the class com.baw.emailsrvr.EmailServer ? Does the class file exist? Does it contain any lombok features? Is it generated by a different tool?

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Mar 26, 2012 at 20:21 UTC

Could it be that the class you're compiling the moment the error occurs IS actually com.baw.emailsrvr.EmailServer?

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Mar 26, 2012 at 21:07 UTC

Fixed in c49848a.

@lombokissues lombokissues removed the accepted label Jul 14, 2015
@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Mar 26, 2012 at 22:00 UTC

Comment 14 & 15: Yes, EmailServer is the class being compiled. Class file does not exist, Java file is being compiled into the class file, as it should be.

Yes, the patch in the comment 5 is the feature of Lombok that breaks the build in this file.

Am I assuming that you indeed found and fixed the problem? Should I test the trunk again?

Thanks

@lombokissues
Collaborator

๐Ÿ‘ค lennyprimak ย  ๐Ÿ•— Mar 26, 2012 at 23:54 UTC

This indeed fixes my issue.
Thanks for getting the fix in!

@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment