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
SOLVED:It worked like yannicular and Pankaj Kathiriya said. Thanks.....
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
Edit: 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:
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