Details

    • 2

    Description

      Problem

      The deployment of a new service builder module works fine, but the service isn't registered. There is no entry in the json web api and if you use a ServiceUtil, a NullPointerException is thrown.

       ... 207 more
      14:45:10,325 ERROR [http-nio-8080-exec-6][render_portlet_jsp:131] null
      java.lang.NullPointerException
              at com.clavisit.clavisit.poc.tasks.service.FooLocalServiceUtil.getOneLocal(FooLocalServiceUtil.java:194)
              at org.apache.jsp.view_jsp._jspService(view_jsp:194)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:399)
              at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:410)
              at com.liferay.portal.osgi.web.servlet.context.helper.internal.JspServletWrapper.service(JspServletWrapper.java:70)
              at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
              at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
              at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl$RestrictPortletServletRequestFilter.doFilter(ServletContextHelperRegistrationImpl.java:447)
              at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
              at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
              at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
              at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
              at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
      

      Sometimes it's possible to deploy and use it once, but after a change in the ..LocalServiceImpl.java or ...ServiceImpl.java, the methods aren't available any more.

      13:18:23,061 INFO  [Thread-264][BundleStartStopLogger:38] STOPPED cl.tasks-service_1.0.0 [490]
      13:18:23,158 INFO  [Thread-264][BundleStartStopLogger:35] STARTED cl.tasks-service_1.0.0 [490]
      13:18:23,382 INFO  [Thread-264][ServiceComponentLocalServiceImpl:326] Upgrading FOO database to build number 14
      13:18:23,421 WARN  [Thread-264][JSONWebServiceActionsManagerImpl:266] Something went wrong attempting to register service method {contextName=foo,contextPath=Foo,actionObj[email protected]20a93520,actionClass=class com.clavisit.clavisit.poc.tasks.service.impl.FooServiceImpl,actionMethod=public java.lang.String com.clavisit.clavisit.poc.tasks.service.impl.FooServiceImpl.getSeven(),path=/foo/get-seven,method=GET} due to java.lang.NoSuchMethodException: com.sun.proxy.$Proxy771.getSeven()
      13:18:23,759 INFO  [Thread-267][BundleStartStopLogger:38] STOPPED blade.servicebuilder.svc_1.0.0 [491]
      13:18:23,859 INFO  [Thread-267][BundleStartStopLogger:35] STARTED blade.servicebuilder.svc_1.0.0 [491]
      

      Solution

      Replace compileOnly with compile in the file build.gradle in the -service project.
      Refresh the api module after the deployment (GoGo Shell). This is only necessary, if a method signature in the ...LocalServiceImpl.java or ...ServiceImpl.java has changed, added or removed.

      Environment

      Windows and Linux, Gradle 3.0, blade version 1.0.5.201609070324

      Attachments

        Activity

          People

            support-lep@liferay.com SE Support
            severin.rohner Severin Rohner
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              6 years, 24 weeks, 5 days ago

              Packages

                Version Package