Hi David,

Have you tried using the static methods on WebAppContext:
addSystemClasses(Server server, String... patterns) and
addServerClasses(Server server, String... patterns)? I believe the method
signature is the same for jetty-9 and jetty-10/11.

cheers
Jan

On Tue, 8 Dec 2020 at 17:33, David Karlsen <[email protected]> wrote:

> I have this descriptor:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE Configure PUBLIC
>   "-//Mort Bay Consulting//DTD Configure//EN"
>   "http://www.eclipse.org/jetty/configure.dtd";>
> <Configure class="org.eclipse.jetty.webapp.WebAppContext">
>  <Set name="contextPath">/finods</Set>
>  <Set name="parentLoaderPriority">true</Set>
>  <Get name="serverClasspathPattern">
>   <Call name="add">
>    <Arg>-org.eclipse.jetty.server.</Arg>
>   </Call>
>   <Call name="add">
>    <Arg>-org.eclipse.jetty.util.thread.</Arg>
>   </Call>
>  </Get>
> </Configure>
>
> which works on 9.x, but on 10 I get:
>
> .e.j.w.WebAppContext@1d470d0
> {ccm-finodsping-dist-5.0.4-SNAPSHOT,/finods,file:///eos/d1/amw-virus-scan-ws/i1/tmp/jetty-0_0_0_0-20261-ccm-finodsping-dist-5_0_4-SNAPSHOT_war-_ccm-finodsping-dist-5_0_4-SNAPSHOT-any-2186630068394942064/webapp/,UNAVAILABLE}{/eos/d1/amw-virus-scan-ws/i1/releases/1.0.15-TEST/webapps/ccm-finodsping-dist-5.0.4-SNAPSHOT.war}
> java.lang.NoSuchFieldException: serverClasspathPattern
> at java.base/java.lang.Class.getField(Class.java:1999)
> at
> org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:856)
> at
> org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:456)
> at
> org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:369)
> at
> org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:308)
> at
> org.eclipse.jetty.webapp.JettyWebXmlConfiguration.lambda$configure$0(JettyWebXmlConfiguration.java:86)
> at org.eclipse.jetty.webapp.WebAppClassLoader.runWithServerClassAcc
>
> It seems in 10.x this is replaced with a serverClassMatcher which is a
> ClassMatcher.
>
> Is there any way to write a descriptor so that it's compatible with jetty9
> and 10 at the same time?
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>


-- 
Jan Bartel <[email protected]>
www.webtide.com
*Expert assistance from the creators of Jetty and CometD*
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to