简体   繁体   English

JSF 2.3 启动中未定义的组件类型 javax.faces.ViewRoot

[英]Undefined component type javax.faces.ViewRoot in JSF 2.3 startup

This is a new twist from my earlier issues found here .这是我在此处找到的早期问题的新转折。

I'm upgrading from MyFaces 2.1 to 2.3.5, and from PrimeFaces 6.1 to 7. This has also included migrating from managed beans to CDI.我正在从 MyFaces 2.1 升级到 2.3.5,从 PrimeFaces 6.1 升级到 7。这​​还包括从托管 bean 迁移到 CDI。 At this point, the server starts up and it appears that MyFaces, PrimeFaces, and CDI are being initialized.此时,服务器启动,显示 MyFaces、PrimeFaces 和 CDI 正在初始化。 However, when I attempt to load my first page I get " Undefined component type javax.faces.ViewRoot ".但是,当我尝试加载我的第一页时,我得到“ Undefined component type javax.faces.ViewRoot ”。 Note, this is a "component type" not a class.请注意,这是一个“组件类型”而不是一个类。

Tracing into the MyFaces code, I can see that the component class map is being initialized with lots of components, but nothing similar to ViewRoot.跟踪 MyFaces 代码,我可以看到组件类映射正在使用大量组件进行初始化,但没有与 ViewRoot 类似的组件。 I'm hesitant to try manually registering UIViewRoot since this wasn't necessary with the earlier versions and I haven't seen any mention of something like this being necessary.我对尝试手动注册 UIViewRoot 犹豫不决,因为这对于早期版本来说不是必需的,而且我还没有看到任何提及这样的事情是必要的。

Can anyone suggest what I may be doing wrong?谁能建议我可能做错了什么?

I've included the relevant configuration and log files (abridged) below.我在下面包含了相关的配置和日志文件(已删节)。

[And for @tandraschko who's been so helpful with my recent struggles here, I am using the non-bundled MyFaces api & impl libraries. [对于对我最近在这里的挣扎非常有帮助的 @tandraschko,我使用的是非捆绑的 MyFaces api 和 impl 库。 And as you've suggested, I'm going to create a stripped-down project to see if I can reproduce or identify the issue on a smaller scale.]正如你所建议的,我将创建一个精简的项目,看看我是否可以在较小的范围内重现或识别问题。]

pom.xml pom.xml

<!-- MyFaces -->
<dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-api</artifactId>
    <version>2.3.5</version>
</dependency>
<dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-impl</artifactId>
    <version>2.3.5</version>
</dependency>

<!-- PrimeFaces -->
<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>7.0</version>
</dependency>
<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>all-themes</artifactId>
    <version>1.0.10</version>
</dependency>

<!-- Spring -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-oxm</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.batch</groupId>
    <artifactId>spring-batch-core</artifactId>
    <version>2.2.7.RELEASE</version>
</dependency>

<!-- Tomcat -->
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>9.0.30</version>
</dependency>
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-util</artifactId>
    <version>9.0.12</version>
    <scope>provided</scope>
</dependency>

<!-- OpenWebBeans - implements CDI Container -->
<dependency>
    <groupId>org.apache.openwebbeans</groupId>
    <artifactId>openwebbeans-spi</artifactId>
    <version>${owb.version}</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>org.apache.openwebbeans</groupId>
    <artifactId>openwebbeans-impl</artifactId>
    <version>${owb.version}</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.apache.openwebbeans</groupId>
    <artifactId>openwebbeans-web</artifactId>
    <version>${owb.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.openwebbeans</groupId>
    <artifactId>openwebbeans-jsf</artifactId>
    <version>${owb.version}</version>
</dependency>

<!-- Apache taglibs -->
<dependency>
    <groupId>org.apache.taglibs</groupId>
    <artifactId>taglibs-standard-impl</artifactId>
    <version>1.2.5</version>
</dependency>
<dependency>
    <groupId>org.apache.taglibs</groupId>
    <artifactId>taglibs-standard-spec</artifactId>
    <version>1.2.5</version>
</dependency>

<!-- Misc -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>4.0.1</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>javax.el</groupId>
    <artifactId>javax.el-api</artifactId>
    <version>3.0.0</version>
</dependency>

<dependency>
    <groupId>commons-digester</groupId>
    <artifactId>commons-digester</artifactId>
    <version>2.1</version>
</dependency>


faces-config.xml人脸配置文件

<lifecycle>
  <phase-listener>
    com.company.application.security.AuthorizationListener
  </phase-listener>
</lifecycle> 

<lifecycle>
    <phase-listener>org.primefaces.component.lifecycle.LifecyclePhaseListener</phase-listener>
</lifecycle>    

<render-kit>
    <renderer>
        <component-family>org.primefaces.component</component-family>
        <renderer-type>org.primefaces.component.DataTableRenderer</renderer-type>
        <renderer-class>com.company.common.web.CustomDataTableRenderer</renderer-class>
    </renderer>
    <renderer>
        <component-family>org.primefaces.component</component-family>
        <renderer-type>org.primefaces.component.MenubarRenderer</renderer-type>
        <renderer-class>com.company.common.web.CustomMenubarRenderer</renderer-class>
    </renderer>     
</render-kit>   

<application>
    <el-resolver>
      org.springframework.web.jsf.el.SpringBeanFacesELResolver
    </el-resolver>
    <action-listener>
       com.company.common.app.DialogActionListenerCompatibilityFix
       <!-- This was necessary as default failed with missing default constructor -->
    </action-listener>
    <navigation-handler>
       org.primefaces.application.DialogNavigationHandler
    </navigation-handler>
    <view-handler>
       org.primefaces.application.DialogViewHandler
    </view-handler>
</application> 


web.xml网页.xml

<listener>
    <listener-class>com.company.application.app.AppApplicationContextListener</listener-class>
</listener>
<listener>
    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
</listener>
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

<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>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

<context-param>
    <param-name>org.apache.myfaces.SUPPORT_MANAGED_BEANS</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>org.apache.myfaces.annotation.USE_CDI_FOR_ANNOTATION_SCANNING</param-name>
    <param-value>true</param-value>
</context-param>   


Console Output控制台输出

INFO: Server version:        Apache Tomcat/9.0.8
INFO: Server built:          Apr 27 2018 19:32:00 UTC
INFO: Server number:         9.0.8.0
INFO: OS Name:               Windows 10
INFO: OS Version:            10.0
INFO: Architecture:          amd64
INFO: Java Home:             C:\Program Files\Java\OpenJDK_11.0.5.10
INFO: JVM Version:           11.0.5+10
INFO: JVM Vendor:            AdoptOpenJDK
INFO: CATALINA_BASE:         C:\Users\name\eclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp9
INFO: CATALINA_HOME:         C:\Program Files\apache-tomcat-9.0.8
INFO: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51836
INFO: Command line argument: -javaagent:C:\Eclipse\eclipse\configuration\org.eclipse.osgi\409\0\.cp\lib\javaagent-shaded.jar
INFO: Command line argument: -Dcatalina.base=C:\Users\name\eclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp9
INFO: Command line argument: -Dcatalina.home=C:\Program Files\apache-tomcat-9.0.8
INFO: Command line argument: -Dwtp.deploy=C:\Users\name\eclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp9\wtpwebapps
INFO: Command line argument: -Dfile.encoding=Cp1252

Jan 02, 2020 3:42:38 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Jan 02, 2020 3:42:38 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.8

INFO  common.app.ApplicationServicesProvisioner - Registering ApplicationServices Class as com.company.application.app.ApplicationServicesImpl
INFO  common.app.DatabaseServicesProvisioner - Registering DatabaseServices Class as com.company.application.app.DatabaseServicesImpl

INFO  web.lifecycle.WebContainerLifecycle - OpenWebBeans Container is starting...
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/beans.xml
INFO  web.scanner.WebScannerService - Adding information from WEB-INF/beans.xml
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Program%20Files/apache-tomcat-9.0.8/lib/websocket-api.jar
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Program%20Files/apache-tomcat-9.0.8/lib/ecj-4.7.3a.jar
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Program%20Files/apache-tomcat-9.0.8/lib/jaspic-api.jar
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Program%20Files/apache-tomcat-9.0.8/lib/annotations-api.jar
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Program%20Files/apache-tomcat-9.0.8/lib/
INFO  corespi.scanner.AbstractMetaDataDiscovery - added beans archive URL: file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/classes/
INFO  common.web.SessionBeanBase - Prime Faces version:  7.0
INFO  webbeans.config.BeansDeployer - All injection points were validated successfully.
INFO  web.lifecycle.WebContainerLifecycle - OpenWebBeans Container has started, it took [4028] ms.

INFO  [Catalina].[localhost].[/app] - Initializing Spring root WebApplicationContext
INFO  web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO  context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Thu Jan 02 15:42:46 EST 2020]; root of context hierarchy
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/check-database.xml]
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/batch-infrastructure.xml]
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/batch-jobs/batch-jobs.xml]
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'helloWorldJob': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.SimpleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.JobParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
INFO  factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/batch-jobs/appBatchRunnerJob.xml]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'app_BatchJobRunner': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.SimpleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.JobParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
INFO  factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [license.config]
INFO  factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [application.secrets]
INFO  factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [application.properties]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'postProcessTasklet': replacing [Generic bean: class [com.company.application.batch.PostProcessBatchTest]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'completionNotificationTasklet': replacing [Generic bean: class [com.company.common.batch.BatchJobCompletionNotifier]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'xmlItemWriter': replacing [Generic bean: class [org.springframework.batch.item.xml.StaxEventItemWriter]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in ServletContext resource [/WEB-INF/batch-jobs/helloWorldJob.xml]]
INFO  factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'appBatchJobTasklet': replacing [Generic bean: class [com.company.common.batch.BatchJobRunner]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/batch-jobs/appBatchRunnerJob.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in ServletContext resource [/WEB-INF/batch-jobs/appBatchRunnerJob.xml]]

INFO  common.db.appCheckDatabase - Loaded JDBC driver: org.postgresql.Driver
INFO  common.db.appCheckDatabase - Skipping database accessibility check
INFO  common.batch.appDriverManagerDataSource - Loaded JDBC driver: org.postgresql.Driver
INFO  repository.support.JobRepositoryFactoryBean - No database type set, using meta data indicating: POSTGRES
INFO  scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 
INFO  scheduling.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService  'scheduler'
INFO  oxm.jaxb.Jaxb2Marshaller - Creating JAXBContext with classes to be bound [class com.company.application.batch.Report]
INFO  web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4668 ms

INFO  myfaces.config.DefaultFacesConfigurationProvider - Reading standard config META-INF/standard-faces-config.xml
INFO  myfaces.config.DefaultFacesConfigurationProvider - Reading config /WEB-INF/faces-config.xml
INFO  myfaces.config.DefaultFacesConfigurationProvider - Reading config : jar:file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/openwebbeans-el22-2.0.12.jar!/META-INF/faces-config.xml
INFO  myfaces.config.DefaultFacesConfigurationProvider - Reading config : jar:file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/openwebbeans-jsf-2.0.12.jar!/META-INF/faces-config.xml
INFO  myfaces.config.DefaultFacesConfigurationProvider - Reading config : jar:file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/primefaces-7.0.jar!/META-INF/faces-config.xml
INFO  myfaces.config.LogMetaInfUtils - Artifact 'myfaces-api' was found in version '2.3.5' from path 'file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/myfaces-api-2.3.5.jar'
INFO  myfaces.config.LogMetaInfUtils - Artifact 'myfaces-impl' was found in version '2.3.5' from path 'file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/myfaces-impl-2.3.5.jar'
INFO  myfaces.config.LogMetaInfUtils - Artifact 'myfaces-impl-shared-public' was found in version '2.3.5' from path 'file:/C:/Users/name/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp9/wtpwebapps/app/WEB-INF/lib/myfaces-impl-shared-public-2.3.5.jar'
INFO  myfaces.util.ExternalSpecifications - MyFaces CDI support enabled
INFO  spi.impl.DefaultInjectionProviderFactory - Using InjectionProvider org.apache.myfaces.spi.impl.CDIAnnotationDelegateInjectionProvider
INFO  myfaces.util.ExternalSpecifications - MyFaces Bean Validation support disabled
INFO  myfaces.config.FacesConfigurator - Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
INFO  config.annotation.DefaultLifecycleProviderFactory - Using LifecycleProvider org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider
INFO  primefaces.webapp.PostConstructApplicationEventListener - Running on PrimeFaces 7.0
INFO  myfaces.webapp.AbstractFacesInitializer - ServletContext initialized.

INFO  myfaces.webapp.WebConfigParamsLogger - Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
WARN  myfaces.webapp.AbstractFacesInitializer - 

*******************************************************************
*** WARNING: Apache MyFaces-2 is running in DEVELOPMENT mode.   ***
***                                         ^^^^^^^^^^^         ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getProjectStage() for more information.     ***
*******************************************************************

INFO  myfaces.webapp.StartupServletContextListener - MyFaces Core has started, it took [2047] ms.
INFO  catalina.startup.Catalina - Server startup in 14480 ms

[[[  browse to login.jsf  ]]]


ERROR myfaces.application.ApplicationImpl - Undefined component type javax.faces.ViewRoot
INFO  common.security.AuthorizationListenerBase - redirecting to the login page: session is not null, currentPage = , currentUser = null
INFO  common.app.ApplicationContainerBase - Application startup
application Build: 0.1.0 (1); Updated: Monday November 4, 2019 4:29 pm
app Build: 2.1.8 (149); Updated: Friday, November 8, 2019 3:54 pm

INFO  application.web.SessionBean - ========== Session Constructor ===============
INFO  application.web.SessionBean - ===== Build #0.1.0 (1) Updated: Monday November 4, 2019 4:29 pm POSTGRESQL
INFO  application.web.SessionBean - ==============================================
ERROR common.exceptions.appExceptionHandler - Apache root cause: 
javax.faces.FacesException: Undefined component type javax.faces.ViewRoot
    at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1504)
    at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1472)
    at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:133)
    at org.apache.myfaces.shared.view.ViewDeclarationLanguageBase.createView(ViewDeclarationLanguageBase.java:53)
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createView(FaceletViewDeclarationLanguage.java:2056)
    at org.apache.myfaces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:264)
    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:115)
    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:115)
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage$FaceletViewMetadata.createMetadataView(FaceletViewDeclarationLanguage.java:2757)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:252)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:195)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:142)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:204)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:111)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    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 com.company.common.security.SsoAuthFilter.doFilter(SsoAuthFilter.java:136)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.company.common.web.RequestHeaderFilter.doFilter(RequestHeaderFilter.java:62)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.company.common.web.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.company.common.web.URLSessionFilter.doFilter(URLSessionFilter.java:56)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.company.common.web.RawResourceFilter.doFilter(RawResourceFilter.java:150)
    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:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
    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:651)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:412)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1385)
    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)

Finally!最后! Solved it.解决了。 Though, the answer shows my ignorance:虽然,答案显示了我的无知:

Don't rename your faces-config.xml file to standard-faces-config.xml不要将您的faces-config.xml文件重命名为standard-faces-config.xml

Earlier, I had trouble setting up Maven and Eclipse to properly build a common project containing all my libraries (including JSF) and referenced by my main application project.早些时候,我在设置 Maven 和 Eclipse 以正确构建包含我的所有库(包括 JSF)并由我的主应用程序项目引用的公共项目时遇到了麻烦。 At one point it seemed that the main application's faces-config.xml was overwriting the common application's faces-config.xml .在某一时刻,主应用程序的faces-config.xml似乎覆盖了通用应用程序的faces-config.xml I stumbled across references to standard-faces-config.xml .我偶然发现了对standard-faces-config.xml引用。 So I'd renamed the common faces-config.xml to standard-faces-config.xml , which seemed to work.所以我将 common faces-config.xml重命名为standard-faces-config.xml ,这似乎有效。 I'd assumed that was how to handle multi-project applications.我认为这是如何处理多项目应用程序。

To make matters worse, I'd suspected this change once I got Maven and Eclipse working.更糟糕的是,一旦我让 Maven 和 Eclipse 工作,我就怀疑这个变化。 But reverting the filename didn't seem to do anything.但是恢复文件名似乎没有任何作用。 This has become my second hard-earned lesson:这已经成为我来之不易的第二课:

With Maven and Eclipse, make sure you're really rebuilding and redeploying your projects使用 Maven 和 Eclipse,确保您真正重建和重新部署您的项目

So many times now I've made changes and relaunched, only to realize my changes weren't included.现在我做了很多次更改并重新启动,才意识到我的更改不包括在内。

Many thanks to everyone who responded, especially @tandraschko!非常感谢所有回复的人,尤其是@tandraschko!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NoClassDefFoundError:TomEE启动时的javax / faces / component / UIViewAction - NoClassDefFoundError: javax/faces/component/UIViewAction on TomEE startup 无法使用JSF 2.3启动Tomcat 8:java.lang.NoSuchMethodError:javax.faces.view.facelets.FaceletCache.setCacheFactories - Cannot start Tomcat 8 with JSF 2.3: java.lang.NoSuchMethodError: javax.faces.view.facelets.FaceletCache.setCacheFactories com.sun.faces的差异/平等> jsf-impl和org.glassfish> javax.faces(2.2.4) - Difference/Equality of com.sun.faces > jsf-impl and org.glassfish > javax.faces (2.2.4) 使用JSF进行Spring Boot; 找不到工厂javax.faces.context.FacesContextFactory的备份 - Spring Boot with JSF; Could not find backup for factory javax.faces.context.FacesContextFactory javax.xml.ws.WebServiceException:未定义的端口类型: - javax.xml.ws.WebServiceException: Undefined port type: 最佳启动JSF 2.2原型 - Best startup JSF 2.2 archetype 找不到工厂javax.faces.application.ApplicationFactory的备份 - Could not find backup for factory javax.faces.application.ApplicationFactory Fitnesse java.lang.NoClassDefFoundError:javax / faces / validator / ValidatorException - Fitnesse java.lang.NoClassDefFoundError: javax/faces/validator/ValidatorException Javax.Faces 库:构建路径不完整错误 - Javax.Faces Library: build path incomplete error 如何在 Spring 应用程序中使用 Maven 将 JSF 2.2 更新到 JSF 2.3 - How to update JSF 2.2 to JSF 2.3 using Maven in a Spring Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM