0

I have upgraded my application from faces 2.1 to 2.2.The following error showing up when I am accessing my application in browser.Using javax.faces-2.2.4 jar, primefaces-4.0 jar and primefaces-extensions-1.2.0 jar in my application

    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)

This is my 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">

This is my 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">
priya
  • 361
  • 1
  • 4
  • 18
  • WebLogic Server is 10.3.6.0 – priya Jan 15 '14 at 09:58
  • It seems you should leave one PF's jar in the classpath of your webapp, try to remove the extension's one to see. – Omar Jan 15 '14 at 14:23
  • I have removed primefaces-extensions-1.2.0 jar from application WEB-INF/lib then also getting the same error 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:612) at – priya Jan 15 '14 at 16:21
  • Make sure that's removed also through the EDI. Make a clean & build. – Omar Jan 15 '14 at 16:48
  • 2
    How exactly did you upgrade to JSF 2.2? WebLogic 10.x doesn't support it. – BalusC Jan 16 '14 at 08:57

2 Answers2

1

My problem got solved by not exporting (Properties->Java Build Path->Order and Export->Uncheck primefaces and extension jar checkbox)

primefaces-4.0 jar and primefaces-extensions-1.2.0 jar.

These two jars are present in application's WEB-INF/lib folder.

UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
priya
  • 361
  • 1
  • 4
  • 18
-2

This error appeared when informed hibernate.cfg.xml in the address of the packet in the class map. Make notes of all the configuration files if you are not wrong addresses.