Details

    • Similar Issues:
      Show 5 results 

      Description

      Enable Service builder to add @JSONWebService annotation. Up to now, @JSONWebService annotation is added manually to the ServiceImpl classes which methods has to be exposed for this new json API.

      Whit this change, the annotation is automatically added by ServiceBuilder to all "*Service" interfaces where "remote-service="true"" in service xml.

      Therefore, our @JSONWebService configurator now picks up the interfaces, too, during the classpath scanning.

      Moreover, it is possible to 'override' default JSONWebService annotations in interfaces. If an service has an annotated *ServiceImpl class, then interface will be not scanned. Instead, the service impl will be scanned.

        Issue Links

          Activity

          Hide
          Igor Spasic added a comment -

          We have to enahnce scanning to include service interfaces of a protlet, localted in <portlet-name>-portlet-service.jar.

          Show
          Igor Spasic added a comment - We have to enahnce scanning to include service interfaces of a protlet, localted in <portlet-name>-portlet-service.jar.
          Hide
          Jakub Liska added a comment -

          It doesn't work when maven liferay plugin and its serviceBuilderMojo is used... It is trying to find *-portlet-service.jar in portlet/WEB-INF/lib which is not created if you use maven liferay plugins and this follows :

          09:23:14,514 ERROR [JSONWebServiceServiceAction:46] com.liferay.portal.kernel.exception.PortalException
          com.liferay.portal.kernel.exception.PortalException
          at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:141)
          at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:123)
          at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.<init>(JSONWebServiceServiceAction.java:43)
          at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.getJSONAction(JSONWebServiceServlet.java:130)
          at com.liferay.portal.servlet.JSONServlet.init(JSONServlet.java:51)
          at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.portalInit(PortalClassLoaderServlet.java:75)
          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.servlet.PortalClassLoaderServlet.init(PortalClassLoaderServlet.java:46)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733)
          at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1282)
          at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1380)
          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:662)
          Caused by: java.lang.NullPointerException
          at jodd.io.findfile.FindClass.scanPath(FindClass.java:234)
          at jodd.io.findfile.FindClass.scanPaths(FindClass.java:182)
          at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:138)
          ... 21 more

          Show
          Jakub Liska added a comment - It doesn't work when maven liferay plugin and its serviceBuilderMojo is used... It is trying to find *-portlet-service.jar in portlet/WEB-INF/lib which is not created if you use maven liferay plugins and this follows : 09:23:14,514 ERROR [JSONWebServiceServiceAction:46] com.liferay.portal.kernel.exception.PortalException com.liferay.portal.kernel.exception.PortalException at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:141) at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:123) at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.<init>(JSONWebServiceServiceAction.java:43) at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.getJSONAction(JSONWebServiceServlet.java:130) at com.liferay.portal.servlet.JSONServlet.init(JSONServlet.java:51) at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.portalInit(PortalClassLoaderServlet.java:75) 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.servlet.PortalClassLoaderServlet.init(PortalClassLoaderServlet.java:46) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1282) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1380) 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:662) Caused by: java.lang.NullPointerException at jodd.io.findfile.FindClass.scanPath(FindClass.java:234) at jodd.io.findfile.FindClass.scanPaths(FindClass.java:182) at com.liferay.portal.jsonwebservice.JSONWebServiceConfigurator.configure(JSONWebServiceConfigurator.java:138) ... 21 more
          Hide
          Jakub Liska added a comment -


          RELATES to LPS-19423

          Show
          Jakub Liska added a comment - RELATES to LPS-19423
          Hide
          Igor Spasic added a comment -

          Thanx Joseph! I fixed the NPE and when *-portlet-service.jar does not exist, the WEB-INF/classes will be scanned instead. I am not sure if this is the place where maven plugin puts the service classes as I was not able to package with maven. At least, exception is gone

          Show
          Igor Spasic added a comment - Thanx Joseph! I fixed the NPE and when *-portlet-service.jar does not exist, the WEB-INF/classes will be scanned instead. I am not sure if this is the place where maven plugin puts the service classes as I was not able to package with maven. At least, exception is gone
          Hide
          Jakub Liska added a comment -

          That's the place, thank you Igor

          Show
          Jakub Liska added a comment - That's the place, thank you Igor

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 2 days ago

                Development

                  Structure Helper Panel