Hola como estan comunidad Envio este error que estoy tratando de resolver al migrar mi codigo de la version de jetty 10.0.13 a la 12.0.13.
Adjunto error:
<exception name="No environment configured">
java.lang.IllegalStateException: No environment configured
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:199)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:271)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:641)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
at org.eclipse.jetty.server.Server.doStart(Server.java:582)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.jpos.q2.jetty.Jetty.startService(Jetty.java:79)
at org.jpos.q2.QBeanSupport.start(QBeanSupport.java:137)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72)
at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at org.jpos.q2.QFactory.startQBean(QFactory.java:176)
at org.jpos.q2.Q2.start(Q2.java:624)
at org.jpos.q2.Q2.deploy(Q2.java:409)
at org.jpos.q2.Q2.run(Q2.java:258)
at java.base/java.lang.Thread.run(Thread.java:840)
</exception>
Codigo de configuracion: jetty.xml
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Get name="ThreadPool">
<Set name="minThreads" type="int"><Property name="threads.min" default="10"/></Set>
<Set name="maxThreads" type="int"><Property name="threads.max" default="200"/></Set>
<Set name="idleTimeout" type="int"><Property name="threads.timeout" default="60000"/></Set>
<Set name="detailedDump">false</Set>
</Get>
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
</Arg>
</Call>
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Set name="secureScheme">https</Set>
<Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
<Set name="outputBufferSize"><Property name="jetty.output.buffer.size" default="32768" /></Set>
<Set name="requestHeaderSize"><Property name="jetty.request.header.size" default="8192" /></Set>
<Set name="responseHeaderSize"><Property name="jetty.response.header.size" default="8192" /></Set>
<Set name="sendServerVersion"><Property name="jetty.send.server.version" default="true" /></Set>
<Set name="sendDateHeader"><Property name="jetty.send.date.header" default="false" /></Set>
<Set name="headerCacheSize">512</Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
</Call>
-->
</New>
<New id="RewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="rules">
<Array type="org.eclipse.jetty.rewrite.handler.Rule">
<Item>
<New id="header-xframe" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="headerName">X-Frame-Options</Set>
<Set name="headerValue">SAMEORIGIN</Set>
</New>
</Item>
<Item>
<New id="header-xxss" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="headerName">X-XSS-Protection</Set>
<Set name="headerValue">1; mode=block</Set>
</New>
</Item>
<Item>
<New id="header-xcontenttype" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="headerName">X-Content-Type-Options</Set>
<Set name="headerValue">nosniff</Set>
</New>
</Item>
<Item>
<New id="header-sts" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="headerName">Strict-Transport-Security</Set>
<Set name="headerValue">max-age=31536000; includeSubDomains; preload</Set>
</New>
</Item>
<Item>
<New id="header-csp" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="headerName">Content-Security-Policy</Set>
<Set name="headerValue">default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self'</Set>
</New>
</Item>
</Array>
</Set>
</New>
<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<Set 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>
<Item>
<Ref refid="RewriteHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- extra server options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="stopTimeout">5000</Set>
<Set name="dumpAfterStart"><Property name="jetty.dump.start" default="false"/></Set>
<Set name="dumpBeforeStop"><Property name="jetty.dump.stop" default="false"/></Set>
<Call name="addConnector">
<Arg>
<New 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"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080" /></Set>
<Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set>
<!-- <Set name="soLingerTime"><Property name="http.soLingerTime" default="-1"/></Set>-->
</New>
</Arg>
</Call>
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
<Set name="KeyStorePath"><Property name="jetty.home" default="." />/cfg/keystore.jks</Set>
<Set name="ExcludeCipherSuites">
<Array type="java.lang.String">
<Item>SSL_DHE_RSA_WITH_DES_CBC_SHA</Item>
<Item>SSL_DHE_DSS_WITH_DES_CBC_SHA</Item>
<Item>SSL_RSA_EXPORT_WITH_RC4_40_MD5</Item>
<Item>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_RSA_WITH_DES_CBC_SHA</Item>
<Item>SSL_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</Item>
<Item>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</Item>
<Item>TLS_DHE_RSA_WITH_AES_128_CBC_SHA256</Item>
<Item>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</Item>
<Item>TLS_DHE_RSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_DHE_RSA_WITH_AES_256_CBC_SHA256</Item>
<Item>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</Item>
<Item>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
<Item>TLS_RSA_WITH_AES_128_CBC_SHA</Item>
<Item>TLS_RSA_WITH_AES_128_CBC_SHA256</Item>
<Item>TLS_RSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_RSA_WITH_AES_256_CBC_SHA256</Item>
<Item>TLS_RSA_WITH_AES_128_GCM_SHA256</Item>
<Item>TLS_RSA_WITH_AES_256_GCM_SHA384</Item>
<Item>.NULL.</Item>
<Item>.RC4.</Item>
<Item>.MD5.</Item>
<Item>.DES.</Item>
<Item>.DSS.</Item>
<Item>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA</Item>
<Item>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA</Item>
<Item>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</Item>
<Item>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA</Item>
<Item>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA</Item>
</Array>
</Set>
<Set name="ExcludeProtocols">
<Array type="java.lang.String">
<Item>SSLv3</Item>
<Item>TLSv1</Item>
</Array>
</Set>
</New>
<Call name="addConnector">
<Arg>
<New 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="next">http/1.1</Arg>
<Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config"><Ref refid="httpConfig" /></Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.secure.port" default="8443" /></Set>
<Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set>
<!-- <Set name="soLingerTime"><Property name="http.soLingerTime" default="-1"/></Set>-->
</New>
</Arg>
</Call>
<!-- <Call class="org.eclipse.jetty.util.log.Log" name="getRootLogger">-->
<!-- <Call name="setDebugEnabled">-->
<!-- <Arg type="boolean">true</Arg>-->
<!-- </Call>-->
<!-- </Call>-->
<!-- <Call class="org.eclipse.jetty.webapp.Configuration$ClassList" name="setServerDefault">-->
<!-- <Arg><Ref refid="Server" /></Arg>-->
<!-- <Call name="addBefore">-->
<!-- <Arg name="beforeClass">org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Arg>-->
<!-- <Arg>-->
<!-- <Array type="String">-->
<!-- <Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item>-->
<!-- </Array>-->
<!-- </Arg>-->
<!-- </Call>-->
<!-- </Call>-->
<Get id="oldhandler" name="handler"/>
<Set name="handler">
<New id="DebugHandler" class="org.eclipse.jetty.server.handler.DebugHandler">
<Set name="handler"><Ref refid="oldhandler"/></Set>
<Set name="outputStream">
<New class="org.eclipse.jetty.util.RolloverFileOutputStream">
<Arg type="String"><Property name="jetty.logs" default="./log"/>/yyyy_mm_dd.debug.log</Arg>
<Arg type="boolean">true</Arg> <!-- append -->
<Arg type="int">90</Arg> <!-- retain days -->
</New>
</Set>
</New>
</Set>
<!-- <Set name="handler">-->
<!-- <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">-->
<!-- <Set 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>-->
<!-- <Item>-->
<!-- <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>-->
<!-- </Item>-->
<!-- </Array>-->
<!-- </Set>-->
<!-- </New>-->
<!-- </Set>-->
<!-- https://github.com/spring-projects/spring-boot/issues/16416 -->
<!-- https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/server/NCSARequestLog.html#field.summary -->
<!-- https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/server/CustomRequestLog.html -->
<Set name="requestLog">
<New id="RequestLog" class="org.eclipse.jetty.server.CustomRequestLog">
<Arg>
<SystemProperty name="jetty.logs" default="./log"/>/yyyy_mm_dd.request.log
</Arg>
<Arg>Extended</Arg>
</New>
</Set>
<Call name="addBean">
<Arg>
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
<Set name="contexts">
<Ref refid="Contexts" />
</Set>
<Call name="addAppProvider">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.ContextProvider">
<Set name="monitoredDirName">
<Property>
<Name>jetty.deploy.monitoredPath</Name>
<Default>
<Property name="jetty.base" default="." />/<Property name="jetty.deploy.monitoredDir" deprecated="jetty.deploy.monitoredDirName" default="webapps"/>
</Default>
</Property>
</Set>
<Set name="defaultsDescriptor">
<Property>
<Name>jetty.deploy.defaultsDescriptorPath</Name>
<Default>
<Property name="jetty.home" default="." />./cfg/webdefault.xml
</Default>
</Property>
</Set>
<Set name="scanInterval">
<Property name="jetty.deploy.scanInterval" default="1"/>
</Set>
<Set name="extractWars">
<Property name="jetty.deploy.extractWars" default="true"/>
</Set>
</New>
</Arg>
</Call>
</New>
</Arg>
</Call>
Muchas gracias, espero que me den su ayuda en esto.
Creo que el error viene de las nuevas modificaciones a la clase ScanningAppProvider de jetty, producto del cambio de version. modificaron muchas cosas