Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 12, 2013 12:07 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Juan Gonzalez November 12, 2013 2:49 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 13, 2013 5:11 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Vernon Singleton November 13, 2013 5:27 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 13, 2013 5:41 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Vernon Singleton November 13, 2013 5:54 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 18, 2013 5:40 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Juan Gonzalez November 13, 2013 6:07 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 12:45 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Juan Gonzalez November 15, 2013 1:12 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 1:45 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Juan Gonzalez November 15, 2013 1:49 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 2:28 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Neil Griffin November 15, 2013 6:42 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 8:15 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Neil Griffin November 15, 2013 7:55 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 7:46 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Neil Griffin November 15, 2013 7:55 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 15, 2013 8:06 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Neil Griffin November 15, 2013 10:25 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Andy L November 18, 2013 5:04 AM
RE: How to aggregate JSF 1.2 applications into Liferay Portlet Neil Griffin November 18, 2013 6:51 AM
Andy L
How to aggregate JSF 1.2 applications into Liferay Portlet
November 12, 2013 12:07 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi guys,

Currently I have a JSF 1.2 project, and I want to use it in Liferay portlet.

Since it is a big project, it is impossible to upgrade to JSF 2.x within a short time.

From https://www.liferay.com/community/wiki/-/wiki/Main/Liferay+Faces+Version+Scheme, it is possible to use JSF 1.2 in Liferay portlet if:
- Liferay Faces Version is 2.1.x
- Liferay Portal Version is 6.1.x

How can I exactly use it? If I follow the Developer's Guide, http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/creating-a-portl-3, it creates Portlet for JSF 2.x, not for JSF 1.2.

I am wondering if there is a way to create a Liferay Portel for JSF 1.2?

Many thanks.
Juan Gonzalez
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 12, 2013 2:49 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 28, 2008

Recent Posts

Hi Andy,

right now I can't see any maven archetype for that version combination.

So you can clone liferay faces 2.1 repository:

https://github.com/liferay/liferay-faces/tree/2.1.x

And then you can use any of the demos here:

https://github.com/liferay/liferay-faces/tree/2.1.x/demos/bridge
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 13, 2013 5:11 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Juan,

Thanks for the information.

I used the demo you gave, and now I have created a JSF 1.2 application and I can add it as a portlet, but the JSF app doesn't appear in the page, it says "TestApp is temporarily unavailable." and I got the following errors:

SEVERE: Servlet.service() for servlet TestApp Servlet threw exception
javax.portlet.faces.BridgeException: java.lang.ClassCastException: com.liferay.faces.bridge.context.ServletRequestAdapterImpl cannot be cast to javax.servlet.http.HttpServletRequest
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:91)
at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:602)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:675)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:382)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1222)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:99)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:5749)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:5698)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at com.sun.proxy.$Proxy394.renderPortlet(Unknown Source)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1619)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:92)
at com.liferay.portal.action.UpdateLayoutAction.addPortlet(UpdateLayoutAction.java:314)
at com.liferay.portal.action.UpdateLayoutAction.getJSON(UpdateLayoutAction.java:266)
at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:75)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:559)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:536)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:355)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:314)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:46)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:191)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: com.liferay.faces.bridge.context.ServletRequestAdapterImpl cannot be cast to javax.servlet.http.HttpServletRequest
at com.sun.faces.context.ExternalContextImpl.getRequestHeaderMap(ExternalContextImpl.java:278)
at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(PartialViewContextImpl.java:109)
at com.sun.faces.context.ExceptionHandlerFactoryImpl.getExceptionHandler(ExceptionHandlerFactoryImpl.java:61)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:98)
at com.liferay.faces.bridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:56)
at com.liferay.faces.bridge.BridgePhaseBaseImpl.getFacesContext(BridgePhaseBaseImpl.java:356)
at com.liferay.faces.bridge.BridgePhaseBaseImpl.init(BridgePhaseBaseImpl.java:188)
at com.liferay.faces.bridge.BridgePhaseCompatImpl.init(BridgePhaseCompatImpl.java:52)
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:119)
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:85)
... 127 more

I used the jars of alloy, bridge-api, bridge-impl, portal and util with version 2.1.3-ga4.

Any clue what is going on here?

Any advice would be appreciated!!
Thanks!
Vernon Singleton
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 13, 2013 5:27 AM
Answer

Vernon Singleton

LIFERAY STAFF

Rank: Regular Member

Posts: 162

Join Date: January 14, 2013

Recent Posts

Hi Andy,

Were you able to try the jsf1-portlet demo?
Is it working ok on your installation of Liferay Portal?

- Vernon
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 13, 2013 5:41 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Vernon,

No, I didn't succeed. I failed to build the jsf1-portlet demo using maven. Maybe I did it incorrectly.

Can you tell me how to build the demo?

Thanks.
Vernon Singleton
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 13, 2013 5:54 AM
Answer

Vernon Singleton

LIFERAY STAFF

Rank: Regular Member

Posts: 162

Join Date: January 14, 2013

Recent Posts

What error are you getting?

You can follow the basic instructions here.
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 18, 2013 5:40 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

By following the instruction, when executing "mvn clean package", I got this error:

Scanning for projects...
Downloading: http://repository.liferay.com/content/repositories/thirdparty//org/sonatype/oss/oss-parent/7/oss-parent-7.pom
389b downloaded
*** CHECKSUM FAILED - Checksum failed on download: local = 'c94727ac7668d057d423dbfe404295b6f3c77d68'; remote = '<!DOCTYPE' - RETRYING
Downloading: http://repository.liferay.com/content/repositories/thirdparty//org/sonatype/oss/oss-parent/7/oss-parent-7.pom
389b downloaded
*** CHECKSUM FAILED - Checksum failed on download: local = 'c94727ac7668d057d423dbfe404295b6f3c77d68'; remote = '<!DOCTYPE' - IGNORING
------------------------------------------------------------------------
FATAL ERROR
------------------------------------------------------------------------
Error building POM (may not be this project's POM).


Project ID: com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT

Reason: Cannot find parent: org.sonatype.oss:oss-parent for project: com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT for project com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT


------------------------------------------------------------------------
Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.sonatype.oss:oss-parent for project: com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT for project com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.sonatype.oss:oss-parent for project: com.liferay.faces:liferay-faces:pom:2
.1.4-ga5-SNAPSHOT for project com.liferay.faces:liferay-faces:pom:2.1.4-ga5-SNAPSHOT
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
... 11 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.sonatype.oss:oss-parent at C:\Users\lan\.m2\repository\org\
sonatype\oss\oss-parent\7\oss-parent-7.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1581)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1553)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:560)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366)
... 17 more
------------------------------------------------------------------------
Total time: 1 second
Finished at: Wed Nov 13 14:59:19 CET 2013
Final Memory: 2M/121M
------------------------------------------------------------------------
Juan Gonzalez
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 13, 2013 6:07 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 28, 2008

Recent Posts

Hi Andy, follow the link instructions as Vernon said.

Probably your project is not following the required structure (parent pom.xml etc).
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 12:45 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Juan,

Thanks for replying.

Now I have another issue:
SEVERE: Servlet.service() for servlet MyPortal Servlet threw exception
javax.portlet.faces.BridgeException: javax.faces.FacesException: java.lang.ClassCastException: com.liferay.portlet.RenderRequestImpl cannot be cast to javax.servlet.ServletRequest
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:91)
at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)
.........

Any advice? I am using the libraries for liferay faces 2.1.3.

Thanks.
Juan Gonzalez
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 1:12 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 28, 2008

Recent Posts

Hi Andy,

how did you build your portlet? You made it from the jsf1 portlet demo or from scratch?

Please post here your steps how you implement it so we can see all the possible wrong steps.

Thanks.
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 1:45 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Juan,

I build it from scratch. Here are my steps:

1. Create a JSF 1.2 application, in this application, I define a Bean to just do some simple calculations. One .jsp page is defined for the view.
2. Add 5 libraries for liferay faces 2.1.3: alloy, bridge api and etc.
3. Copy liferay-display.xml, liferay-portlet.xml and portlet.xml from "\demos\bridge\jsf1-portlet\src\main\webapp\WEB-INF" to "\WebContent\WEB-INF" of my JSF 1.2 app, do some changes in these files: for example, change portlet-name, set the portlet default view and ect. web.xml and faces-config.xml are not modified.

After compiling and deploying the application, I try to add this application as a portlet to the page, but the portlet displays "Portlet is temporarily unavailable" and the above error messages in the console.

Am I missing some configurations?

Thanks.
Juan Gonzalez
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 1:49 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 28, 2008

Recent Posts

Andy L:

1. Create a JSF 1.2 application, in this application, I define a Bean to just do some simple calculations. One .jsp page is defined for the view.


What are you using for creating the JSF 1.2 application? Liferay IDE? Are you creating as a portlet or a a plain JSF webapp?

Andy L:

After compiling and deploying the application, I try to add this application as a portlet to the page, but the portlet displays "Portlet is temporarily unavailable" and the above error messages in the console.

Same as before. Are you using the ant tasks from Liferay 6.1 SDK?
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 2:28 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

What are you using for creating the JSF 1.2 application? Liferay IDE? Are you creating as a portlet or a a plain JSF webapp?


I create it as a plain JSF web application. Since Liferay IDE can only create JSF 2.x app.

Same as before. Are you using the ant tasks from Liferay 6.1 SDK?


I didn't use the ant tasks from Liferay 6.1 SDK. I will give a try, thanks.
Neil Griffin
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 6:42 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1997

Join Date: July 26, 2005

Recent Posts

Hi Andy,

What is your JSF view technology?

1. JSP views with .jsp or .jspx extension
2. Facelet views with .jsp or .jspx extension
3. Facelet views with .xhtml extension

Thanks,

Neil
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 8:15 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Neil,

For the JSF view technology, I use JSP views with .jsp.

I just created a portlet jsf project by using liferay plugins sdk 6.1.1, in the project, I aggregates my JSF 1.2 projects and in the "ivy.xml", I changed the dependency versions: use 1.2 for jsf related libraries; use 2.1.3 for liferay faces related libraries.

Then I deployed it using the ant tasks, the .war file can be created, but when I add it as a portlet to the page, I still got this error:

ERROR java.lang.ClassCastException: com.liferay.faces.bridge.context.ServletRequestAdapterImpl cannot be cast to javax.servlet.http.HttpServletRequest
at com.sun.faces.context.ExternalContextImpl.getRequestHeaderMap(ExternalContextImpl.java:282)
at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(PartialViewContextImpl.java:110)
at com.sun.faces.context.ExceptionHandlerFactoryImpl.getExceptionHandler(ExceptionHandlerFactoryImpl.java:65)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:98)
at com.liferay.faces.bridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:56)
at com.liferay.faces.bridge.BridgePhaseBaseImpl.getFacesContext(BridgePhaseBaseImpl.java:356)
at com.liferay.faces.bridge.BridgePhaseBaseImpl.init(BridgePhaseBaseImpl.java:188)
at com.liferay.faces.bridge.BridgePhaseCompatImpl.init(BridgePhaseCompatImpl.java:52)
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:119)
at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:85)
at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)

Thank you.
Neil Griffin
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 7:55 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1997

Join Date: July 26, 2005

Recent Posts

Hi Andy,

OK, I would recommend that you start over / start new.

First, download the jsf1-jsp-portlet.war artifact and copy it to your $LIFERAY_HOME/deploy folder.

Add the "JSF1 JSP" portlet to a portal page, and let us know if it works OK for you.

BTW the source code can be found here:
https://github.com/liferay/liferay-faces/tree/2.1.3-ga4/demos/bridge/jsf1-jsp-portlet

Neil
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 7:46 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

The download link is for "jsf2-jsp-portlet.war".

It works for me, I can add "JSF2 JSP" portlet to my portal page.
Neil Griffin
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 7:55 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1997

Join Date: July 26, 2005

Recent Posts

Sorry about that. I just updated the link with correct address for jsf1-jsp-portlet.war
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 8:06 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

No problem.

No, "JSF1 JSP" doesn't work, and I got the exactly the same error.

I am using liferay-portal-6.1.2-ce-ga3 for jboss.
Neil Griffin
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 15, 2013 10:25 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1997

Join Date: July 26, 2005

Recent Posts

Hi Andy,

Oh now that you mention "jboss" then I think I know what the problem might be. The Liferay 6.1 JBoss bundle ships with JBoss 7.1, which comes with JSF 2.1 (Mojarra 2.1) pre-installed, which is why the jsf2-jsp-portlet works but the jsf1-jsp-portlet does not.

I would recommend that you try changing JBoss 7.1 to use JSF 1.2 instead. You might be able to do it with a jboss-deployment-structure.xml like this stackoverflow post says, or you might have to edit jboss-7.1.1/modules/com/sun/jsf-impl/main/module.xml so that it points to the JSF 1.2 version specified in jboss-7.1.1/modules/com/sun/jsf-impl/1.2/module.xml

Kind Regards,

Neil
Andy L
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 18, 2013 5:04 AM
Answer

Andy L

Rank: New Member

Posts: 11

Join Date: November 11, 2013

Recent Posts

Hi Neil,

Thanks for the help. Indeed, that was the problem, I have fixed the issue according to https://community.jboss.org/thread/170729.
Neil Griffin
RE: How to aggregate JSF 1.2 applications into Liferay Portlet
November 18, 2013 6:51 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1997

Join Date: July 26, 2005

Recent Posts

Glad to hear you got it working. Thanks for using Liferay Faces emoticon