我想学习JSF,在阅读和观看了一些教程之后,我决定尝试一下它,并构建一个非常简单的Hello World示例。不幸的是,服务器无法实例化java类。该示例是如此简单,以至于我不确定代码是否确实存在问题,或者我是否搞砸了设置项目的事情。
我正在使用apache-tomcat-9.0.17服务器,这是所有相关代码。
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" 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_3_1.xsd">
<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>
</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>
index.xhtml
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Hello World - Input Form</title>
</h:head>
<h:body>
<h:form>
<h:commandButton value="Submit" action="myresponse" />
</h:form>
</h:body>
</html>
myresponse.xhtml
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Hello World - Response</title>
</h:head>
<h:body>
<h4>Hello, #{helloWorld.name}</h4>
</h:body>
</html>
HelloWorld.java
package JSF_Test;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean(name = "helloWorld")
@RequestScoped
public class HelloWorld{
private String name = "Tom";
public HelloWorld(){
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
程序控制台输出(没问题)
ant -f C:\\Users\\patri\\Documents\\NetBeansProjects\\JSFTestApp
Dnb.internal.action.name=run -Ddirectory.deployment.supported=true
DforceRedeploy=false
Dbrowser.context=C:\\Users\\patri\\Documents\\NetBeansProjects\\JSFTestApp
run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
Incrementally deploying http://localhost:8080/JSFTestApp
Completed incremental distribution of http://localhost:8080/JSFTestApp
Incrementally redeploying http://localhost:8080/JSFTestApp
Start is in progress...
start?path=/JSFTestApp
OK - Anwendung mit Kontext Pfad [/JSFTestApp] gestartet
run-deploy:
Browsing: http://localhost:8080/JSFTestApp
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 10 seconds)
服务器控制台输出(错误)
Using CATALINA_BASE: "C:\Users\patri\apache-tomcat-9.0.17"
Using CATALINA_HOME: "C:\Users\patri\apache-tomcat-9.0.17"
Using CATALINA_TMPDIR: "C:\Users\patri\apache-tomcat-9.0.17\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk-11.0.2"
Using CLASSPATH: "C:\Users\patri\apache-tomcat
9.0.17\bin\bootstrap.jar;C:\Users\patri\apache-tomcat-9.0.17\bin\tomcat
juli.jar"
06-Apr-2019 12:48:22.203 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log
Server Version: Apache Tomcat/9.0.17
06-Apr-2019 12:48:22.207 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server built:
Mar 13 2019 15:55:27 UTC
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.17.0
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architektur: amd64
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk-11.0.2
06-Apr-2019 12:48:22.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.2+9-LTS
06-Apr-2019 12:48:22.209 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Hersteller: Oracle Corporation
06-Apr-2019 12:48:22.209 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log
CATALINA_BASE: C:\Users\patri\apache-tomcat-9.0.17
06-Apr-2019 12:48:22.209 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Users\patri\apache-tomcat-9.0.17
06-Apr-2019 12:48:22.209 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\patri\apache-tomcat-9.0.17\conf\logging.properties
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|DESKTOP-B8VLDNL
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
06-Apr-2019 12:48:22.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\patri\apache-tomcat-9.0.17
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Users\patri\apache-tomcat-9.0.17
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Users\patri\apache-tomcat-9.0.17\temp
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5].
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
06-Apr-2019 12:48:22.211 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
06-Apr-2019 12:48:22.225 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018]
06-Apr-2019 12:48:22.274 INFO [main] org.apache.coyote.AbstractProtocol.init Initialisiere ProtocolHandler["http-nio-8080"]
06-Apr-2019 12:48:22.342 INFO [main] org.apache.coyote.AbstractProtocol.init Initialisiere ProtocolHandler["ajp-nio-8009"]
06-Apr-2019 12:48:22.347 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [582] milliseconds
06-Apr-2019 12:48:22.412 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
06-Apr-2019 12:48:22.412 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.17]
06-Apr-2019 12:48:22.423 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\Users\patri\apache-tomcat-9.0.17\conf\Catalina\localhost\JSFTestApp.xml]
06-Apr-2019 12:48:22.446 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/JSFTestApp] in deployment descriptor [C:\Users\patri\apache-tomcat-9.0.17\conf\Catalina\localhost\JSFTestApp.xml] has been ignored
06-Apr-2019 12:48:23.478 INFO [main] com.sun.faces.config.ConfigureListener.contextInitialized Mojarra 2.2.7 ( 20140610-1547 https://svn.java.net/svn/mojarra~svn/tags/2.2.7@13362) für Kontext '/JSFTestApp' wird initialisiert.
06-Apr-2019 12:48:23.624 INFO [main] com.sun.faces.spi.InjectionProviderFactory.createInstance JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
06-Apr-2019 12:48:24.188 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\Users\patri\apache-tomcat-9.0.17\conf\Catalina\localhost\JSFTestApp.xml] has finished in [1.766] ms
06-Apr-2019 12:48:24.189 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploye Web-Applikations-Verzeichnis [C:\Users\patri\apache-tomcat-9.0.17\webapps\docs]
06-Apr-2019 12:48:24.215 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\patri\apache-tomcat-9.0.17\webapps\docs] has finished in [26] ms
06-Apr-2019 12:48:24.215 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploye Web-Applikations-Verzeichnis [C:\Users\patri\apache-tomcat-9.0.17\webapps\examples]
06-Apr-2019 12:48:25.262 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\patri\apache-tomcat-9.0.17\webapps\examples] has finished in [1.047] ms
06-Apr-2019 12:48:25.262 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploye Web-Applikations-Verzeichnis [C:\Users\patri\apache-tomcat-9.0.17\webapps\host-manager]
06-Apr-2019 12:48:25.311 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\patri\apache-tomcat-9.0.17\webapps\host-manager] has finished in [49] ms
06-Apr-2019 12:48:25.312 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploye Web-Applikations-Verzeichnis [C:\Users\patri\apache-tomcat-9.0.17\webapps\manager]
06-Apr-2019 12:48:25.356 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\patri\apache-tomcat-9.0.17\webapps\manager] has finished in [44] ms
06-Apr-2019 12:48:25.356 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploye Web-Applikations-Verzeichnis [C:\Users\patri\apache-tomcat-9.0.17\webapps\ROOT]
06-Apr-2019 12:48:25.387 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\patri\apache-tomcat-9.0.17\webapps\ROOT] has finished in [31] ms
06-Apr-2019 12:48:25.391 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
06-Apr-2019 12:48:25.402 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
06-Apr-2019 12:48:25.408 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [3.060] milliseconds
06-Apr-2019 12:48:28.624 INFO [http-nio-8080-exec-3] com.sun.faces.config.ConfigureListener.contextInitialized Mojarra 2.2.7 ( 20140610-1547 https://svn.java.net/svn/mojarra~svn/tags/2.2.7@13362) für Kontext '/JSFTestApp' wird initialisiert.
06-Apr-2019 12:48:28.709 INFO [http-nio-8080-exec-3] com.sun.faces.spi.InjectionProviderFactory.createInstance JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
06-Apr-2019 12:48:31.489 SEVERE [http-nio-8080-exec-7] com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException Error Rendering View[/myresponse.xhtml]
javax.el.ELException: /myresponse.xhtml: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:90)
at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
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:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
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:678)
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:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
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: com.sun.faces.mgbean.ManagedBeanCreationException: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:191)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:100)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:257)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:117)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:94)
at org.apache.el.parser.AstValue.getValue(AstValue.java:137)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238)
at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154)
at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
... 32 more
Caused by: java.lang.RuntimeException:
at JSF_Test.HelloWorld.<init>(HelloWorld.java:1)
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 com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
... 45 more
06-Apr-2019 12:48:31.663 1100 [http-nio-8080-exec-7] com.sun.faces.context.ExceptionHandlerImpl.log JSF1073: javax.el.ELException erfasst während Verarbeitung von RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=/myresponse.xhtml: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
06-Apr-2019 12:48:31.663 1100 [http-nio-8080-exec-7] com.sun.faces.context.ExceptionHandlerImpl.log /myresponse.xhtml: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
javax.el.ELException: /myresponse.xhtml: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:90)
at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
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:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
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:678)
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:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
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: com.sun.faces.mgbean.ManagedBeanCreationException: Klasse JSF_Test.HelloWorld kann nicht instanziiert werden.
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:191)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:100)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:257)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:117)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:94)
at org.apache.el.parser.AstValue.getValue(AstValue.java:137)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238)
at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154)
at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
... 32 more
Caused by: java.lang.RuntimeException:
at JSF_Test.HelloWorld.<init>(HelloWorld.java:1)
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 com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
... 45 more