I have problem using viewscoped CDI beans.
@PreDestroy method in bean has been never called.
I never had similar problem before using @ManagedBean instead @Named.
After few clicking and opening viewscope pages I am getting error like this:
javax.servlet.ServletException
javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:725)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
com.crmfo.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
com.crmfo.filter.AdministracijaFilter.doFilter(AdministracijaFilter.java:44)
java.lang.NullPointerException
com.sun.faces.application.view.ViewScopeContextManager.destroyBeans(ViewScopeContextManager.java:150)
com.sun.faces.application.view.ViewScopeContextManager.clear(ViewScopeContextManager.java:101)
com.sun.faces.application.view.ViewScopeManager.removeEldestViewMap(ViewScopeManager.java:376)
....
Please help
Problem with viewscoped CDI bean
I believe @ManagedBean was deprecated (Jarkara 10.x)
To help yourself why not display the versions used. Use "View profile".
To help yourself why not display the versions used. Use "View profile".
PF 13.0.0--Jakarta. Jakarta Faces 4.0.1/Kotlin Multiplatform 1.9.10
Mojarra 4.0.2, OmniFaces 4.2
WildFly 29.0.1.Final 'preview' Jakarta EE 10.0.0
JDK 20.0.2, Kotlin 1.9.10, Gradle 8.3 Groovy DSL, MongoDB 7.0.0
IntelliJ IDEA 2023.2.1, macOS Ventura 13.5.1
Mojarra 4.0.2, OmniFaces 4.2
WildFly 29.0.1.Final 'preview' Jakarta EE 10.0.0
JDK 20.0.2, Kotlin 1.9.10, Gradle 8.3 Groovy DSL, MongoDB 7.0.0
IntelliJ IDEA 2023.2.1, macOS Ventura 13.5.1
-
- Posts: 5
- Joined: 21 Sep 2020, 09:04
@ManagedBeans shouldn't be used anymore since JavaEE6. That being said, it would be easier for us to help if you could know the configuration they use.
Glassfish, payara, tomcat, ...? Which JavaEE version? Which operating system? Unfortunately we don't have a crystal ball here.
Steven
Glassfish, payara, tomcat, ...? Which JavaEE version? Which operating system? Unfortunately we don't have a crystal ball here.
Steven
-
- Information
-
Who is online
Users browsing this forum: No registered users and 25 guests