-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
classNotFoundException:org.eclipse.jetty.ee10.webapp.WebAppContext #12100
Comments
Please add the output of:
|
@fgolzari please do not add images that are half cropped and provide no information. Copy/paste the output as text and attach the output to this issue. |
@sbordet Unfortunately, I am working on a server that has closed access to copy and I can only take screenshots |
|
There appear to be no enabled modules, so there are no Jetty components. You likely have a misconfiguration. |
@sbordet
and in the log of jetty, I see these lines, These do not mean that the module is added to the project?
|
This is way too customized to understand what's going on. Again, it's a problem with your setup, but I cannot tell you where, as you are doing things in the non-idiomatic Jetty way. Even the logs are not Jetty's, so please double-check your class-path. While |
@sbordet Is there anything similar to these samples for jetty 12 configs? https://github.com/jetty/jetty.project/blob/jetty-11.0.6/jetty-server/src/main/config/etc/jetty.xml |
@fgolzari you cannot reference
|
@janbartel Thank you very much for your answer |
@fgolzari
I don't think you need to change the It seems to me that your app might have accumulated a bunch of cruft over time that is hampering your ability to upgrade - you seem to be trying to replicate stuff that jetty does for you automatically, but based on some older versions of jetty. That means that you are configuring some things that are not used and some that are not necessary, and some things incorrectly. I would have a good long look at your |
@janbartel jetty.xml file
|
Well, as I said earlier, you can't reference |
@fgolzari do not use your I cannot emphasize this enough! Your desired configuration is effectively 100% custom and getting support will be incredibly difficult. Lets look at your jetty.xml in detail. If you are using jetty-home and jetty-base then do not use this mess of a jetty.xml <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server"> <Get name="ThreadPool" id="pool">
<Set name="minThreads" type="int">10</Set>
<Set name="maxThreads" type="int">500</Set>
<Set name="idleTimeout" type="int">10000</Set>
<Set name="detailedDump">false</Set>
</Get> This is incomplete <Call class="com.chmail.common.jetty.JettyMonitor" name="setThreadPool">
<Arg><Ref refid="pool"/></Arg>
</Call> This can exist as a custom module with XML in your jetty-base. <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Set name="outputBufferSize">32768</Set>
<Set name="requestHeaderSize">8192</Set>
<Set name="responseHeaderSize">8192</Set>
<Set name="sendServerVersion">false</Set>
<Set name="sendDateHeader">true</Set>
<Set name="headerCacheSize">512</Set>
<Set name="securePort">8443</Set>
<Call name="addCustomizer">
<Arg>
<New class="org.eclipse.jetty.server.ForwardedRequestCustomizer">
<Set name="forwardedForHeader">bogus</Set>
<Set name="forwardedPortAsAuthority">false</Set>
</New>
</Arg>
</Call>
</New> This is incomplete and is handled by the <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Arg>
<Ref refid="httpConfig" />
</Arg>
<Call name="addCustomizer">
<Arg>
<New class="org.eclipse.jetty.server.SecureRequestCustomizer" />
</Arg>
</Call>
</New> This is also incompleted. <Call id="httpConnector" name="addConnector">
<Arg>
<New id="http" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="httpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"></Set>
<Set name="port">8081</Set>
<Set name="idleTimeout">60000</Set>
</New>
</Arg>
</Call> This is also incomplete. <New id="chmailSslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
<Set name="KeyStorePath">
<SystemProperty name="jetty.base" default="," />/etc/keystore
</Set>
<Set name="KeyStorePassword">**</Set>
<Set name="KeyManagerPassword">**</Set>
<Set name="EndpointIdentificationAlgorithm"></Set>
<Set name="renegotiationAllowed">TRUE</Set>
<Set name="IncludeProtocols">
<Array type="java.lang.String">
<Item>SSLv2Hello</Item>
<Item>TLSv1</Item>
<Item>TLSv1.1</Item>
<Item>TLSv1.2</Item>
</Array>
</Set>
<Set name="ExcludeCipherSuites">
<Array type="java.lang.String">
<Item>.* RC4 *</Item>
</Array>
</Set>
</New> This is incomplete as well. This is handled by the <Call id="httpsConnector" name="addConnector">
<Arg>
<New id="ssl" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="sslContextFactory">
<Ref refid="chmailSslContextFactory" />
</Arg>
<Arg name="next">http/1.1</Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="sslHttpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"></Set>
<Set name="port">8443</Set>
<Set name="idleTimeout">60000</Set>
</New>
</Arg>
</Call> This is also incomplete. <Call id="adminHttpsConnector" name="addConnector">
<Arg>
<New id="admin" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="sslContextFactory">
<Ref refid="chmailSslContextFactory" />
</Arg>
<Arg name="next">http/1.1</Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="sslHttpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"></Set>
<Set name="port">7073</Set>
<Set name="idleTimeout">0</Set>
</New>
</Arg>
</Call> <Call id="mtaAdminHttpsConnector" name="addConnector">
<Arg>
<New id="mtaAdmin" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="sslContextFactory">
<Ref refid="chmailSslContextFactory" />
</Arg>
<Arg name="next">http/1.1</Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="sslHttpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"></Set>
<Set name="port">7075</Set>
<Set name="idleTimeout">0</Set>
</New>
</Arg>
</Call> This is an incomplete declaration. <Call id="extConnector" name="addConnector">
<Arg>
<New id="ext" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="sslContextFactory">
<Ref refid="chmailSslContextFactory" />
</Arg>
<Arg name="next">http/1.1</Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="sslHttpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"></Set>
<Set name="port">7078</Set>
<Set name="idleTimeout">60000</Set>
</New>
</Arg>
</Call> This is also an incomplete declaration. <Set name="handler">
<New id="rewirethandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="originalPathAttribute">requestedPath</Set>
<!--<Call name="addRule"><arg><New class="org.eclipse.jetty.rewrite.handler.MsieSslRule"/></Arg></Call>-->
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.CompactPathRule"/>
</Arg>
</Call>
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/Microsoft-Server-ActiveSync/*</Set>
<Set name="replacement">/service/ext/ch</Set>
</New>
</Arg>
</Call>
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewriteRegexRule">
<Set name="regex">(?i)/ews/Exchange.asmx/*</Set>
<Set name="replacement">/service/ext/ch</Set>
</New>
</Arg>
</Call>
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">//*</Set>
<Set name="replacement">/</Set>
<Set name="terminating">true</Set>
</New>
</Arg>
</Call>
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/*</Set>
<Set name="replacement">/</Set>
</New>
</Arg>
</Call>
<Set name="handler">
<New id="collectionHandler" class="org.eclipse.jetty.server.Handler.Sequence">
<Arg name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>
</Array>
</Arg>
</New>
</Set>
</Set> This is also incomplete. <Array id="plusConfig" type="java.lang.String">
<Item>org.eclipse.jetty.eel0.webapp.WebInfConfiguration</Item>
<Item>org.eclipse.jetty.eel0.webapp.WebXmlConfiguration</Item>
<Item>org.eclipse.jetty.eel0.webapp.MetaInfConfiguration</Item>
<Item>org.eclipse.jetty.eel0.webapp.FragmentConfiguration</Item>
<Item>org.eclipse.jetty.eel0.plus.webapp.EmvConfiguration</Item>
<Item>org.eclipse.jetty.eel0.plus.webapp.PlusConfiguration</Item>
<Item>org.eclipse.jetty.eel0.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.eel0.webapp.JettyWebXmlConfiguration</Item>
</Array> This has no effect, nothing in Jetty uses this. In fact, all of these declarations are even bad (they have typos and some don't even exist) <New id="service" class="org.eclipse.jetty.eel0.webapp.WebAppContext">
<Arg>
<Ref refid="Contexts"/>
</Arg>
<Arg name="webApp">
<SystemProperty name="jetty.base" default="."/>/webapps/service
</Arg>
<Arg name="contextpath">/service</Arg>
<Set name="configurationClasses">
<Ref refid="plusConfig"/>
</Set>
<Set name="defaultsDescriptor">
<SystemProperty name="jetty.base" default="."/>/etc/webdefault-eel0.xml
</Set>
<Set name="tempDirectory">
<SystemProperty name="jetty.base" default="."/>/work/service
</Set>
<Set name="compactPath">true</Set>
<Get name="errorHandler">
<Call name="setShowStacks">
<Arg type="boolean">false</Arg>
</Call>
</Get>
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<arg>.*/.*jsp-api-[^/]*\.jar$</arg>
</Call>
</New> This cannot exist here. <Call name="setAttribute">
<Arg>org.eclipse.jetty.eel0.webapp.systemClasses</Arg>
<Arg>
<Array type="java.lang.String">
<Item>java.</Item>
<Item>javax.</Item>
<Item>jakarta.</Item>
<Item>org.xml.</Item>
<Item>org.w3c.</Item>
<Item>org.apache.commons.logging.</Item>
<Item>org.eclipse.jetty.jndi.</Item>
<Item>org.eclipse.jetty.security.jaas.</Item>
<Item>org.eclipse.jetty.websocket.</Item>
<Item>org.eclipse.jetty.eel0.websocket.</Item>
<Item>org.eclipse.jetty.eel0.servlet.</Item>
<Item>org.eclipse.jetty.eel0.servlets.</Item>
<Item>org.eclipse.jetty.server.</Item>
<Item>org.eclipse.jetty.io.</Item>
<Item>org.eclipse.jetty.http.</Item>
<Item>org.eclipse.jetty.security.</Item>
<Item>org.eclipse.jetty.util.</Item>
</Array>
</Arg>
</Call> This has no impact on Jetty, that attribute name doesn't exist on Jetty 12. <Call name="setAttribute">
<Arg>org.eclipse.jetty.eel0.webapp.serverClasses</Arg>
<Arg>
<Array type="java.lang.String">
<Item>-org.eclipse.jetty.jndi.</Item>
<Item>-org.eclipse.jetty.security.jaas.</Item>
<Item>-org.eclipse.jetty.websocket.</Item>
<Item>-org.eclipse.jetty.eel0.websocket.</Item>
<Item>-org.eclipse.jetty.eel0.servlet.</Item>
<Item>-org.eclipse.jetty.eel0.servlets.</Item>
<Item>-org.eclipse.jetty.server.</Item>
<Item>-org.eclipse.jetty.io.</Item>
<Item>-org.eclipse.jetty.http.</Item>
<Item>-org.eclipse.jetty.security.</Item>
<Item>-org.eclipse.jetty.util.</Item>
<Item>-org.eclipse.jetty.eel0.apache.</Item>
<Item>org.eclipse.jetty.</Item>
</Array>
</Arg>
</Call> This has no impact on Jetty, that attribute name also doesn't exist on Jetty 12. <Call name="setAttribute">
<Arg>org.eclipse.jetty.server.Request.maxFormContentSize</Arg>
<Arg>200000</Arg>
</Call> This has no effect on Jetty 12. <New id="logWriter" class="org.eclipse.jetty.server.RequestLogWriter">
<Arg>
<SystemProperty name="jetty.base" default="."/>/logs/access_log.yyyy_mm_dd
</Arg>
<Set name="retainDays">30</Set>
<Set name="append">true</Set>
<Set name="filenameDateFormat">yyyy-MM-dd</Set>
</New>
<Set name="requestLog">
<New id="Requestlog" class="org.eclipse.jetty.server.CustomRequestLog">
<Arg><Ref refid="logWriter"/></Arg>
<Arg><Call name="EXTENDED_NCSA_FORMAT" class="org.eclipse.jetty.server.CustomRequestLog"/></Arg>
<Arg>%(client)a %r %s %b "%{Referer}i" "%{User-Agent}i"</Arg>
</New>
</Set> This is incomplete. <!-- HTTPCOMPRESSIONBEGIN -->
<Get id="next" name="handler"/>
<Set name="handler">
<New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
<Set name="handler"><Ref refid="next"/></Set>
<Set name="minGzipSize"><Property name="jetty.gzip.minGzipSize" deprecated="gzip.minGzipSize" default="2048"/></Set>
<Set name="includedMethods">
<Array type="String">
<Item>GET</Item>
<Item>POST</Item>
</Array>
</Set>
</New>
</Set> This is also incomplete. <Set name="stopAtShutdown">true</Set> This is handled by the <Ref refid="http">
<Call name="open"/>
</Ref>
<Configure>
<Ref refid="ssl">
<Call name="open"/>
</Ref>
<Ref refid="admin">
<Call name="open"/>
</Ref>
</Configure> This XML snippet is bad/broken to begin with. |
@joakime you are amazing. You are an angel, you helped me a lot, thank you very very much now jetty log gives this error:
jetyy-ssl.xml: <?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addConnector">
<Arg>
-->
<New id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server"><Ref refid="Server" /></Arg>
<Arg name="acceptors" type="int"><Property name="jetty.ssl.acceptors" default="1"/></Arg>
<Arg name="selectors" type="int"><Property name="jetty.ssl.selectors" default="-1"/></Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="sslContextFactory">
<Ref refid="sslContextFactory" />
</Arg>
<Arg name="next">http/1.1</Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="sslHttpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host" property="jetty.ssl.host"/>
<Set name="port"><Property name="jetty.ssl.port" default="8443" /></Set>
<Set name="idleTimeout"><Property name="jetty.ssl.idleTimeout" default="30000"/></Set>
<Set name="acceptorPriorityDelta" property="jetty.ssl.acceptorPriorityDelta"/>
<Set name="acceptQueueSize" property="jetty.ssl.acceptQueueSize"/>
<Set name="reuseAddress"><Property name="jetty.ssl.reuseAddress" default="true"/></Set>
<Set name="reusePort"><Property name="jetty.ssl.reusePort" default="false"/></Set>
<Set name="acceptedTcpNoDelay"><Property name="jetty.ssl.acceptedTcpNoDelay" default="true"/></Set>
<Set name="acceptedReceiveBufferSize" property="jetty.ssl.acceptedReceiveBufferSize" />
<Set name="acceptedSendBufferSize" property="jetty.ssl.acceptedSendBufferSize" />
</New>
</Arg>
</Call>
<New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Arg><Ref refid="httpConfig"/></Arg>
<Call name="addCustomizer">
<Arg>
<New class="org.eclipse.jetty.server.SecureRequestCustomizer">
<Arg name="sniRequired" type="boolean"><Property name="jetty.ssl.sniRequired" default="false"/></Arg>
<Arg name="sniHostCheck" type="boolean"><Property name="jetty.ssl.sniHostCheck" default="true"/></Arg>
<Arg name="stsMaxAgeSeconds" type="int"><Property name="jetty.ssl.stsMaxAgeSeconds" default="-1"/></Arg>
<Arg name="stsIncludeSubdomains" type="boolean"><Property name="jetty.ssl.stsincludeSubdomains" default="false"/></Arg>
</New>
</Arg>
</Call>
</New>
</Configure> The constructor of |
@fgolzari why do you have |
@janbartel Yes, I moved In general, any xml file that is copied from |
@fgolzari what factories do you want to add and why? You should almost never copy files from |
These configs are not in the default jetty-ssl.xml file and I added them |
@fgolzari they are the default, and they are already specified in Remove your file and everything should just work. |
@sbordet I removed this file from I have also added
|
Yes, it is wrong. You do not want to modify existing Jetty XML files in your For the particular case of the https://jetty.org/docs/jetty/12/operations-guide/modules/standard.html#http-forwarded |
@sbordet To add |
Do not enter it directly to We need to support a simpler way to specify inclusion/exclusion of cipher suites, you have a point on that. For now, do this: Modify
to this:
Then create a new file <?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure>
<Ref refid="sslContextFactory">
<Set name="ExcludeCipherSuites">
<Array type="String">
<Item>^TLS_RSA_.*$</Item>
...
</Array>
</Set>
</Ref>
</Configure> You can configure the In this way, you do not modify any of the original Jetty module or XML files, you only add your modifications to |
@joakime , @sbordet , @janbartel , |
Closing this issue as the questions have been answered. |
Jetty Version
12
Jetty Environment
ee10
Java Version
21
Question
while deploying the project ,while parsing jetty.xml file, it gives
classNotFoundException:org.eclipse.jetty.ee10.webapp.WebAppContext
class.When I search in the log of jetty, I see ee10-webapp jar file, loaded in class path. Why does this error happen?
This part of the configs is in the jetty.xml file
This part is in the continuation of the above configs in jetty.xml

The text was updated successfully, but these errors were encountered: