-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty temp directory used while resolving spring config #11632
Comments
It is not expected behaviour. We made some changes in #11568 to fix some issues with relative resource resolution. However, it looks like we have broken absolute resource resolution at the same time? @joakime @janbartel @lorban Actually, whilst I think this is broken, I'm not sure how any of the changes in 12.0.8 could have affected it as they were about resources, whilst I see that public static String resolvePath(String dir, String destPath)
{
if (StringUtil.isEmpty(dir) || StringUtil.isEmpty(destPath))
return null;
return Paths.get(dir).resolve(destPath).normalize().toString();
} Firstly, I think this is another mistaken use of Note that this is invoked by the XML in <Set name="TrustStorePath">
<Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration">
<Arg><Property name="jetty.base"/></Arg>
<Arg><Property name="jetty.sslContext.trustStorePath" deprecated="jetty.sslContext.trustStoreAbsolutePath,jetty.truststore" /></Arg>
</Call>
</Set> So the invocation of the But let's investigate a bit more to see exactly what changed before we say exactly how to work around it. |
@gregw found this on unix |
@gregw I think that what you are referring to and what @ovidijusnortal is referring to are different things. The OP is having issues with his project at https://github.com/nordic-institute/X-Road/ This was first noticed by OP's project when going from 12.0.6 to 12.0.8 The use of The Which is eventually used in a class This doesn't seem to be the path that is of concern. The OP shows us the full (presumably bad) path of If we check the configuration of
That looks like standard spring-boot configuration for a server. The project seems to be using spring-boot version 3.2.3 (at the time of the testing of that dependabot update from 12.0.6 to 12.0.8) Looking at spring-boot project, they have not yet updated / tested on Jetty 12.0.8 |
same with spring boot 3.2.4 version. Spring boot right now is on 12.0.7 if I'm correct. |
Of note, this behavior has been reported to spring-boot before.
Judging from the comments in those issues, it looks like if you specify the configuration using URI syntax it will work as intended ...
|
@joakime @ovidijusnortal so it appears that this is a Spring issue, not a Jetty issue, thus can we close this issue? |
Jetty Version
12.0.8
Jetty Environment
Spring Boot 3.2.4
Java Version
17
Question
After upgrading to jetty 12.0.8 we have an issue: when spring tries to resolve configuration DTO with field like this
private Path apiTrustStore;
instead of using value as is in our case/etc/xroad/ssl/center-admin-service.p12
we get this:/tmp/jetty-docbase.8085.8617281078912905990/etc/xroad/ssl/center-admin-service.p12
.Is this expected behavior? if yes is there a way to disable it?
The text was updated successfully, but these errors were encountered: