Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
devaraj s
No bean named 'com.liferay.portal.service.User' is defined
April 1, 2013 2:06 AM
Answer

devaraj s

Rank: Regular Member

Posts: 209

Join Date: May 21, 2012

Recent Posts

Hi everyone, I am not able to add new blogs from liferay blogs portlet. Here I am posting exception i am getting please anyone help me. Whats going wrong in portal.

  108:55:17,552 ERROR [http-bio-8080-exec-14][ServiceLocator:39] com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.service.User' is defined
  2com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.service.User' is defined
  3    at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:89)
  4    at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:86)
  5    at com.liferay.portal.velocity.ServiceLocator.findService(ServiceLocator.java:36)
  6    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  7    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  8    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  9    at java.lang.reflect.Method.invoke(Method.java:597)
 10    at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
 11    at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
 12    at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
 13    at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
 14    at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
 15    at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
 16    at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
 17    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
 18    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
 19    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
 20    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
 21    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
 22    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
 23    at org.apache.velocity.Template.merge(Template.java:328)
 24    at org.apache.velocity.Template.merge(Template.java:235)
 25    at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
 26    at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:264)
 27    at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:281)
 28    at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:83)
 29    at com.liferay.taglib.util.ThemeUtil.doIncludeVM(ThemeUtil.java:494)
 30    at com.liferay.taglib.util.ThemeUtil.doDispatch(ThemeUtil.java:178)
 31    at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:134)
 32    at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:100)
 33    at com.liferay.taglib.theme.IncludeTag.doEndTag(IncludeTag.java:39)
 34    at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:479)
 35    at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:424)
 36    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 37    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 38    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 39    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 40    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 41    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 42    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 43    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 44    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 45    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 46    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
 47    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 48    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 49    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 50    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 51    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 52    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 53    at com.liferay.portal.struts.StrutsUtil.forward(StrutsUtil.java:79)
 54    at com.liferay.portal.struts.PortalRequestProcessor.doForward(PortalRequestProcessor.java:282)
 55    at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
 56    at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
 57    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
 58    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
 59    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 60    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 61    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 62    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
 63    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
 64    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 65    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 66    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 67    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 68    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 69    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 70    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 71    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 72    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 73    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 74    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
 75    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 76    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 77    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 78    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
 79    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 80    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 81    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 82    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 83    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 84    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 85    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:138)
 86    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 87    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 88    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 89    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 90    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 91    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 92    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 93    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:335)
 94    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 95    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 96    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 97    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 98    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 99    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
100    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
101    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
102    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
103    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
104    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
105    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
106    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
107    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
108    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
109    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
110    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
111    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
112    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
113    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
114    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
115    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
116    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
117    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:246)
118    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
119    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
120    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
121    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
122    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
123    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
124    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
125    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
126    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
127    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
128    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
129    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
130    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
131    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
132    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
133    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
134    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
135    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
136    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
137    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
138    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
139    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
140    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
141    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
142    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
143    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
144    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
145    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
146    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
147    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
148    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
149    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
150    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
151    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
152    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
153    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
154    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
155    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
156    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
157    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
158    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
159    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
160    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
161    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
162    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
163    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
164    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
165    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
166    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
167    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
168    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
169    at java.lang.Thread.run(Thread.java:619)
170Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.portal.service.User' is defined
171    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
172    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
173    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
174    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
175    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
176    at com.liferay.portal.bean.BeanLocatorImpl.doLocate(BeanLocatorImpl.java:125)
177    at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:83)
178    ... 166 more



Thanks in advance.
Amos Fong
RE: No bean named 'com.liferay.portal.service.User' is defined
April 1, 2013 4:30 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1898

Join Date: October 7, 2008

Recent Posts

It looks like it's an issue with a .vm template. You are doing a serviceLocator.locate() to a non-existent service. The User service is "com.liferay.portal.service.UserLocalService", not "com.liferay.portal.service.User".
devaraj s
RE: No bean named 'com.liferay.portal.service.User' is defined
April 1, 2013 10:57 PM
Answer

devaraj s

Rank: Regular Member

Posts: 209

Join Date: May 21, 2012

Recent Posts

Amos Fong:
It looks like it's an issue with a .vm template. You are doing a serviceLocator.locate() to a non-existent service. The User service is "com.liferay.portal.service.UserLocalService", not "com.liferay.portal.service.User".


Yes Amos Fong yours rite. I used com.liferay.portal.service.User instead of com.liferay.portal.service.UserLocalService for the reason it was throwing the above exception.

but here still my blogs portlet not working. when i click on add blog entry its not redirecting to page to add a blog. even I tried with classic theme still have same issue.
it seems it has some other issue , please can you help me.
devaraj s
RE: No bean named 'com.liferay.portal.service.User' is defined
April 1, 2013 11:23 PM
Answer

devaraj s

Rank: Regular Member

Posts: 209

Join Date: May 21, 2012

Recent Posts

forgot to mention. I used to restore Db , Please suggest me the the solution if because of this restoring Db, blogs and message portlet not working.

Note: I am sure I used to restore DB of same liferay version. and also matched properties in portal-ext.properties file.
devaraj s
RE: No bean named 'com.liferay.portal.service.User' is defined
April 2, 2013 4:21 AM
Answer

devaraj s

Rank: Regular Member

Posts: 209

Join Date: May 21, 2012

Recent Posts

got solution. link