Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Service Builder - No current transaction manager
Hi.
I'm using service builder with default liferay datasource on Liferay
7.1 Wildfly, and have generated services and utility classes. I have
an entity named Category
. For example
CategoryLocalService
class work well, but I have a
problem with CategoryUtil
class specifically. The problem
is when a finder method is invoked on this class
like: CategoryUtil.findByName("Test")
, it
throws this exception:
2018-12-09 16:56:43.996 ERROR [default
task-3][BasePersistenceImpl:264] Caught unexpected exception<br>
java.lang.IllegalStateException: No current transaction
manager<br> at
com.liferay.portal.dao.orm.hibernate.VerifySessionFactoryWrapper._verify(VerifySessionFactoryWrapper.java:127)<br>
at
com.liferay.portal.dao.orm.hibernate.VerifySessionFactoryWrapper.openSession(VerifySessionFactoryWrapper.java:93)<br>
at
com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.openSession(BasePersistenceImpl.java:258)<br>
at
com.test.project.portal.service.persistence.impl.CategoryPersistenceImpl.findByName(CategoryPersistenceImpl.java:243)<br>
at
com.test.project.portal.service.persistence.impl.CategoryPersistenceImpl.findByName(CategoryPersistenceImpl.java:150)<br>
at
com.test.project.portal.service.persistence.impl.CategoryPersistenceImpl.findByName(CategoryPersistenceImpl.java:114)<br>
at
com.test.project.portal.service.persistence.CategoryUtil.findByName(CategoryUtil.java:121)<br>
at
com.test.test.project.FirstView.printCategories(projectFirstView.java:39)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:498)<br> at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)<br>
at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)<br>
at
org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)<br>
at
org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:171)<br>
at
org.jboss.weld.util.bean.IsolatedForwardingBean.create(IsolatedForwardingBean.java:45)<br>
at
com.sun.faces.application.view.ViewScopeContextManager.createBean(ViewScopeContextManager.java:142)<br>
at
com.sun.faces.application.view.ViewScopeContext.get(ViewScopeContext.java:137)<br>
at
org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76)<br>
at
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)<br>
at
org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)<br>
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742)<br>
at
org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107)<br>
at
org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:90)<br>
at
org.jboss.weld.environment.servlet.util.ForwardingELResolver.getValue(ForwardingELResolver.java:49)<br>
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188)<br>
at
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)<br>
at
com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)<br>
at
com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116)<br>
at com.sun.el.parser.AstValue.getBase(AstValue.java:151)<br>
at com.sun.el.parser.AstValue.getValue(AstValue.java:200)<br>
at
com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)<br>
at
org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)<br>
at
com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238)<br>
at
com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154)<br>
at
com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)<br>
at
com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)<br>
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)<br>
at
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)<br>
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)<br>
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)<br>
at
javax.faces.render.Renderer.encodeChildren(Renderer.java:176)<br>
at
javax.faces.render.RendererWrapper.encodeChildren(RendererWrapper.java:95)<br>
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)<br>
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)<br>
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)<br>
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)<br>
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)<br>
at
javax.faces.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:146)<br>
at
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)<br>
at
com.liferay.faces.bridge.application.internal.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:95)<br>
at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)<br>
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)<br>
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)<br>
at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)<br>
at
com.liferay.faces.bridge.internal.BridgePhaseHeaderRenderCommon.executeRender(BridgePhaseHeaderRenderCommon.java:220)<br>
at
com.liferay.faces.bridge.internal.BridgePhaseRenderCompatImpl.execute(BridgePhaseRenderCompatImpl.java:57)<br>
at
com.liferay.faces.bridge.internal.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:57)<br>
at
com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:161)<br>
at
javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:753)<br>
at
javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:397)<br>
at
javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:669)<br>
at
javax.portlet.GenericPortlet.render(GenericPortlet.java:291)<br>
at
com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:127)<br>
at
com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:58)<br>
at
com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:124)<br>
at
com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)<br>
at
com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.service(ServletExceptionAdapter.java:76)<br>
at
org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)<br>
at
org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
com.liferay.portal.osgi.web.wab.extender.internal.adapter.FilterExceptionAdapter.doFilter(FilterExceptionAdapter.java:46)<br>
at
org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)<br>
at
org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)<br>
at
org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)<br>
at
org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:118)<br>
at
org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)<br>
at
com.liferay.portlet.internal.InvokerPortletImpl.invoke(InvokerPortletImpl.java:606)<br>
at
com.liferay.portlet.internal.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:702)<br>
at
com.liferay.portlet.internal.InvokerPortletImpl.render(InvokerPortletImpl.java:399)<br>
at
com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.lambda$render$0(MonitoringInvokerPortlet.java:272)<br>
at
com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet._render(MonitoringInvokerPortlet.java:375)<br>
at
com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:270)<br>
at
org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1552)<br>
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)<br>
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)<br>
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)<br>
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)<br>
at
io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)<br>
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:219)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.includeImpl(RequestDispatcherImpl.java:377)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.setupIncludeImpl(RequestDispatcherImpl.java:311)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:277)<br>
at
com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)<br>
at
com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)<br>
at
com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)<br>
at
com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)<br>
at
com.liferay.portlet.internal.PortletContainerImpl._render(PortletContainerImpl.java:839)<br>
at
com.liferay.portlet.internal.PortletContainerImpl.lambda$render$2(PortletContainerImpl.java:212)<br>
at
com.liferay.portlet.internal.PortletContainerImpl._preserveGroupIds(PortletContainerImpl.java:390)<br>
at
com.liferay.portlet.internal.PortletContainerImpl.render(PortletContainerImpl.java:201)<br>
at
com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:144)<br>
at
com.liferay.portlet.RestrictPortletContainerWrapper.lambda$render$0(RestrictPortletContainerWrapper.java:126)<br>
at
com.liferay.portlet.RestrictPortletContainerWrapper._render(RestrictPortletContainerWrapper.java:183)<br>
at
com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:124)<br>
at
com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:173)<br>
at
com.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:190)<br>
at
com.liferay.portal.layoutconfiguration.util.PortletRenderer.render(PortletRenderer.java:84)<br>
at
com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:495)<br>
at
com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:331)<br>
at
com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:146)<br>
at
com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:167)<br>
at
com.liferay.portal.kernel.layoutconfiguration.util.RuntimePageUtil.processTemplate(RuntimePageUtil.java:88)<br>
at
org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:744)<br>
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)<br>
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)<br>
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)<br>
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)<br>
at
io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)<br>
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:219)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.includeImpl(RequestDispatcherImpl.java:377)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.setupIncludeImpl(RequestDispatcherImpl.java:311)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:277)<br>
at
com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)<br>
at
com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)<br>
at
com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)<br>
at
com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)<br>
at
com.liferay.portal.model.impl.LayoutTypeControllerImpl.includeLayoutContent(LayoutTypeControllerImpl.java:171)<br>
at
com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:908)<br>
at
com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:406)<br>
at
com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:173)<br>
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)<br>
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)<br>
at
com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:172)<br>
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)<br>
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:687)<br>
at
com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:605)<br>
at
com.liferay.portal.servlet.MainServlet.service(MainServlet.java:582)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)<br>
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)<br>
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)<br>
at
com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:355)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:98)<br>
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)<br>
at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:343)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:362)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:261)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)<br>
at
com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)<br>
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)<br>
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)<br>
at
io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)<br>
at
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:372)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)<br>
at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)<br>
at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)<br>
at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)<br>
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)<br>
at
com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)<br>
at
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)<br>
at
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)<br>
at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)<br>
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)<br>
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)<br>
at
io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)<br>
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)<br>
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)<br>
at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)<br>
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)<br>
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)<br>
at
io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)<br>
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)<br>
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)<br>
at
io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)<br>
at
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)<br>
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)<br>
at
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)<br>
at
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)<br>
at
org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)<br>
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)<br>
at
io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)<br>
at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)<br>
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
at java.lang.Thread.run(Thread.java:745)
What could be the cause of this problem?
I think that the code in your FirstView.printCategories method, you are probably skipping the service layer and calling the persistence layer directly.
If you are creating a new instance of CategoryPersistenceImpl, that would be another mistake.
Instead, you need to call methods in CategoryLocalServiceUtil (skips permission check) or CategoryServiceUtil (performs permission check).
If you add custom methods to your CategoryLocalServiceImpl.java then you will need to re-run ServiceBuilder in order to regenerate the API. That way you can call your custom methods via the service layer. For more information, see Running ServiceBuilder in the documentation.
Hi,
I have similar situation details here https://community.liferay.com/forums/-/message_boards/message/21627630?_com_liferay_message_boards_web_portlet_MBPortlet_showBreadcrumb=false . In my case, I dont have an entity defined in service.xml so service builder is not generating the LocalService and Util classes. So I need a way to access the finder methods whcih are in persistance oackage. Are there any options that you can think of? any help is appreaciated
Neil Griffin:I think that the code in your FirstView.printCategories method, you are probably skipping the service layer and calling the persistence layer directly.
If you are creating a new instance of CategoryPersistenceImpl, that would be another mistake.
Instead, you need to call methods in CategoryLocalServiceUtil (skips permission check) or CategoryServiceUtil (performs permission check).
If you add custom methods to your CategoryLocalServiceImpl.java then you will need to re-run ServiceBuilder in order to regenerate the API. That way you can call your custom methods via the service layer. For more information, see Running ServiceBuilder in the documentation.
Neil, thank you for answering. I figured it out shortly after posting this and reading the documentation again.
Powered by Liferay™