Я хочу разработать веб-приложение JSF.
Я использую JSF 2.3 (.x html), Tomcat 9.0.33 и Open JDK 11.0.2 (на Windows 10)
Apache Netbean 11.3 - моя IDE. (теперь поддерживается jsf 2.3)
Я начал настраивать свою среду, выполнив следующие публикации: JSF WebApp с Tomcat (какая версия?) для JSF / Tomcat, и это: Установите Weld в Tomcat для настройки CDI (Tomcat изначально не поддерживает CDI)
это моя сеть. xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
<url-pattern>*.jsf</url-pattern>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
и мой face-config. xml :
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd"
version="2.3">
</faces-config>
Веб-приложение построено без проблем, но когда я его запускаю, я получаю следующее:
Using CATALINA_BASE: "C:\apache-tomcat-9.0.33"
Using CATALINA_HOME: "C:\apache-tomcat-9.0.33"
Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.33\temp"
Using JRE_HOME: "C:\Program Files\Java\openjdk-11.0.2"
Using CLASSPATH: "C:\apache-tomcat-9.0.33\bin\bootstrap.jar;C:\apache-tomcat-9.0.33\bin\tomcat-juli.jar"
17-Mar-2020 16:11:03.226 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.33
17-Mar-2020 16:11:03.234 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 11 2020 09:31:38 UTC
17-Mar-2020 16:11:03.234 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.33.0
17-Mar-2020 16:11:03.234 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
17-Mar-2020 16:11:03.234 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
17-Mar-2020 16:11:03.235 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
17-Mar-2020 16:11:03.235 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\openjdk-11.0.2
17-Mar-2020 16:11:03.235 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.2+9
17-Mar-2020 16:11:03.235 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
17-Mar-2020 16:11:03.236 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\apache-tomcat-9.0.33
17-Mar-2020 16:11:03.236 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\apache-tomcat-9.0.33
17-Mar-2020 16:11:03.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
17-Mar-2020 16:11:03.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
17-Mar-2020 16:11:03.262 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
17-Mar-2020 16:11:03.263 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\apache-tomcat-9.0.33\conf\logging.properties
17-Mar-2020 16:11:03.263 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
17-Mar-2020 16:11:03.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|VEGAOFFICE
17-Mar-2020 16:11:03.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
17-Mar-2020 16:11:03.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
17-Mar-2020 16:11:03.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
17-Mar-2020 16:11:03.264 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\apache-tomcat-9.0.33
17-Mar-2020 16:11:03.265 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\apache-tomcat-9.0.33
17-Mar-2020 16:11:03.265 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\apache-tomcat-9.0.33\temp
17-Mar-2020 16:11:03.265 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\openjdk-11.0.2\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\OpenVPN\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Java\jdk1.8.0_66\bin;C:\apache-cxf-3.2.2\bin;C:\axis-1_4\bin;C:\Program Files\IEDriverServer_x64_2_53_1\;C:\Program Files\phantomjs-1.9.8-windows\;C:\Program Files\chromedriver_win32\;C:\Program Files\Git\cmd;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Users\rbott\AppData\Local\Microsoft\WindowsApps;C:\Users\rbott\AppData\Roaming\com.wildix\wildixzd-web\2.0.11\;C:\Users\rbott\AppData\Roaming\npm;.]
17-Mar-2020 16:11:04.047 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
17-Mar-2020 16:11:05.021 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [2,235] milliseconds
17-Mar-2020 16:11:05.206 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
17-Mar-2020 16:11:05.207 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.33]
17-Mar-2020 16:11:05.236 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-9.0.33\webapps\docs]
17-Mar-2020 16:11:06.886 WARNING [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [818] milliseconds.
17-Mar-2020 16:11:06.943 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.33\webapps\docs] has finished in [1,707] ms
17-Mar-2020 16:11:06.947 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-9.0.33\webapps\examples]
17-Mar-2020 16:11:08.183 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.33\webapps\examples] has finished in [1,237] ms
17-Mar-2020 16:11:08.185 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-9.0.33\webapps\host-manager]
17-Mar-2020 16:11:08.291 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.33\webapps\host-manager] has finished in [106] ms
17-Mar-2020 16:11:08.292 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-9.0.33\webapps\manager]
17-Mar-2020 16:11:08.397 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.33\webapps\manager] has finished in [104] ms
17-Mar-2020 16:11:08.400 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-9.0.33\webapps\ROOT]
17-Mar-2020 16:11:08.494 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.33\webapps\ROOT] has finished in [94] ms
17-Mar-2020 16:11:08.501 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
17-Mar-2020 16:11:08.526 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [3,503] milliseconds
17-Mar-2020 16:11:08.923 INFO [http-nio-8080-exec-6] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\apache-tomcat-9.0.33\conf\Catalina\localhost\JSF23WebApp.xml]
17-Mar-2020 16:11:08.928 WARNING [http-nio-8080-exec-6] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/JSF23WebApp] in deployment descriptor [C:\apache-tomcat-9.0.33\conf\Catalina\localhost\JSF23WebApp.xml] has been ignored
17-Mar-2020 16:11:11.984 INFO [http-nio-8080-exec-6] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
17-Mar-2020 16:11:12.209 INFO [http-nio-8080-exec-6] org.jboss.weld.environment.servlet.EnhancedListener.onStartup WELD-ENV-001008: Initialize Weld using ServletContainerInitializer
17-Mar-2020 16:11:12.340 INFO [http-nio-8080-exec-6] org.jboss.weld.bootstrap.WeldStartup.<clinit> WELD-000900: 3.1.3 (Final)
17-Mar-2020 16:11:12.851 WARN [http-nio-8080-exec-6] org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize WELD-ENV-000028: Weld initialization skipped - no bean archive found
17-Mar-2020 16:11:13.024 INFO [http-nio-8080-exec-6] com.sun.faces.config.ConfigureListener.contextInitialized Initializing Mojarra 2.3.9 ( 20190401-1936 77894020e94a338c9701619b7ef6e9871c5a9079) for context '/JSF23WebApp'
17-Mar-2020 16:11:13.567 INFO [http-nio-8080-exec-6] com.sun.faces.spi.InjectionProviderFactory.createInstance JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
17-Mar-2020 16:11:14.128 SEVERE [http-nio-8080-exec-6] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment:
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:357)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:243)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:443)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:237)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4688)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5151)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:487)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1642)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1590)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:1019)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:355)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.faces.FacesException: Unable to find CDI BeanManager
at com.sun.faces.application.ApplicationImpl.isJsf23(ApplicationImpl.java:2714)
at com.sun.faces.application.ApplicationImpl.addELResolver(ApplicationImpl.java:549)
at javax.faces.application.ApplicationWrapper.addELResolver(ApplicationWrapper.java:611)
at org.jboss.weld.environment.servlet.jsf.WeldApplication.<init>(WeldApplication.java:72)
at org.jboss.weld.environment.servlet.jsf.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:46)
at com.sun.faces.application.InjectionApplicationFactory.getApplication(InjectionApplicationFactory.java:88)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:153)
at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:63)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:391)
at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:255)
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:529)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:292)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:354)
... 48 more
17-Mar-2020 16:11:14.195 SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
17-Mar-2020 16:11:14.199 SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardContext.startInternal Context [/JSF23WebApp] startup failed due to previous errors
17-Mar-2020 16:11:14.214 SEVERE [http-nio-8080-exec-6] javax.faces.FactoryFinderInstance.getFactory Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
17-Mar-2020 16:11:14.215 SEVERE [http-nio-8080-exec-6] com.sun.faces.config.ConfigureListener.contextDestroyed Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:541)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:292)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:152)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:367)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4735)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5401)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:487)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1642)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1590)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:1019)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:355)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
17-Mar-2020 16:11:15.342 INFO [http-nio-8080-exec-6] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\apache-tomcat-9.0.33\conf\Catalina\localhost\JSF23WebApp.xml] has finished in [6,420] ms
, поэтому я искал в Google эти ошибки:
1 ) com.sun.faces.config.ConfigurationException: Фабрика 'javax.faces.lifecycle.ClientWindowFactory' не была настроена должным образом. (возможное решение здесь )
2) javax.faces.FacesException: не удалось найти CDI BeanManager (возможное решение здесь
предложено много решений .. ниже некоторых из опробованных ..
1) пустой контекст. xml .. так как в этом нет необходимости .. я использую Мохарру 2.3 .. до того, как это было (как сказал Balus C здесь :
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/JSF23WebApp">
<Resource name="BeanManager"
auth="Container"
type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.weld.resources.ManagerObjectFactory" />
</Context>
2) попытался отредактировать пустой боб. xml файл, подобный следующему:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all"
version="2.0">
</beans>
3) также установлен JSTL API (скачано jakarta.servlet. jsp .jstl-api-1.2.7.jar из репозитория Maven.) ..
, несмотря на эти попытки, я всегда получаю одну и ту же ошибку (выше) ..
Я приложил исходный код моего проекта (заархивированный файл) web.zip : в чем моя ошибка? (может быть, это зависит от Open JDK 11 ??)
спасибо ...