-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
spring-boot-loader: URL stream handler regression #7581
Comments
Can you please provide a small sample that reproduces the problem? |
You can find a sample here: https://github.com/DrVanScott/spring-boot-loader-7581 After building you can run the example with
You can observe the following behaviour:
|
Thanks for the sample, I've reproduced the problem. |
While the behaviour has changed and something that worked previously does not, I think that's actually a good thing. Allow me to explain. The change in behaviour was introduced in d20ac56. The intent of this commit was to align the behaviour of our URL stream handler for jar URLs with that of the JDK's. The JDK's URL stream handler rejects both You can verify by using Maven's shade plugin to build your jar: <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.example.DemoApplication</mainClass>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build> This produces the following results:
As you can see, the two values that are successful are |
I totally agree. Thanks for clarification! |
Affected version: v1.4.2.RELEASE
Last working version: v1.4.1.RELEASE
I use
org.springframework.boot.loader.PropertiesLauncher
to start my program. Using v1.4.1 it was possible to configure log4j by specifyingUsing v1.4.2 this results in the following exception:
The problem has been introduced by one of the following commits:
Please note that the above exception is also thrown in v1.4.1 if the specified configuration file cannot be found on the classpath. ("unknown protocol" instead of "file not found"...)
Here you can find details about the log4j "classpath" feature: https://issues.apache.org/jira/browse/LOG4J2-395
The text was updated successfully, but these errors were encountered: