- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我从tomcat7换成了tomcate8.5.41在其上部署我的应用程序时失败 java code for login bean
这一行抛出异常
private static Logger logger = (Logger) LoggerFactory.getLogger(LoginBean.class);
我使用 primefaces 7 jsf 2.2.6
我认为原因之一是日志模块的问题
我尝试添加以下依赖项,但也不起作用
我尝试添加日志依赖,但也不起作用
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/mySharedData/Mokalmat/WorkSpaces/EclipseWorkSpace/VAS_prime_7_ws/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ConfigurationWebTool/WEB-INF/lib/slf4j-simple-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/mySharedData/Mokalmat/WorkSpaces/EclipseWorkSpace/VAS_prime_7_ws/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ConfigurationWebTool/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
Jun 12, 2019 3:02:57 PM com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:508)
at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:402)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
... 10 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:504)
... 17 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at com.sun.faces.util.Util.loadClass(Util.java:325)
at com.sun.faces.config.AnnotationScanner.processClassList(AnnotationScanner.java:309)
at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:128)
at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:932)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:884)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:383)
... 10 more
Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLogger cannot be cast to ch.qos.logback.classic.Logger
at com.vis.vasplatform.web.configuration.beans.LoginBean.<clinit>(LoginBean.java:42)
... 20 more
Jun 12, 2019 3:02:57 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214)
... 9 more
Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:508)
at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:402)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
... 10 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:504)
... 17 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at com.sun.faces.util.Util.loadClass(Util.java:325)
at com.sun.faces.config.AnnotationScanner.processClassList(AnnotationScanner.java:309)
at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:128)
at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:932)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:884)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:383)
... 10 more
Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLogger cannot be cast to ch.qos.logback.classic.Logger
at com.vis.vasplatform.web.configuration.beans.LoginBean.<clinit>(LoginBean.java:42)
... 20 more
.......
Jun 12, 2019 3:02:59 PM javax.faces.FactoryFinder$FactoryManager getFactory
SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
Jun 12, 2019 3:02:59 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:142)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:310)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4817)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
I tried to add the following dependency and also not working
<dependency> -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/mySharedData/Mokalmat/WorkSpaces/EclipseWorkSpace/VAS_prime_7_ws/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ConfigurationWebTool/WEB-INF/lib/slf4j-simple-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/mySharedData/Mokalmat/WorkSpaces/EclipseWorkSpace/VAS_prime_7_ws/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ConfigurationWebTool/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
Jun 12, 2019 3:02:57 PM com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:508)
at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:402)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
... 10 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:504)
... 17 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at com.sun.faces.util.Util.loadClass(Util.java:325)
at com.sun.faces.config.AnnotationScanner.processClassList(AnnotationScanner.java:309)
at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:128)
at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:932)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:884)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:383)
... 10 more
Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLogger cannot be cast to ch.qos.logback.classic.Logger
at com.vis.vasplatform.web.configuration.beans.LoginBean.<clinit>(LoginBean.java:42)
... 20 more
Jun 12, 2019 3:02:57 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214)
... 9 more
Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:508)
at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:402)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
... 10 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:504)
... 17 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at com.sun.faces.util.Util.loadClass(Util.java:325)
at com.sun.faces.config.AnnotationScanner.processClassList(AnnotationScanner.java:309)
at com.sun.faces.config.JavaClassScanningAnnotationScanner.getAnnotatedClasses(JavaClassScanningAnnotationScanner.java:128)
at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:932)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:884)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:383)
... 10 more
Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLogger cannot be cast to ch.qos.logback.classic.Logger
at com.vis.vasplatform.web.configuration.beans.LoginBean.<clinit>(LoginBean.java:42)
... 20 more
.......
SEVERE: Unable to load annotated class: com.vis.vasplatform.web.configuration.beans.LoginBean, reason: java.lang.NoClassDefFoundError: Could not initialize class com.vis.vasplatform.web.configuration.beans.LoginBean
Jun 12, 2019 3:02:59 PM com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
java.lang.StackOverflowError
at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:261)
at java.lang.ThreadLocal.get(ThreadLocal.java:146)
at javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:897)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:798)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:793)
at javax.faces.FactoryFinder$FactoryManagerCache.access$100(FactoryFinder.java:768)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:377)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:142)
Jun 12, 2019 3:02:59 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.RuntimeException: java.lang.StackOverflowError
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4768)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:261)
at java.lang.ThreadLocal.get(ThreadLocal.java:146)
at javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:897)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:798)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:793)
at javax.faces.FactoryFinder$FactoryManagerCache.access$100(FactoryFinder.java:768)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:377)
Jun 12, 2019 3:02:59 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jun 12, 2019 3:02:59 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ConfigurationWebTool] startup failed due to previous errors
Jun 12, 2019 3:02:59 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.StackOverflowError
at org.apache.catalina.security.SecurityUtil.isPackageProtectionEnabled(SecurityUtil.java:425)
at org.apache.catalina.core.ApplicationContextFacade.getAttribute(ApplicationContextFacade.java:375)
at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.getAttribute(StandardContext.java:6599)
at com.sun.faces.context.ApplicationMap.get(ApplicationMap.java:97)
at javax.faces.FactoryFinder$FactoryManagerCacheKey.<init>(FactoryFinder.java:939)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:801)
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:793)
at javax.faces.FactoryFinder$FactoryManagerCache.access$100(FactoryFinder.java:768)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:377)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:142)
.......
Jun 12, 2019 3:02:59 PM javax.faces.FactoryFinder$FactoryManager getFactory
SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
Jun 12, 2019 3:02:59 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:142)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:310)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4817)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
最佳答案
问题出在您的 LoginBean
类的以下几行
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Logger;
...
private static Logger logger = (Logger) LoggerFactory.getLogger(LoginBean.class);
Logger
类是一个“logback”类。
LoggerFactory
类是一个“slf4j”类。
getLogger
方法返回某个类的实例,该实例实现了 org.slf4j.Logger
而不是 ch.qos.logback.classic.Logger
.您不能在此处使用类型转换,因为这两个类不相关。
你不能像这样混合使用 slf4j 和 logback。您需要在代码中选择使用 slf4j API 还是 logback API。
我不知道该推荐哪个,因为您共享的少量代码并不能解释为什么您选择将 logger
声明为 logback Logger
。
但无论哪种方式,导致 ClassCastException
的问题都在您的代码中,而不是在 Tomcat 或您的 servlet 配置中。可能还有其他问题(例如,运行时有多个 slf4j 日志记录提供程序),但这个是一个阻碍。
关于java - 从 tomcat 7 升级到 tomcat8.5.41 部署失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56562644/
我在使用以下代码时遇到问题: function http_file_exists($url){ $f=fopen($url,"r"); if($f){ fclose($f); retu
我已经通过 Git 部署到 Azure 几个月了,没有出现重大问题,但现在我似乎遇到了一个无法克服的错误。 我创建了一个新的 Azure 网站,为正在开发的项目创建单独的预览链接。我在新站点上设置了
我已经通过flutter创建了一个App并完成了它,我想在flutter文档中阅读时进行部署。 我收到此错误: FAILURE: Build failed with an exception. * W
我在Windows 10中使用一些简单的Powershell代码遇到了这个奇怪的问题,我认为这可能是我做错了,但我不是Powershell的天才。 我有这个: $ix = [System.Net.Dn
我正在尝试使用 RapidJSON 解析从服务器接收到的数据。以下是收到的确切字符串: [ { "Node": "9478149a08f9", "Address": "172.17
我尝试为 ios 编译 OpenCV。我总是收到这些错误。我用不同版本的opencv试了一下,结果都是一样的。 我运行这个:python 平台/ios/build_framework.py ios_o
我在一台机器上做基本的发布/订阅,我的客户端是 StackExchange-Redis 的 C# 客户端,我在同一台机器上运行基于 Windows 的 Redis 服务器(服务器版本 2.8.4) 当
我有这段代码,但无法执行,请帮我解决这个问题 连接 connect_error) { die ("connection failed: " . $terhubung->connect_erro
我在 tomcat 上运行并由 maven 编译的 Web 应用程序给出了以下警告和错误。我可以在本地存储库中看到所有 JAR,但有人可以帮忙吗。 WARNING: Failed to scan JA
我正在 Windows 8 上使用 Android Studio 开发一个 android 应用程序,我正在使用一些 native 代码。突然间我无法编译我的 C 文件。当我运行 ndk-build
下面的代码对类和结构的成员进行序列化和反序列化。序列化工作正常,但我在尝试使用 oarch >> BOOST_SERIALIZATION_NVP(outObj); 反序列化时遇到了以下错误; 代码中是
如果我运行此命令“rspec ./spec/requests/api/v1/password_reset_request_spec.rb”,此文件中的所有测试都会通过。 但是,当我运行“rspec”时
我在尝试执行测试以使用 Protractor 上传文件时出错,我的代码是这个 it('it should be possible to upload a file', function() {
System.loadLibrary("nativefaceswap"); 当我运行我的应用程序时,我在 Android Studio 中发现了此类错误。在logcat中显示: java.lang.U
我希望有人能帮助我!使用任何方法或命令行的任何 SSL/HTTPS 调用均无效。 我在 Windows 10 中使用 Ubuntu Server 18.04 作为子系统。我的问题是昨天才开始出现的,因
通过删除这两个值将日期字段从 null=True 和 Blank=True 更改为 required 时,使用 db.alter 命令时遇到问题。 当以下行被注释掉时,迁移运行不会出现问题。
我第一次使用 Heroku 尝试创建应用程序(使用 SendGrid 的 Inbound Parse Webhook"和 Twilio SMS 通过电子邮件发送和接收 SMS 消息)。通过 Virtu
我正在将我的 swift 项目更新到 Xcode 7 上的 Swift 2.0。xcode 在构建项目时报告了以下错误: 命令/Applications/Xcode.app/Contents/Deve
在我的代码中,SSL 库函数 SSL_library_init() 没有按预期返回 1。我如何才能看到它返回了什么错误? 我在 SSL_library_init() 之后调用了 SSL_load_er
我正在尝试运行在以下链接中找到的答案: Asynchronously Load the Contents of a Div 但是当我这样做时,我会遇到我不太理解的错误。 我的代码: $(documen
我是一名优秀的程序员,十分优秀!