Liferay Web服务:*LocalServiceImpl中的方法未在*LocalServiceUtil中获取内部版本

Liferay Web服务:*LocalServiceImpl中的方法未在*LocalServiceUtil中获取内部版本,liferay,liferay-6,liferay-ide,Liferay,Liferay 6,Liferay Ide,我在*LocalServiceImpl中定义的方法未由*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

我在*LocalServiceImpl中定义的方法未由*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的源代码,确保它确实没有方法的实现。如果有方法,你就得去别处看看。这里是:

当您部署portlet时,可以通过多种方式获得API:可能有人在tomcat的全局类路径上部署了包含服务的插件。如果你不更新这个,你可能看不到你的更新


另外,有人可能已经将你的插件的旧版本复制到了他们自己的插件中——除非他们更新了依赖关系,否则自然不会看到任何更新。还要检查jar文件的名称是否已更改。还要检查类:有些人喜欢将编译后的java类添加到源目录中,最终得到相同代码的两个不同实现。

能否在部署/运行时共享堆栈跟踪?@Gevatterjan补充道,请检查事实上,我仍然没有看到任何错误。在构建新的服务层之前,您是否尝试发出clean命令?有时候,如果你改变软件包,可能会有点奇怪。请尝试取消部署portlet,对服务和portlet进行清理->构建,并尝试在未安装portlet的系统上进行部署。