Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In some mvn builds, you get 'URI not absolute' errors. #718

Closed
lombokissues opened this issue Jul 14, 2015 · 22 comments
Closed

In some mvn builds, you get 'URI not absolute' errors. #718

lombokissues opened this issue Jul 14, 2015 · 22 comments
Labels
accepted The issue/enhancement is valid, sensible, and explained in sufficient detail

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 683)

@lombokissues
Copy link
Author

👤 reinierz   🕗 May 29, 2014 at 18:11 UTC

Stack trace:

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.HandleFieldDefaults.handle(HandleFieldDefaults.java:101)
at lombok.javac.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:107)
at lombok.javac.HandlerLibrary.handleAnnotation(HandlerLibrary.java:242)
at lombok.javac.JavacTransformer$AnnotationVisitor.visitAnnotationOnType(JavacTransformer.java:86)
at lombok.javac.JavacNode.traverse(JavacNode.java:112)
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:115)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

@lombokissues
Copy link
Author

👤 Serega.Sheypak   🕗 Jun 01, 2014 at 18:26 UTC

Hi, is there any workaround? I met in in version 1.14.0

@lombokissues
Copy link
Author

👤 rgransberger@gmx.de   🕗 Jun 03, 2014 at 19:25 UTC

This is not only related to Maven builds. I also get this error a couple of times. I changed my local lombok code to see which URIs have been passed to the method.

As you can see it tries to resolve URIs specific to Rational Team Concert version control. I got hundreds of these while building.

java.lang.IllegalArgumentException: File: sourcecontrol://jazz/default/de.xyz/src/de/XYZ.java
at lombok.core.configuration.FileSystemSourceCache.sourcesForJavaFile(FileSystemSourceCache.java:55)
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:91)
at lombok.eclipse.handlers.HandleGetter.handle(HandleGetter.java:136)
....

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Jun 06, 2014 at 00:11 UTC

@lombokissues lombokissues added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

👤 r.spilker   🕗 Jun 11, 2014 at 09:34 UTC

Issue #725 has been merged into this issue.

@lombokissues
Copy link
Author

👤 sis.yoshiday   🕗 Jun 16, 2014 at 03:53 UTC

I got below log on lombok 1.14.2, Android project (Gradle build)

Somehow ended up with a relative path. This is a bug that the lombok authors cannot reproduce, so please help us out! Is this path: "file:/Users/path/to/my/file.java" the correct absolute path for resource "/Users/path/to/my/file.java"? If yes, or no, please report back to: issue #718 and let us know. Thanks!

I think there are same path ( with the exception of "file" scheme )

@lombokissues
Copy link
Author

👤 wordymusic   🕗 Jun 20, 2014 at 00:19 UTC

"Somehow ended up with a relative path. This is a bug that the lombok authors cannot reproduce, so please help us out! Is this path: (etc)" Yep, correct path.

@lombokissues
Copy link
Author

👤 spierce7   🕗 Jun 21, 2014 at 04:31 UTC

Yes the paths are matching for me.

It's probably worth mentioning I'm using IntelliJ and OSX. I'm also building for Android.

@lombokissues
Copy link
Author

👤 glenn@ensquared.net   🕗 Jun 23, 2014 at 00:11 UTC

Paths match for me.

$ mvn --version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T04:37:52+10:00)
Maven home: /usr/local/Cellar/maven/3.2.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"

@lombokissues
Copy link
Author

👤 michal.kara   🕗 Jun 23, 2014 at 19:40 UTC

Got this too. Paths match. Version:

Apache Maven 2.2.1 (rdebian-6)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.0.0-16-virtual" arch: "amd64" Family: "unix"

Seems to me this happens when I have @ Getter / @ Setter annotations on static inner classes.

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Jun 26, 2014 at 09:07 UTC

We've made some changes and published an edge release. Any feedback is much appreciated. To download the edge: https://projectlombok.org/download-edge.html

@lombokissues
Copy link
Author

👤 ben.lister   🕗 Jun 26, 2014 at 16:05 UTC

Yep, happens for me too. Paths match.

The class is an Android activity, and has a simple field declaration, with no calls to the (generated) accessors.

@ Getter
@ Setter
private String foo = "bar";

"Somehow ended up with a relative path. This is a bug that the lombok authors cannot reproduce, so please help us out! Is this path: ..."

I also got this one at the same time, not sure yet if it's related:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:501)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:276)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:490)
...

@lombokissues
Copy link
Author

👤 ben.lister   🕗 Jun 26, 2014 at 16:12 UTC

A few extra nuggets:

  • The edge build (downloaded moments ago) fixes the relative path issue for me.
  • The original issue occurred on a Mac, but not on my colleagues' windows PCs with the same code.
  • The original issue only occurred if I didn't make a call to either the getter/setter. As soon as I had a call to the getter in my code, the error went away.

Thanks for pushing the patch!

B

@lombokissues
Copy link
Author

👤 steff.nicolas   🕗 Jun 29, 2014 at 07:55 UTC

I experienced this error as well. If I don't use @ Getter, the error goes away. I tried to call my getter from tests as suggested by ﹟15 but the error didn't disappear. But it was from tests, not from main code.

Hope that helps.

@lombokissues
Copy link
Author

👤 steff.nicolas   🕗 Jun 29, 2014 at 07:56 UTC

About the edge, I would suggest deploying a snapshot so that maven users can switch rapidly to edge versions.

@lombokissues
Copy link
Author

👤 slonce.69a   🕗 Jul 01, 2014 at 18:14 UTC

In my situation it was while building by Jenkins. Locally build error was accurate, and not regarding Lombok.
Paths were ok. There was only build error and it looked like lombok caught exception like it was their fault, but the problem was somewhere else.

@lombokissues
Copy link
Author

👤 slonce.69a   🕗 Jul 01, 2014 at 18:18 UTC

I have to add that I didn't have the exception, only statement:
Somehow ended up with a relative path. This is a bug that the lombok authors cannot reproduce, so please help us out! Is this path: "file:/a/b/c.java"
the correct absolute path for resource "/a/b/c.java"? If yes, or no, please report back to: issue #718 and let us know. Thanks!

@lombokissues
Copy link
Author

👤 steven@fullcontact.com   🕗 Jul 28, 2014 at 17:12 UTC

I'm also getting tons of the "Somehow ended up with a relative path. This is a bug that the lombok authors cannot reproduce, so please help us out" messages, but build appears successful. This only happens on a jenkins gradle 1.9 build, if that helps.

@lombokissues
Copy link
Author

👤 steve.a.block   🕗 Apr 09, 2015 at 01:08 UTC

It sounds like this has been fixed in the edge release mentioned by r.spilker on 2014-06-26.

Has the fix been included in a regular release, and if so, which one?

@lombokissues
Copy link
Author

👤 reinierz   🕗 May 15, 2015 at 10:34 UTC

Yeah, lots of em. The changelog has dates, so probably lombok v1.14.0 and up has this fix.

See:

https://projectlombok.org/changelog.html

ACTION: Mark as 'verified' if no further feedback by Jun 1st, 2015.

@lombokissues
Copy link
Author

End of migration

@rzwitserloot
Copy link
Collaborator

Sounds like this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue/enhancement is valid, sensible, and explained in sufficient detail
Projects
None yet
Development

No branches or pull requests

2 participants