Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Fateh Alchhabi
ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 9:23 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Hi All
I build IceFace Portlet Using the following tools
Netbeans 7.1.2 portalpack_3_0_5
my Jar List is :
icefaces-3.1.0
icefaces-ace-3.1.0
icefaces-compat-3.1.0
jboss-el-2.0.0.GA
jsf-api-2.1.3-b02
jsf-impl-2.1.3-b02
liferay-faces-alloy-3.0.0-ga1
liferay-faces-bridge-api-3.0.0-ga1
liferay-faces-bridge-impl-3.0.0-ga1
liferay-faces-portal-3.0.0-ga1
liferay-faces-util-3.0.0-ga1
commons-fileupload-1.2.2
commons-io-1.3.2


i build my portlet with help from Mr.Neil Griffin in the following post
https://www.liferay.com/community/forums/-/message_boards/message/18029488

my portlet Words Perfectly in liferay 6.0.5 & 6.0.6
but when i want to test it on Liferay EE 6.0sp2
it's deployed and i could see it in the portlet list but it not working at all and give this exception

16:50:36,386 ERROR [PortletBeanLocatorUtil:38] BeanLocator is null for servlet context CourseLibx
16:50:36,389 ERROR [render_portlet_jsp:154] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context CourseLibx
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:42)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.initConfig(CourseLibraryBean.java:130)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.<init>(CourseLibraryBean.java:87)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:69)
at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:329)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:258)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:277)

16:50:36,390 ERROR [InsertTag:922] ServletException in '/html/common/themes/portlet.jsp': File &quot;/CourseLibraryView/invoke&quot; not found
javax.servlet.ServletException: File &quot;/CourseLibraryView/invoke&quot; not found
at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:335)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:624)
at com.liferay.portal.kernel.servlet.PageContextWrapper.include(PageContextWrapper.java:168)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1877)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4274)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4233)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1312)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:86)
at com.liferay.portal.action.UpdateLayoutAction.addPortlet(UpdateLayoutAction.java:257)
at com.liferay.portal.action.UpdateLayoutAction.getJSON(UpdateLayoutAction.java:210)
at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:59)
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:170)
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:637)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:516)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:493)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:301)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:207)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)
16:50:36,392 INFO [PortalImpl:4366] Current URL /web/wolfateh/home generates exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/html/common/themes/portlet.jsp': File &quot;/CourseLibraryView/invoke&quot; not found


Any Help plz
thanks in advance
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 9:49 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

The "/invoke" issue is a known bug in Liferay Portal 6.0.12 EE SP2 that has been fixed in 6.1.x CE/EE. Since you are an Enterprise Edition (EE) customer then Liferay Support could provide a backport fix for you if you were to report this issue in LESA.
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 11:32 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

are right this exception i can see it even in your demo portlet but after page refresh the demo portlet works fine

could tell me about the reason of the first exception or solution ?

16:50:36,386 ERROR [PortletBeanLocatorUtil:38] BeanLocator is null for servlet context CourseLibx
16:50:36,389 ERROR [render_portlet_jsp:154] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context CourseLibx
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:42)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.initConfig(CourseLibraryBean.java:130)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.<init>(CourseLibraryBean.java:87)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:69)
at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:329)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:258)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:277)



do you think because of service builder because i used portal pack portalpack_3_0_5 or because of icefaces or something else ?
do you think if i change to primefaces or something else may it solve the problem ?
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 11:44 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

Hi Fateh,

I haven't investigated the cause of the "/invoke" problem so I don't know the answer. Regarding the BeanLocatorException though, when upgrading to a new version of Liferay Portal, it's best to run "ant build-service" again and regenerate. So I would recommend that you try that and see if it fixes the problem.

Kind Regards,

Neil
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 11:48 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Thanks for your quick answer
i will try to regenerate the Service builder cleasses on EE SDK
Hope it will help me out ,,, because i reach the died-line for the project and i'm facing the died -end in this bug emoticon
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 12:15 PM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

I regenerate the Servicebuilder's classes using :
Liferay_Developer_Studio_1.3.1
liferay-plugins-sdk-6.0-ee-sp2-20110727
then i replace the new generated jar with the old one .
bu not thing change the same exception come out

20:10:30,782 ERROR [PortletBeanLocatorUtil:38] BeanLocator is null for servlet context CourseLibx
20:10:30,784 ERROR [render_portlet_jsp:154] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context CourseLibx
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:42)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.initConfig(CourseLibraryBean.java:130)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.<init>(CourseLibraryBean.java:87)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:69)
at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:329)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:258)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:277)


any more Ideas or any more extra steps required ???
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 12:20 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

If you are an existing Liferay EE customer, then I would recommend that you open a ticket in LESA.

But I just did a Google search for "BeanLocator is null for servlet context" and found some similar posts like this one that might help.
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 12:29 PM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

It's Not helped At all emoticon
thanks alot for your help
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 12:35 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

What does your web.xml file look like in your Plugins SDK source project? (not the deployed one in tomcat/webapps).
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 20, 2012 5:13 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

One approach that I would recommend that you try, is this:

(1) Create a NEW portlet with the Liferay 6.0.12 EE SP2 Plugins SDK

(2) Copy your service.xml from your broken portlet to the new portlet source code

(3) Run "ant build-service" for the new portlet and generate the service layer

(4) Deploy the new portlet and make sure that it works

(5) Copy pieces of your broken portlet over to the new portlet, and redeploy after each piece, making sure that it continues to work OK after each piece.

That way, you might be able to isolate what is causing the problem.
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 21, 2012 11:44 PM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Neil Griffin:
What does your web.xml file look like in your Plugins SDK source project? (not the deployed one in tomcat/webapps).



Mr.Neil
i attach my Source Code web.xml
wish it will be hlepful
Attachments: web.xml (1.4k)
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 22, 2012 3:59 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Neil Griffin:
One approach that I would recommend that you try, is this:

(1) Create a NEW portlet with the Liferay 6.0.12 EE SP2 Plugins SDK

(2) Copy your service.xml from your broken portlet to the new portlet source code

(3) Run "ant build-service" for the new portlet and generate the service layer

(4) Deploy the new portlet and make sure that it works

(5) Copy pieces of your broken portlet over to the new portlet, and redeploy after each piece, making sure that it continues to work OK after each piece.

That way, you might be able to isolate what is causing the problem.



I Rebild my Project on
Liferay_Developer_Studio_1.3.1-v201109081238-win32
liferay-plugins-sdk-6.0-ee-sp2-20110727
liferay-portal-6.0-ee-sp2

and rebuild the Services but i faces this issue in the generated classes
Type mismatch: cannot convert from SwCourseLibraryConfig to PersistedModel
and the same issue for the following generated methods :

01)
package com.smartway.portlet.courselibrary.service.base;
public PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException, SystemException {
return swCourseLibraryConfigPersistence.findByPrimaryKey(primaryKeyObj);
}
public void afterPropertiesSet() {
PersistedModelLocalServiceRegistryUtil.register("com.smartway.portlet.courselibrary.model.SwCourseLibraryConfig",
swCourseLibraryConfigLocalService);
}

02)
package com.smartway.portlet.courselibrary.service.base;
public PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException, SystemException {
return swCoursePersistence.findByPrimaryKey(primaryKeyObj);
}
public List<SwCourse> getSwCourses(int start, int end)
throws SystemException {
return swCoursePersistence.findAll(start, end);
}

so i just Casting this methods like this
public void afterPropertiesSet() {
PersistedModelLocalServiceRegistryUtil.register("com.smartway.portlet.courselibrary.model.SwCourseLibraryConfig",
(PersistedModelLocalService) swCourseLibraryConfigLocalService);
}

on the compile no errors show up but on the deploy i got the following exceptions

11:19:44,009 INFO [PortletAutoDeployListener:81] Portlets for /home/tabuk/tabukEE/liferay-portal-6.0-ee-sp2/deploy/CoursesLib-portlet-6.0.12.1.war copied successfully. Deployment will start in a few seconds.
Dec 22, 2012 11:19:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory CoursesLib-portlet
Loading file:/home/tabuk/tabukEE/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/temp/19-CoursesLib-portlet/WEB-INF/classes/service.properties
Loading file:/home/tabuk/tabukEE/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/temp/19-CoursesLib-portlet/WEB-INF/classes/service.properties
11:19:52,747 ERROR [ContextLoader:220] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:88)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:93)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1383)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:135)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:177)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor.postProcessBeforeInitialization(BeanReferenceAnnotationBeanPostProcessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 34 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:135)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:177)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor.postProcessBeforeInitialization(BeanReferenceAnnotationBeanPostProcessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 45 more
Caused by: java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at com.smartway.portlet.courselibrary.service.base.SwCourseLibraryConfigLocalServiceBaseImpl.afterPropertiesSet(SwCourseLibraryConfigLocalServiceBaseImpl.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 57 more
11:19:52,749 ERROR [PortalClassLoaderServletContextListener:96] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:88)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:93)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1383)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:135)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:177)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor.postProcessBeforeInitialization(BeanReferenceAnnotationBeanPostProcessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 34 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smartway.portlet.courselibrary.service.SwCourseLibraryConfigLocalService' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:135)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:177)
at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor.postProcessBeforeInitialization(BeanReferenceAnnotationBeanPostProcessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 45 more
Caused by: java.lang.ClassCastException: $Proxy379 cannot be cast to com.liferay.portal.service.PersistedModelLocalService
at com.smartway.portlet.courselibrary.service.base.SwCourseLibraryConfigLocalServiceBaseImpl.afterPropertiesSet(SwCourseLibraryConfigLocalServiceBaseImpl.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 57 more
11:20:28,451 ERROR [PortletBeanLocatorUtil:38] BeanLocator is null for servlet context CourseLibx
11:20:28,474 ERROR [render_portlet_jsp:154] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context CourseLibx
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:42)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.initConfig(CourseLibraryBean.java:126)
at com.smartway.portlet.courselibrary.beanz.CourseLibraryBean.<init>(CourseLibraryBean.java:83)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:69)
at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:329)
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:258)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:277)
Fateh Alchhabi
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 24, 2012 7:53 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Hi Mr.Neil
i notice some differences between the files generated in netbeans7.1.2(when i build my icefaces portlet) and the content of same file in your demo portlet(icefaces3-documents-portlet-3.0.0-ga1)

i provided you with those files in the attachment my portlet with those files works fine in "liferay 6.0.6 but on EE not" as i motioned earlier but when i change this content with the content in your (icefaces3-documents-portlet-3.0.0-ga1) my portlet not works on the liferay 6.0.6 and send Same exception previous
BeanLocator is null for servlet


so my Idea is maybe i missed some of the xml parameters
so could you plz Have look and i will be thankful

thanks in advanced
Attachments: WEB-INF.rar (3.0k)
Neil Griffin
RE: ICEFaces POrtlet Not loaded in EE 6.0sp2
December 26, 2012 9:03 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1973

Join Date: July 26, 2005

Recent Posts

I would recommend that you use the following text in your WEB-INF/web.xml descriptor source code (not the deployed one under tomcat/webapps). It's basically the same as what you attached, except that it has all of the Liferay-specific stuff removed:

 1<?xml version="1.0" encoding="UTF-8"?>
 2<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">
 3    <servlet>
 4        <servlet-name>Faces Servlet</servlet-name>
 5        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 6        <load-on-startup>1</load-on-startup>
 7    </servlet>
 8    <servlet-mapping>
 9        <servlet-name>Faces Servlet</servlet-name>
10        <url-pattern>/faces/*</url-pattern>
11    </servlet-mapping>
12</web-app>


Then, when you deploy your portlet, Liferay 6.0.12 SP2 should automatically change the deployed tomcat/webapps/portletwar/WEB-INF/web.xml and add the necessary entries to make the Spring BeanFactory work correctly with the generated Liferay services.