Introduction
So, this is another article where the main focus is to solve a specific error message occur upon executing a Java web application. Basically, the error message appear is not a regular error appear. Moreover, the error appear in two places. The first one, it appear in the page itself. The following is the actual image presenting the error message :
Furthermore, the second one appear in the output Tab. Actually, it is an error appear as part of the log exist in the output Tab of the NetBeans IDE. In this case, the Java web application is running using the help of a NetBeans IDE. So, the following is the error message exist in the NetBeans IDE as follows :
11:29:47,692 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010: Deployed "app-1.0-SNAPSHOT.war" (runtime-name : "app-1.0-SNAPSHOT.war") 11:29:47,693 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."app-1.0-SNAPSHOT.war".WeldStartService: Failed to start service WFLYCTL0448: 43 additional services are down due to their dependencies being missing or failed 11:30:10,649 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0019: Stopped Driver service with driver-name = app-1.0-SNAPSHOT.war_org.postgresql.Driver_42_3 11:30:10,649 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 141) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'app-1.0-SNAPSHOT.war#my_persistence_unit' 11:30:10,650 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 141) HHH10005004: Stopping BeanContainer : org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl@1a842a77 11:30:10,650 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 141) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'app-1.0-SNAPSHOT.war#my_persistence_unit' 11:30:10,656 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0028: Stopped deployment app-1.0-SNAPSHOT.war (runtime-name: app-1.0-SNAPSHOT.war) in 7ms 11:30:10,669 INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0009: Undeployed "app-1.0-SNAPSHOT.war" (runtime-name: "app-1.0-SNAPSHOT.war") 11:30:10,669 INFO [org.jboss.as.controller] (management-handler-thread - 4) WFLYCTL0183: Service status report WFLYCTL0185: Newly corrected services: service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."faces-context-factory.org.primefaces.context.PrimeFacesContextFactory".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."faces-context-factory.org.primefaces.context.PrimeFacesContextFactory".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.faces.webapp.FacesServlet".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.faces.webapp.FacesServlet".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.jboss.weld.module.web.servlet.WeldInitialListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.jboss.weld.module.web.servlet.WeldInitialListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.jboss.weld.module.web.servlet.WeldTerminalListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.jboss.weld.module.web.servlet.WeldTerminalListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.primefaces.webapp.UploadedFileCleanerListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."org.primefaces.webapp.UploadedFileCleanerListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."partial-view-context-factory.org.primefaces.context.PrimePartialViewContextFactory".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."partial-view-context-factory.org.primefaces.context.PrimePartialViewContextFactory".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.application.DialogKeepFlashPhaseListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.application.DialogKeepFlashPhaseListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.application.resource.DynamicResourcesPhaseListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.application.resource.DynamicResourcesPhaseListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.component.autoupdate.AutoUpdatePhaseListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.component.autoupdate.AutoUpdatePhaseListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.csp.CspPhaseListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."phase-listener.org.primefaces.csp.CspPhaseListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."resource-handler.org.primefaces.application.resource.PrimeResourceHandler".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."resource-handler.org.primefaces.application.resource.PrimeResourceHandler".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.component.timeline.TimelineListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.component.timeline.TimelineListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.metadata.transformer.MetadataTransformerExecutor".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.metadata.transformer.MetadataTransformerExecutor".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.webapp.PostConstructApplicationEventListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.webapp.PostConstructApplicationEventListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.webapp.PreDestroyApplicationEventListener".START (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".component."system-event-listener-class.org.primefaces.webapp.PreDestroyApplicationEventListener".WeldInstantiator (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".deploymentCompleteService (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".ee.ComponentRegistry (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".undertow-deployment (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".undertow-deployment.UndertowDeploymentInfoService (no longer required) service jboss.deployment.unit."app-1.0-SNAPSHOT.war".weld.weldClassIntrospector (no longer required) 11:30:53,121 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "app-1.0-SNAPSHOT.war" (runtime-name: "app-1.0-SNAPSHOT.war") 11:30:53,819 INFO [org.jboss.as.jpa] (MSC service thread 1-6) WFLYJPA0002: Read persistence.xml for my_persistence_unit 11:30:54,213 INFO [org.jipijapa] (MSC service thread 1-6) JIPIORMV53020253: Second level cache enabled for app-1.0-SNAPSHOT.war#my_persistence_unit 11:30:54,213 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 140) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'app-1.0-SNAPSHOT.war#my_persistence_unit' 11:30:54,213 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 140) HHH000204: Processing PersistenceUnitInfo [ name: my_persistence_unit ...] 11:30:54,221 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment app-1.0-SNAPSHOT.war 11:30:54,300 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-1) No shutdown hook registered: Please call close() manually on application shutdown. 11:30:54,300 INFO [org.wildfly.microprofile.opentracing.smallrye] (MSC service thread 1-1) WFLYTRAC0001: Tracer initialized: JaegerTracer(version=Java-1.6.0, serviceName=app-1.0-SNAPSHOT.war, reporter=RemoteReporter(sender=org.wildfly.extension.microprofile.opentracing.spi.sender.WildFlySender@74675d0c, closeEnqueueTimeout=1000), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=LAPTOP-6EV9VAU3, jaeger.version=Java-1.6.0, ip=192.168.1.3}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false) 11:30:54,308 INFO [org.jipijapa] (MSC service thread 1-4) JIPIORMV53020253: Second level cache enabled for app-1.0-SNAPSHOT.war#my_persistence_unit 11:30:54,581 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.3) 11:30:54,602 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = app-1.0-SNAPSHOT.war_org.postgresql.Driver_42_3 11:30:54,611 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 140) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'app-1.0-SNAPSHOT.war#my_persistence_unit' 11:30:54,611 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 140) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 11:30:54,616 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 140) Envers integration enabled? : true 11:30:54,945 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 146) Initializing Mojarra 2.3.17.SP01 for context '/app-1.0-SNAPSHOT' 11:30:55,939 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 146) Running on PrimeFaces 11.0.0 11:30:55,942 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 146) WFLYUT0021: Registered web context: '/app-1.0-SNAPSHOT' for server 'default-server' 11:30:55,979 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "app-1.0-SNAPSHOT.war" (runtime-name : "app-1.0-SNAPSHOT.war") 11:31:23,180 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) JSF1073: javax.faces.view.facelets.FaceletException caught during processing of RESTORE_VIEW 1 : UIComponent-ClientId=, Message=Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character. 11:31:23,180 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character.: javax.faces.view.facelets.FaceletException: Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character. at [email protected]//com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:445) at [email protected]//com.sun.faces.facelets.compiler.SAXCompiler.doMetadataCompile(SAXCompiler.java:428) at [email protected]//com.sun.faces.facelets.compiler.Compiler.metadataCompile(Compiler.java:88) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory.createMetadataFacelet(DefaultFaceletFactory.java:470) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory.access$200(DefaultFaceletFactory.java:68) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:177) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:174) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:76) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:69) at [email protected]//com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:76) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at [email protected]//com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:91) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:124) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:39) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:279) at [email protected]//com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:209) at [email protected]//com.sun.faces.application.view.ViewMetadataImpl.createMetadataView(ViewMetadataImpl.java:122) at [email protected]//com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:224) at [email protected]//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76) at [email protected]//com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110) at [email protected]//com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177) at [email protected]//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707) at [email protected]//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451) at [email protected]//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at [email protected]//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52) at [email protected]//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at [email protected]//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at [email protected]//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at [email protected]//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at [email protected]//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) at [email protected]//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at [email protected]//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.lambda$handleRequest$1(ElytronRunAsHandler.java:68) at [email protected]//org.wildfly.security.auth.server.FlexibleIdentityAssociation.runAsFunctionEx(FlexibleIdentityAssociation.java:103) at [email protected]//org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:161) at [email protected]//org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:73) at [email protected]//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.handleRequest(ElytronRunAsHandler.java:67) at [email protected]//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) at [email protected]//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) at [email protected]//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at [email protected]//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at [email protected]//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at org.wildfly.security.elytron-web.undertow-server-servlet@1.10.1.Final//org.wildfly.elytron.web.undertow.server.servlet.CleanUpHandler.handleRequest(CleanUpHandler.java:38) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) at [email protected]//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) at [email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1544) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) at [email protected]//io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) at [email protected]//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at [email protected]//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) at java.base/java.lang.Thread.run(Thread.java:833)
In order to make it simple, the following is the actual main error which exist above :
11:31:23,180 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) JSF1073: javax.faces.view.facelets.FaceletException caught during processing of RESTORE_VIEW 1 : UIComponent-ClientId=, Message=Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character. 11:31:23,180 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character.: javax.faces.view.facelets.FaceletException: Error Parsing /db-connection-test.xhtml: Error Traced[line: 12] Attribute name "Connection" associated with an element type "titleDatabase" must be followed by the ' = ' character.
How to Solve Error Message appear in Java web application
Actually, the error message occur or appear in one of the Java web application’s page or exist in the output Tab it is because one of simple mistake. So, after checking the content of the file with the name of ‘db-connection-test.xhtml’, there is a slight miss-typed script in it. That script which is slightly miss-typed in the ‘db-connection-test.xhtml’ exist as follows :
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <titleDatabase Connection</title> </h:head> <body> <h:form> <p:outputPanel> <p:outputLabel id="connectionStatus" value="#{dbConnectionTestView.status}"></p:outputLabel> </p:outputPanel> <p:commandButton type="submit" value="Alert" onclick="alert('Prime')" actionListener="#{dbConnectionTestView.submit()}" update="@form"/> </h:form> </body> </html>
In detail, the following is the specific line which is causing the error :
<titleDatabase Connection</title>
As in the script exist in the line above, the script just has the opening format tag with the wrong one. The original purpose is to have the title tag opening and also closing. Inside that opening and closing title tag, there is a value string of ‘Database Connection’. So, in order to solve the problem, just revise the line as follows :
<title>Database Connection</title>
Last but not least, the overall script will be as follows :
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Database Connection</title> </h:head> <body> <h:form> <p:outputPanel> <p:outputLabel id="connectionStatus" value="#{dbConnectionTestView.status}"></p:outputLabel> </p:outputPanel> <p:commandButton type="submit" value="Alert" onclick="alert('Prime')" actionListener="#{dbConnectionTestView.submit()}" update="@form"/> </h:form> </body> </html>
Finally, execute the page once more and the following display of the page will appear :