lombok 1.14.0 Can't get the root cause of error with @Builder

1,129 views
Skip to first unread message

Serega Sheypak

unread,
Jun 1, 2014, 10:09:51 AM6/1/14
to project...@googlegroups.com
Hi, I'm refactoring old legacy code using Lombok. I'm trying to decouple model entities.
Here is part of class:

public class VisitData {
//some fields goes here

@Builder
    public VisitData(String id, int idSite, String url, String urlRef, BrowserFeatures browserFeatures, String actionName, String cs, String event, int productId, RClickData clickData, RViewData viewData, SaleData saleData) {
        this.id = id;
        this.idSite = idSite;
        this.url = url;
        this.urlRef = urlRef;
        this.browserFeatures = browserFeatures;
        this.actionName = actionName;
        this.cs = cs;
        this.event = event;
        this.rClickData = clickData;
        this.rViewData = viewData;
        this.saleData = saleData;
        this.productId = productId;
    }

Error:
java.lang.IllegalArgumentException: URI is not absolute
at java.io.File.<init>(File.java:361)
at lombok.core.configuration.FileSystemSourceCache.sourcesForJavaFile(FileSystemSourceCache.java:47)
at lombok.core.LombokConfiguration$1.createResolver(LombokConfiguration.java:50)
at lombok.core.LombokConfiguration.read(LombokConfiguration.java:44)
at lombok.core.AST.readConfiguration(AST.java:422)
at lombok.core.handlers.HandlerUtil.handleFlagUsage(HandlerUtil.java:105)
at lombok.core.handlers.HandlerUtil.handleExperimentalFlagUsage(HandlerUtil.java:101)
at lombok.javac.handlers.HandleBuilder.handle(HandleBuilder.java:68)
at lombok.javac.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:107)
at lombok.javac.HandlerLibrary.handleAnnotation(HandlerLibrary.java:242)
at lombok.javac.JavacTransformer$AnnotationVisitor.visitAnnotationOnMethod(JavacTransformer.java:96)
at lombok.javac.JavacNode.traverse(JavacNode.java:118)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:123)
at lombok.javac.JavacNode.traverse(JavacNode.java:85)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:123)
at lombok.javac.JavacNode.traverse(JavacNode.java:75)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:123)
at lombok.javac.JavacNode.traverse(JavacNode.java:70)
at lombok.javac.JavacAST.traverse(JavacAST.java:119)
at lombok.javac.JavacTransformer.transform(JavacTransformer.java:70)
at lombok.javac.apt.Processor.process(Processor.java:250)
at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:115)
at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:165)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:627)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:556)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:701)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:987)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:113)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:170)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:684)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118)
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:320)
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] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] error: Lombok annotation handler class lombok.javac.handlers.HandleBuilder failed on VisitData.java: java.lang.IllegalArgumentException: URI is not absolute
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE


Wht do I do wrong?

Martin Grajcar

unread,
Jun 1, 2014, 1:49:56 PM6/1/14
to project...@googlegroups.com
On Sun, Jun 1, 2014 at 4:09 PM, Serega Sheypak <serega....@gmail.com> wrote:
Wht do I do wrong?

You're not saying what version you're using.

But I can see it. You're not using the most recent one. You're running into issue 683.

Version v1.14.0 would do, but v1.14.2 will come soon with a fix for a new bug with generating null checks for @Nonnull.

Serega Sheypak

unread,
Jun 1, 2014, 2:22:42 PM6/1/14
to project...@googlegroups.com
Hi! Thanks for your reply.
The version is  v1.14.0 (maven dependency). I use only @Builder annotation. Is there any workaround for this problem? I've used @Builder in more than 10 projects and there were no problems absolutely. Only pure satisfaction.

воскресенье, 1 июня 2014 г., 21:49:56 UTC+4 пользователь Maaartin G написал:

Martin Grajcar

unread,
Jun 1, 2014, 3:54:51 PM6/1/14
to project...@googlegroups.com
Sorry, I mixed up the versions badly! Now I see that 683 has been fixed after 1.14.0 (where it actually came in). I'd suggest to either wait for the new version or take an older one.

The other possibilities mean more work: build the version yourself from the git repository or change the CLASSPATH so that the URI gets absolute (no idea how).



--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Serega Sheypak

unread,
Jun 2, 2014, 2:25:36 AM6/2/14
to project...@googlegroups.com
I took 1.12.6, it works. Waiting for the new release :)


--
You received this message because you are subscribed to a topic in the Google Groups "Project Lombok" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/project-lombok/tsyzHe4Hrsg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to project-lombo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages