Liferay:在* LocalServiceUtil中找不到用* LocalServiceImpl编写的任何方法 [英] Liferay: Any method written in *LocalServiceImpl not found in *LocalServiceUtil
问题描述
在*LocalServiceUtil
中找不到我在*LocalServiceImpl
中编写的任何方法.我每次都重新运行服务生成器,但一无所获.这些方法在本地服务器上可以识别,但在生产服务器中找不到.所有旧方法都可以使用,只是找不到新的书面方法.可能是什么问题呢?谢谢.我在两台服务器上都使用Liferay 6.1.1 GA2.
Any method I write in *LocalServiceImpl
is not found in *LocalServiceUtil
. I re-run service builder every time and nothing. The methods are recognized on local server but not found in production server. All old methods are working, just new written methods are not found. What could be the problem? Thanks. I am using Liferay 6.1.1 GA2 on both servers.
这是我的服务生成器日志
this is my service builder log
[echo] Loading jar:file:/C:/sbl-workspace-1/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[echo] 28.11.2013 08:30:46 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Global shared lib directory /C:/sbl-workspace-1-plugins-sdk/liferay-plugins-sdk-6.1.1/lib/
[echo] 28.11.2013 08:30:46 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Global lib directory /C:/sbl-workspace-1/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/lib/ext/
[echo] 28.11.2013 08:30:46 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Portal lib directory /C:/sbl-workspace-1/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/
[echo] 28.11.2013 08:30:47 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Properties for portal loaded from [file:/C:/sbl-workspace-1/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/C:/sbl-workspace-1/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:/C:/sbl-workspace-1/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:/C:/sbl-workspace-1/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:/C:/sbl-workspace-1/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] Loading file:/C:/sbl-workspace-1/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[echo] Building Menus
[echo] Building MenusImages
[echo] Building Sections
[mkdir] Created dir: C:\sbl-workspace-1-plugins-sdk\liferay-plugins-sdk-6.1.1\portlets\AdminSBL-portlet\docroot\WEB-INF\service-classes
compile-java:
[copy] Copied 65 empty directories to 65 empty directories under C:\sbl-workspace-1-plugins-sdk\liferay-plugins-sdk-6.1.1\portlets\AdminSBL-portlet\docroot\WEB-INF\service-classes
[javac] Compiling 398 source files to C:\sbl-workspace-1-plugins-sdk\liferay-plugins-sdk-6.1.1\portlets\AdminSBL-portlet\docroot\WEB-INF\service-classes
[zip] Building zip: C:\sbl-workspace-1-plugins-sdk\liferay-plugins-sdk-6.1.1\portlets\AdminSBL-portlet\docroot\WEB-INF\lib\AdminSBL-portlet-service.jar
[delete] Deleting directory C:\sbl-workspace-1-plugins-sdk\liferay-plugins-sdk-6.1.1\portlets\AdminSBL-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 37 seconds
已解决:它像yannicular一样工作,Pankaj Kathiriya说.谢谢....
SOLVED:It worked like yannicular and Pankaj Kathiriya said. Thanks.....
推荐答案
很可能您的服务构建失败.您仍然可以看到旧的方法,因为您仍在使用旧的.jar,这是成功构建的最后一个.我的建议是检查构建服务日志,并找到导致服务构建任务失败的错误
Most probably, your service-build is failing. You can still see the old methods, because you are still using the old .jar, the last one that was successfully built. My advice is to check the build-service log and find the error that's failing the service-build task
有时,与Portal部署机制冲突或动态类加载可能导致从旧服务jar中加载类.如果您确定您的Web应用程序合法但部署失败,则确保您正在部署应用程序的故障保护过程为:
Sometimes, conflicts from the Portal Deployment mechanism, or dynamic Class loading could lead to load Classes from an old service jar. If you are sure that your webapp is legit but the deployment fails, a fail-safe procedure to make sure you are deploying your application is:
- 关闭门户
- 从门户网站webapps中删除app文件夹.
- 从work/Catalina/localhost删除应用程序文件夹
- 将新的Web应用程序复制到/deploy中,然后启动门户.
奖金提示:如果要部署到正在运行的远程Portal,最好将.war复制到远程系统,然后将其移动到/deploy文件夹.否则,如果您的连接速度很慢,则可以在.war传输完成之前开始部署,否则部署失败,并且您的应用程序会被列入黑名单,直到您重新启动tomcat为止.
Bonus hint: If you are deploying into a running remote Portal, it's nice to copy your .war into the remote system, and then move it to the /deploy Folder. Else, if your connection is slow the deployment could start before the .war transfer is complete, the delpoyment fails and your app stays black-listed until you restart your tomcat
这篇关于Liferay:在* LocalServiceUtil中找不到用* LocalServiceImpl编写的任何方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!