Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] java.lang.NoSuchFieldException: serverClasspathPattern

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?
--

Back to the top