Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jörn Kolberg
NPE in BridgeImpl.java
July 15, 2010 6:09 AM
Answer

Jörn Kolberg

Rank: New Member

Posts: 6

Join Date: May 26, 2011

Recent Posts

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
Jörn Kolberg
RE: NPE in BridgeImpl.java
July 15, 2010 10:06 AM
Answer

Jörn Kolberg

Rank: New Member

Posts: 6

Join Date: May 26, 2011

Recent Posts

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
Neil Griffin
RE: NPE in BridgeImpl.java
July 15, 2010 1:32 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2233

Join Date: July 26, 2005

Recent Posts

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
RE: NPE in BridgeImpl.java
July 20, 2010 7:28 AM
Answer

PortletFaces Community Member

Rank: Regular Member

Posts: 201

Join Date: April 2, 2012

Recent Posts

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!
Ralph Soika
RE: NPE in BridgeImpl.java
August 2, 2010 7:05 AM
Answer

Ralph Soika

Rank: Junior Member

Posts: 34

Join Date: October 28, 2008

Recent Posts

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
Neil Griffin
RE: NPE in BridgeImpl.java
August 2, 2010 10:46 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2233

Join Date: July 26, 2005

Recent Posts

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?
Ralph Soika
RE: NPE in BridgeImpl.java
August 2, 2010 4:13 PM
Answer

Ralph Soika

Rank: Junior Member

Posts: 34

Join Date: October 28, 2008

Recent Posts

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.
Neil Griffin
RE: NPE in BridgeImpl.java
April 10, 2012 3:50 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2233

Join Date: July 26, 2005

Recent Posts

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).
Neil Griffin
RE: NPE in BridgeImpl.java
May 8, 2012 4:14 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2233

Join Date: July 26, 2005

Recent Posts

For updates on CDI/Weld integration with Liferay Faces Bridge, please refer to FACES-1211.