使用liferay中的finder方法的NoSuchBeanDefinitionException

时间:2017-02-06 11:33:38

标签: liferay liferay-service-builder

我正在使用服务构建器来访问portlet中的数据库。

我有一个finder方法,在使用它时我想出了类强制转换异常。

List<comparisoninfo> comparisoninfo = comparisoninfoLocalServiceUtil
                    .findByuser_id(email);

代码:

ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest
                .getAttribute(WebKeys.THEME_DISPLAY);

currentUrl = themeDisplay.getURLCurrent();

String email = themeDisplay.getUser().getEmailAddress();
renderRequest.setAttribute("email", email);

try {
    List<comparisoninfo> comparisoninfo = comparisoninfoLocalServiceUtil.findByuser_id(email);

    _log.info("comparisoninfo " + comparisoninfo);

    renderRequest.setAttribute("basicinfo", comparisoninfo);

} catch (SystemException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

这是使用finder方法的堆栈跟踪ClassCastException:

SEVERE: Servlet.service() for servlet compsupport Servlet threw exception
java.lang.ClassCastException: com.compass.model.impl.comparisoninfoImpl cannot be cast to com.compass.model.comparisoninfo
    at com.compass.service.persistence.comparisoninfoPersistenceImpl.findByuser_id(comparisoninfoPersistenceImpl.java:179)
    at com.compass.service.persistence.comparisoninfoPersistenceImpl.findByuser_id(comparisoninfoPersistenceImpl.java:121)
    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:606)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice.java:54)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy498.findByuser_id(Unknown Source)
    at com.compass.service.impl.comparisoninfoLocalServiceImpl.findByuser_id(comparisoninfoLocalServiceImpl.java:54)
    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:606)
    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
    at com.sun.proxy.$Proxy496.findByuser_id(Unknown Source)
    at com.compass.service.comparisoninfoLocalServiceUtil.findByuser_id(comparisoninfoLocalServiceUtil.java:281)
    at com.compass.controller.TeleAssist.doView(TeleAssist.java:63)
    at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:213)
    at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:323)
    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:112)
    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:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
    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:583)

我尝试找到原因并找到以下帖子:

Liferay Many-to-Many RelationShip Throws Class Cast Exception

ClassCastException while implementing Many to many mapping with Liferay Service Builder

exception":"java.lang.ClassCastException in liferay service builder

根据我的理解,这里ClassCastException的主要原因是重复的类文件,可以在WEB-INF / classes文件夹中或在WEB-INF / lib中

我有3个导致此问题的portlet。

现在我尝试的是:

  1. 在liferay / deploy中部署应用程序。
  2. 关闭Liferay
  3. 将服务jar从WEB-INF / lib从portlet移动到tomcat的/ lib / ext
  4. 从tomcat中删除temp和work文件夹
  5. 重新启动tomcat。
  6. 这适用于2个portlet,现在我没有面对它们的ClassCastException,但对于第三个portlet,我得到了org.springframework.beans.factory.NoSuchBeanDefinitionException,并且portlet变得无法访问。

    完整堆栈跟踪:

    Feb 06, 2017 7:01:33 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet compsupport Servlet threw exception com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.compass.service.comparisoninfoLocalService' is defined     
    at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:122)     
    at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:51)     
    at com.compass.service.comparisoninfoLocalServiceUtil.getService(comparisoninfoLocalServiceUtil.java:290)   
    at com.compass.service.comparisoninfoLocalServiceUtil.findByuser_id(comparisoninfoLocalServiceUtil.java:281)    
    at com.compass.controller.TeleAssist.doView(TeleAssist.java:63)     
    at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:213)     
    at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:323)  
    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:112)    
    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:116)   
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)  
    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:583)   
    at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:656)     
    at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:362)   
    at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1233)  
    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:57)  
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)   
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)  
    at com.liferay.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:655)    
    at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:138)   
    at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:141)     
    at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)     
    at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:156)     
    at com.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:125)    
    at com.liferay.portal.layoutconfiguration.util.PortletRenderer.render(PortletRenderer.java:72)  
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:452)  
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:284)     
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:113)    
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:124)    
    at com.liferay.portal.layoutconfiguration.util.RuntimePageUtil.processTemplate(RuntimePageUtil.java:69)     
    at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:556)     
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)   
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)     
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)  
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)     
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)    
    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:116)   
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)  
    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.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:302)   
    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:405)  
    at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:200)  
    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:95)     
    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:178)    
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)  
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)     
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)     
    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:549)   
    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:526)     
    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:116)   
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)  
    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:293)  
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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:42)    
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)   
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)  
    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.processRequest(ApplicationDispatcher.java:487)    
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)     
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)   
    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:156)   
    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:116)   
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)  
    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:359)     
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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.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:204)    
    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:293)  
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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.i18n.I18nFilter.processFilter(I18nFilter.java:243)    
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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.etag.ETagFilter.processFilter(ETagFilter.java:86)     
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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:42)    
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:267)     
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)   
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)  
    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.processRequest(ApplicationDispatcher.java:487)    
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)     
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)   
    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:320)   
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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:185)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)    
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)   
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)    
    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:165)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)    
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)    
    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:96)  
    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:502)   
    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:1023)  
    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(ThreadPoolExecutor.java:1145)  
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
    at java.lang.Thread.run(Thread.java:745) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.compass.service.comparisoninfoLocalService' is defined  
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)  
    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)    
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)    
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)  
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)     
    at com.liferay.portal.bean.BeanLocatorImpl.doLocate(BeanLocatorImpl.java:178)   
    at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:95)  
    ... 171 more
    

    如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

通常在这些情况下我使用liferay - &gt;清理和编译。试试这个吧。它会对你有所帮助。