Liferay Web服务:* LocalServiceImpl中的方法未在* LocalServiceUtil中构建 [英] Liferay Web-Service: method in *LocalServiceImpl not getting build in *LocalServiceUtil

查看:91
本文介绍了Liferay Web服务:* LocalServiceImpl中的方法未在* LocalServiceUtil中构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务提供商未在* LocalServiceUtil中定义我在* LocalServiceImpl中定义的方法.

Methods I am defining in *LocalServiceImpl is not getting defined by service builder in *LocalServiceUtil.

已经经历了这个问题,但是对我没有用 Liferay:用* LocalServiceImpl编写的任何方法均未在*中找到LocalServiceUtil

Have gone through this question,but didn't work for me Liferay: Any method written in *LocalServiceImpl not found in *LocalServiceUtil

服务日志:

build-service:
 [echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
 [echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 [echo] INFO: Global shared lib directory /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/lib/
 [echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 [echo] INFO: Global lib directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/lib/ext/
 [echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 [echo] INFO: Portal lib directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/
 [echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 [echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
 [echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
 [echo] INFO: Properties for portal loaded from [file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
 [echo] Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
 [echo] Building SampleWS3
 [echo] Writing /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service/com/test3/model/SampleWS3Wrapper.java
[mkdir] Created dir: /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
compile-java:
 [copy] Copied 6 empty directories to 6 empty directories under /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
[javac] Compiling 18 source files to /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
[zip] Building zip: /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/lib/SampleWs3-portlet-service.jar
[delete] Deleting directory /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
 BUILD SUCCESSFUL

部署时的堆栈跟踪:

10:38:15,134 INFO   [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner]   [AutoDeployDir:177] Processing SampleWs3-portlet-6.1.1.1.war
10:38:15,135 INFO     [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner]    [PortletAutoDeployListener:77] Copying portlets for    /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-   ga2/deploy/SampleWs3-portlet-6.1.1.1.war
10:38:15,135 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:763] Deploying SampleWs3-portlet-6.1.1.1.war
10:38:15,173 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:859] Updating SampleWs3 from version 6.1.1.1 to version 6.1.1.1
Expanding: /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/deploy/SampleWs3-portlet-6.1.1.1.war into /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/classes
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/classes
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/jsp
10:38:15,308 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2083] Modifying Servlet 2.5 /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/web.xml
  Copying 102 files to /home/rayon/shi/liferay bundle 20th   may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
  Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
  Deleting directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174
10:38:15,355 INFO    [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner]  [PortletAutoDeployListener:87] Portlets for /home/rayon/shi/liferay bundle   20th may/liferay-portal-6.1.1-ce-ga2/deploy/SampleWs3-portlet-6.1.1.1.war copied successfully. Deployment will start in a few seconds.
8 Jun, 2015 10:38:20 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/SampleWs3-portlet]
10:38:20,787 INFO    [ContainerBackgroundProcessor[StandardEngine[Catalina]]][PluginPackageUtil:1033] Reading plugin package for SampleWs3-portlet
8 Jun, 2015 10:38:20 AM org.apache.catalina.core.ApplicationContext  log
INFO: Closing Spring root WebApplicationContext
8 Jun, 2015 10:38:21 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
10:38:21,573 INFO  [pool-2-thread-22][HotDeployImpl:178] Deploying SampleWs3-portlet from queue
10:38:21,574 INFO  [pool-2-thread-22][PluginPackageUtil:1033] Reading plugin package for SampleWs3-portlet
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
10:38:21,710 INFO  [pool-2-thread-22][ServiceComponentLocalServiceImpl:280] Upgrading Sample database to build number 62
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties
8 Jun, 2015 10:38:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties

推荐答案

首先:检查*LocalServiceUtil的源代码,并确保它确实没有该方法的实现.如果存在该方法,则必须在其他地方查找.在这里:

First of all: Check the sourcecode for your *LocalServiceUtil and make sure it really doesn't have the method's implementation. If the method is there, you'll have to look elsewhere. Here's where:

部署Portlet时,可以通过多种方式获取API:可能有人在Tomcat的全局类路径上部署了包含服务的插件.如果您不更新那个,则可能看不到更新.

When you deploy a portlet, you can get the API on multiple ways: Someone might have deployed the plugin containing the services on tomcat's global class path. If you don't update that one, you probably won't see your updates.

此外,有人可能也将旧版本的插件复制到了自己的插件中-除非他们更新了依赖性,否则自然看不到任何更新.还要检查jar文件的更改名称.还要检查这些类:有些人喜欢将已编译的Java类添加到其源目录中,最后以相同代码的两个不同实现实现.

Also, someone might have copied an older version of your plugin into their own plugin as well - naturally not seeing any updates unless they update their dependency. Check for changed names of the jar file as well. Also check for the classes: Some people like to add the compiled java classes to their source directories, ending up with two different implementations of the same code.

这篇关于Liferay Web服务:* LocalServiceImpl中的方法未在* LocalServiceUtil中构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆