Fórum

NPE in BridgeImpl.java

thumbnail
Jörn Kolberg, modificado 13 Anos atrás.

NPE in BridgeImpl.java

New Member Postagens: 6 Data de Entrada: 26/05/11 Postagens Recentes
Hi there,
we are trying to deploy the icefaces2-compat-portlet one Liferay 5.2.8 which is running on Weblogic 10.3.3.0 - Weblogic 10.3.3.0 doesn't support JSF 2.0 naturally, but you can make Weblogic supporting it by deploying a shared libary (this is officially documented by Oracle).

I've already managed to to deply successfully abd test a JSF 2.0 web application which I've written, but when it comes to that mentioned portlet example it just fails to work.

Deploying was not a big deal (besides you cannot use the weblogic.xml.jaxp.WebLogicSAXParser instead you have to offer a SaxParser implementation which offers the reset-method), but when want to add the portlet to page in Liferay I get following error in my server log:

11:45:27,274 ERROR [SerializableSessionAttributeListener:42] org.icefaces.application.WindowScopeManager is not serializable and will prevent this session from being replicated
11:45:27,274 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.SessionViewManager is not serializable and will prevent this session from being replicated
11:45:27,274 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.SessionViewManager is not serializable and will prevent this session from being replicated
11:45:27,290 ERROR [SerializableSessionAttributeListener:42] org.icefaces.application.LazyPushManager is not serializable and will prevent this session from being replicated
11:45:27,290 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.DynamicResourceDispatcher is not serializable and will prevent this session from being replicated
11:45:27,337 ERROR [jsp:157] java.lang.NullPointerException
at BridgeImpl.java.doFacesRequest(BridgeImpl.java:207)
at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:194)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)

I am not quite sure if the serialization error is really aproblem (I've read some posts which said you could ignore it, because it's only important for clustered environments), but the NPE really is one :-)

As far as I know the source code I guess this line of code is involved:

bridgeRequestScope = bridgeRequestScopeFactory.getBridgeRequestScope(portletConfig, renderRequest, facesContext);


Has anybody got a clue how to solve this problem?

Cheers, Jörn
thumbnail
Jörn Kolberg, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

New Member Postagens: 6 Data de Entrada: 26/05/11 Postagens Recentes
I got a little further - in BridgeImpl.java (method init(...)) I've replaced

this.bridgeRequestScopeFactory = (BridgeRequestScopeFactory) BridgeFactoryFinder.getFactory(portletConfig,
BridgeFactoryFinder.BRIDGE_REQUEST_SCOPE_FACTORY);

with

this.bridgeRequestScopeFactory = new BridgeRequestScopeFactoryImpl();

So far so good, but now I get the following error when I'm trying to add the portlet to a page:

17:02:11,749 ERROR [SerializableSessionAttributeListener:42] org.icefaces.application.WindowScopeManager is not serializable and will prevent this session from being replicated
17:02:11,749 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.SessionViewManager is not serializable and will prevent this session from being replicated
17:02:11,749 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.SessionViewManager is not serializable and will prevent this session from being replicated
17:02:11,749 ERROR [SerializableSessionAttributeListener:42] org.icefaces.application.LazyPushManager is not serializable and will prevent this session from being replicated
17:02:11,749 ERROR [SerializableSessionAttributeListener:42] org.icefaces.push.DynamicResourceDispatcher is not serializable and will prevent this session from being replicated
15.07.2010 17:02:11 com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [/icefaces2-compat-portlet Die ELResolvers für JSF wurden nicht im JSP-Container registriert.
17:02:11,827 ERROR [SerializableSessionAttributeListener:42] org.icefaces.application.WindowScopeManager is not serializable and will prevent this session from being replicated
java.lang.NullPointerException
at org.icefaces.event.BridgeSetup.processEvent(BridgeSetup.java:142)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:102)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2040)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2016)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:298)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:242)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:666)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:666)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:104)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

I attached the complete log file of the Weblogic managed server, on which all the stuff is running.

Thankful for any ideas!


Cheers, Jörn
thumbnail
Neil Griffin, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Thanks so much for finding this problem. I mentioned it to ICEsoft and Ted Goddard created an ICEfaces JIRA issue to track it: http://jira.icefaces.org/browse/ICE-5901
PortletFaces Community Member, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Regular Member Postagens: 199 Data de Entrada: 03/04/12 Postagens Recentes
Hi Neil,
thanks for your fast answer/action - but can you explain me why this goes wrong in th eweblogic environment:


in BridgeImpl.java (method init(...)):

this.bridgeRequestScopeFactory = (BridgeRequestScopeFactory) BridgeFactoryFinder.getFactory(portletConfig,
BridgeFactoryFinder.BRIDGE_REQUEST_SCOPE_FACTORY);

Thank you in advance!
thumbnail
Ralph Soika, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Junior Member Postagens: 34 Data de Entrada: 28/10/08 Postagens Recentes
Hi,
I also got the following exception when I try to view my portlet the first time:

[#|2010-08-02T12:02:25.498+0000|INFO|glassfishv3.0|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=30;_ThreadName=Thread-1;|JSF1027: [/imixs-workflow-portlet Die ELResolvers für JSF wurden nicht im JSP-Container registriert.|#]


What did 'Die ELResolvers für JSF wurden nicht im JSP-Container registriert' mean?

Thanks for help
ralph
thumbnail
Neil Griffin, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
I have seen this warning "The ELResolvers for JSF were not registered in the JSP container" before but it has always been benign. Is it stopping your portlet from working?
thumbnail
Ralph Soika, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Junior Member Postagens: 34 Data de Entrada: 28/10/08 Postagens Recentes
Yes in all of my examples the managed-bean expressions are ignored. My .html pages are shown inside the portlet, but things like

<h:inputText size="50" value="#{echo.text}">

are ignored. I think the problem seems to be the combination of liferay 6.0.4 and glassfish 3.0.0 as provided by the liferay bundle.
thumbnail
Neil Griffin, modificado 13 Anos atrás.

RE: NPE in BridgeImpl.java

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
All of our testing of the portletfaces-bridge has been with Tomcat so far. We had problems reported with GlassFish back in April with this thread: http://www.liferay.com/community/forums/-/message_boards/view_message/13289102

FYI, it is my best understanding that JBoss will be fixing https://jira.jboss.org/jira/browse/WELD-510 in Weld 1.1 (September 2010).
thumbnail
Neil Griffin, modificado 11 Anos atrás.

RE: NPE in BridgeImpl.java

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
For updates on CDI/Weld integration with Liferay Faces Bridge, please refer to FACES-1211.