org.primefaces.context.PrimeFacesContext.release中的java.lang.NullPointerException(PrimeFacesContext.j

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了org.primefaces.context.PrimeFacesContext.release中的java.lang.NullPointerException(PrimeFacesContext.j相关的知识,希望对你有一定的参考价值。

我已将我的应用程序从面2.1升级到2.2。当我在浏览器中访问我的应用程序时出现以下错误。使用javax.faces-2.2.4 jar,primefaces-4.0 jar和primefaces-extensions-1.2.0 jar in my应用

    java.lang.NullPointerException
        at org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:26)
        at org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:28)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:665)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

这是我的web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

这是我的faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
答案

我在删除扩展jar之后从我的eclipse中清理了部署。我也在WEB-INF / lib文件夹中没有验证它,

如果WebLogic Server 10.3.6.0不支持javax.faces-2.2.4 jar然后在部署期间我可能会有错误。我的控制台中的以下示例行显示它已加载2.2.4 jars。这些日志是在添加primefaces extension jar之后。


Jan 16, 2014 5:06:43 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
Jan 16, 2014 5:06:43 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:41 PM'
Jan 16, 2014 5:06:44 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.2.4 ( 20131003-1354 https://svn.java.net/svn/mojarra~svn/tags/2.2.4@12574) for context '/XXXXXXX'
Jan 16, 2014 5:06:44 PM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
SEVERE: JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.
Jan 16, 2014 5:06:44 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
Jan 16, 2014 5:06:45 PM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
Jan 16, 2014 5:06:45 PM com.sun.faces.config.WebConfiguration$DeferredBooleanParameterLoggingAction log
WARNING: JSF1025: [/XXXXXXX] Context initialization parameter 'facelets.SKIP_COMMENTS' is deprecated.  The option will still be configured, but please use 'javax.faces.FACELETS_SKIP_COMMENTS' in the future.
Jan 16, 2014 5:06:45 PM com.sun.faces.config.WebConfiguration$DeferredBooleanParameterLoggingAction log
INFO: JSF1020: [/XXXXXXX] Configuration option 'javax.faces.FACELETS_SKIP_COMMENTS' RESET to ENABLED
Jan 16, 2014 5:06:45 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 4.0
Jan 16, 2014 5:06:45 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 4.0
Jan 16, 2014 5:06:45 PM org.primefaces.extensions.application.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces Extensions 1.2.0
Jan 16, 2014 5:06:45 PM org.primefaces.extensions.application.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces Extensions 1.2.0
Jan 16, 2014 5:06:45 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Jan 16, 2014 5:06:45 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Thu Jan 16 17:06:45 GMT+05:30 2014]; root of context hierarchy
Jan 16, 2014 5:06:45 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

an 16, 2014 5:06:47 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 1551 ms

Jan 16, 2014 5:06:49 PM weblogic.wsee.persistence.StoreCleaner <init>
INFO: StoreCLeaner created for <StoreConnection> : storeName = WseeJaxwsFileStore connectionName = weblogic.wsee.reliability2.store.SourceSequenceStore with interval=600000 msecs, maxObjectLifetime=86400000 msecs maxIdleTimeMillis=-1 msecs with disabled = false
Jan 16, 2014 5:06:49 PM weblogic.wsee.persistence.StoreCleaner startCleanup
INFO: StoreCLeaner starting for <StoreConnection> : storeName = WseeJaxwsFileStore connectionName = weblogic.wsee.reliability2.store.SourceSequenceStore with interval=600000 msecs, maxObjectLifetime=86400000 msecs maxIdleTimeMillis=-1 msecs with disabled = false
Jan 16, 2014 5:06:49 PM weblogic.wsee.persistence.StoreCleaner <init>
INFO: StoreCLeaner created for <StoreConnection> : storeName = WseeJaxwsFileStore connectionName = weblogic.wsee.reliability2.store.DestinationSequenceStore with interval=600000 msecs, maxObjectLifetime=86400000 msecs maxIdleTimeMillis=-1 msecs with disabled = false
Jan 16, 2014 5:06:49 PM weblogic.wsee.persistence.StoreCleaner startCleanup
INFO: StoreCLeaner starting for <StoreConnection> : storeName = WseeJaxwsFileStore connectionName = weblogic.wsee.reliability2.store.DestinationSequenceStore with interval=600000 msecs, maxObjectLifetime=86400000 msecs maxIdleTimeMillis=-1 msecs with disabled = false
另一答案

我的问题通过不出口解决(Properties->Java Build Path->Order and Export->Uncheck primefaces and extension jar checkbox

primefaces-4.0 jarprimefaces-extensions-1.2.0 jar

这两个jar存在于应用程序的WEB-INF / lib文件夹中。

另一答案

在类映射中的数据包地址中通知hibernate.cfg.xml时出现此错误。如果您没有错误的地址,请记下所有配置文件。

以上是关于org.primefaces.context.PrimeFacesContext.release中的java.lang.NullPointerException(PrimeFacesContext.j的主要内容,如果未能解决你的问题,请参考以下文章