jetty.project
jetty.project copied to clipboard
Config error java.lang.reflect.InvocationTargetException while using SymlinkAllowedResourceAliasChecker
trafficstars
Jetty version(s)
12.0.17 Jetty Environment
ee9
Java version/vendor (use: java -version)
20.0.2
OS type/version
Linux/Windows
Description
Below is my jetty-web.xml file where i want to use the SymlinkAllowedResourceAliasChecker. When configuring like below I am getting below exception,
`
<Call name="addAliasCheck">
<Arg>
<New class="org.eclipse.jetty.server.SymlinkAllowedResourceAliasChecker">
<Arg>
<Ref refid="ContextHandler"/>
</Arg>
</Arg>
</Call>
<Get name="securityHandler">
<Set name="authenticatorFactory">
<New class="com.project.app.jetty.AppAuthenticatorFactory">
<Set name="loginPage">/login</Set>
<Set name="defaultApp">/testApp</Set>
<!-- comma delimited set of paths that are root pages other than index.html -->
<Set name="rootPages">testApp.html</Set>
<!-- comma delimited set of paths that will not get redirected to login page
but instead return HTTP 401 -->
<Set name="ExcludeRedirect">/rest</Set>
<!-- typically once the browser has authenticated, the auth string isn't required for future calls
set this to have paths always authenticated on each call. comman delimited set of paths
-->
<Set name="AuthAlways">/rest</Set>
</New>
</Set>
</Get>
2025-05-16 12:37:40.012:WARN :oejx.XmlConfiguration:main: Config error java.lang.reflect.InvocationTargetException at <Call name="addAliasCheck"><Arg>| ???<New class="org.eclipse.jetty.server.SymlinkAllowedResourceAliasChecker"><Arg>|?? <Ref refid="ContextHandler"/>|?? </Arg></New>|??</Arg></Call>
Requesting your assistance about proper way to configure the SymlinkAllowedResourceAliasChecker.
How to reproduce?