question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stop spurious warnings when using a pathing jar

See original GitHub issue

I’m new to Spring, on a team developing on Windows.

To work around issues on Windows and the command line limit of 32767 characters, the concept of a “pathing jar” was created. I first came across it at http://tuhrig.de/gradles-bootrun-and-windows-command-length-limit/. This also seems to be an integrated option in at least one IDE (IntelliJ).

However, when a pathing jar is used with Spring, it results in many spurious warnings about entries not existing, e.g. https://github.com/spring-projects/spring-boot/issues/10111

The relevant code is here in the master branch:

https://github.com/spring-projects/spring-boot/blob/35c6b83fce86a83e4b2b9ec9fb5cbe0646eb23a5/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ChangeableUrls.java#L162-L185

The warnings happen because the code always tries to fixup each classpath entry, believing they always represent relative URLs. I would suggest that this check be changed slightly, to use File.isAbsolute() to see if the entry is already an absolute path, when building the referenced URL.

Is that a change that makes sense to make, and would it be accepted?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thauk-copperleafcommented, Nov 17, 2017

Thanks for the help. Closing ticket and hoping that others who run into this problem find it with their favourite search engine 😃

0reactions
thauk-copperleafcommented, Nov 17, 2017

@wilkinsona Thanks for the replies this morning. 😃

I originally tried not stripping the file:// scheme, with 1.5.6, and it didn’t help. I have a log from that run, but perhaps I ran it incorrectly. The log above is from a run with 1.5.8 and stripping the scheme.

Updating our build to 1.5.8 and not stripping the scheme seems to work fine on Windows 7. I’ve just asked that coworkers test on the other 3 platforms we use to ensure our build is working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warnings in .jar file creation - java - Stack Overflow
1 Answer 1 ... ojdbc5.jar contains "Classes for use with JDK 1.5.". Both couldn't be needed,just whichever one is compatible with the oldest...
Read more >
Common Rpmlint issues - Fedora Project Wiki
This is a collection of information on dealing with rpmlint. Note that if you are confused by an rpmlint warning, the first thing...
Read more >
When using CCD_CLASSPATH environment variable to ... - IBM
When using CCD_CLASSPATH environment variable to compile Java classes, you may get warnings about few .jar files not found.
Read more >
spotbugs Documentation - Read the Docs
SpotBugs is a program to find bugs in Java programs. It looks for instances of “bug patterns” — code instances that are likely...
Read more >
Custom pluggable types for ... - The Checker Framework Manual
The “checker.jar” should be literal — don't provide a path. ... The Fake Enum Checker can issue a compile-time warning if the programmer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found