-
Notifications
You must be signed in to change notification settings - Fork 41.7k
fixed jetty9 MalformedURLException for Jar files #2245
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
Conversation
|
Could you please attach the stacktrace? Also do you have an example application? I've tried to make the Jetty sample fail in the same way but without any luck so far. |
|
Jetty has JarResource as well. The usage: The implementation of it: It is probably a better idea to rely on their JarResource implementation. Do want me to update PR? |
|
That does look safer. Yes please. |
2c3dca5 to
3a60944
Compare
3a60944 to
67df7d9
Compare
|
I have updated. |
|
Cheers, I'm still interested in a sample app if you have one? |
|
I am actually in process for migrating a huge application code base. Basically, I have executable jetty9 application and trying to run at command line: I will try to provide a sample application. |
|
Thanks, I tried changing the spring-boot-jetty-sample but I couldn't replicate the exception. I've probably just not triggered that code path yet. |
|
Shortly: Change your Details: Yes, you have not triggered because I think there still a mistake. And this is just checking files ending with ".war". I think that ".jar" files must be supported as well. |
|
Here are the changes I made on top of 1.2.0-RELEASE |
|
Cheers, I'll give that a go. The |
|
I have been using jar files as an executable file. So this is not good practice in spring boot world, right? |
|
No, that is good practice. It's just that the |
|
I am using a different layout than classic one. I put JSP files under |
|
JSPs do tend to cause problems. I don't think that we can change the |
|
You are right. It is better to let developer this choice by a |
* fix-jetty9-jar-url: Fix potential Jetty MalformedURLException
Update JettyEmbeddedServletContainerFactory to use the JarResource class to create the base resource. This prevents a potential "java.lang.NullPointerException: no !/ in spec" error which can occur when using shaded executable jars. Fixes spring-projectsgh-2245
My Jetty 9 application throws
java.net.MalformedURLException: no !/ in spec. It seems that/required at the end of url.I have signed CLA.