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

问题描述 投票:0回答:1

这是我先前发现的here的新变化。

我正在从MyFaces 2.1升级到2.3.5,并且从PrimeFaces 6.1升级到7。这还包括从托管bean迁移到CDI。此时,服务器启动,似乎MyFaces,PrimeFaces和CDI正在初始化。但是,当我尝试加载第一页时,显示“ Undefined component type javax.faces.ViewRoot”。注意,这是“组件类型”而不是类。

通过进入MyFaces代码,我可以看到正在使用许多组件来初始化组件类映射,但是没有与ViewRoot类似的东西。我不愿意尝试手动注册UIViewRoot,因为在早期版本中不需要这样做,而且我也没有提到有必要进行此类注册。

任何人都可以建议我可能做错了吗?

我在下面包括了相关的配置和日志文件(节略)。

[对于@tandraschko,他对我最近在这里的努力非常有帮助,我正在使用非捆绑的MyFaces api和impl库。正如您所建议的,我将创建一个简化的项目,以查看是否可以更小规模地重现或确定问题。]

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

<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>   

控制台输出

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)
maven managed-bean myfaces jsf-2.3
1个回答
0
投票

最后!解决了。虽然,答案显示了我的无知:

不要将您的faces-config.xml文件重命名为standard-faces-config.xml

以前,我在设置Maven和Eclipse时无法正确构建包含我的所有库(包括JSF)并由我的主应用程序项目引用的通用项目。有时,主应用程序的faces-config.xml似乎覆盖了通用应用程序的faces-config.xml。我偶然发现了对standard-faces-config.xml的引用。因此,我将通用的faces-config.xml重命名为standard-faces-config.xml,这似乎可行。我以为那是处理多项目应用程序的方法。

更糟的是,一旦我使Maven和Eclipse正常工作,我就会怀疑这一更改。但是恢复文件名似乎没有任何作用。这已经成为我第二个来之不易的教训:

使用Maven和Eclipse,请确保您确实在重建和重新部署您的项目

现在很多次我进行了更改并重新启动,只是意识到我的更改不包括在内。

非常感谢所有答复的人,尤其是@tandraschko!

热门问题
推荐问题
最新问题