Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Cameron McBride
Service Builder Errors
16 de febrero de 2012 13:11
Respuesta

Cameron McBride

Ranking: Expert

Mensajes: 273

Fecha de incorporación: 8 de febrero de 2011

Mensajes recientes

I'm getting some bizarre service builder errors on a new Liefray 6.0.6 CE Eclipse project.

1. I have created a brand new project
2. Started my server, made sure the hello world portlet works
3. Place my service.xml out there and ran it, through eclipse
4. The console output looks good but Eclipse has some errors.
5. Tons of errors where none of the generated classes can be resolved to a type
6. I hate to erase eclipse and my plugins sdk and resetup from scratch.

Eclipse error that pops up:
1An internal error occurred during: "Build services".
2Element not found: /liferay-plugins-sdk-6.0.6/portlets/quick-links-portlet/docroot/WEB-INF/src/com/hca/quicklinks.


Service.xml:
 1<?xml version="1.0" encoding="UTF-8" ?>
 2<!DOCTYPE service-builder PUBLIC
 3    "-//Liferay//DTD Service Builder 6.0.0//EN"
 4    "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 5   
 6<service-builder package-path="com.hca.quicklinks">
 7    <author>Cameron McBride</author>
 8    <namespace>QuickLinks</namespace>
 9    <entity name="QuickLink" local-service="true" remote-service="false">
10        <column name="quickLinkId" type="long" primary="true" />
11        <column name="companyId" type="long" />
12        <column name="groupId" type="long" />
13        <column name="userId" type="long" />
14        <column name="title" type="String" />
15        <column name="url" type="String" />
16        <column name="newWindow" type="boolean" />
17        <column name="created" type="Date" />
18       
19        <order by="asc">
20            <order-column name="title" />
21        </order>
22       
23        <finder name="CompanyId" return-type="Collection">
24            <finder-column name="companyId" />
25        </finder>
26
27        <finder name="GroupId" return-type="Collection">
28            <finder-column name="groupId" />
29        </finder>
30    </entity>
31   
32</service-builder>[/cpde]
33
34Console output:
35[code][Console output redirected to file:C:\liferay\workspace\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
36Buildfile: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\build.xml
37build-service:
38    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service
39    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\sql
40     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
41     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
42     [java] Loading file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes/portal-ext.properties
43     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
44     [java] 20:38:43,127 INFO  [PortalImpl:278] Global lib directory /C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/
45     [java] 20:38:43,134 INFO  [PortalImpl:298] Portal lib directory /C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/
46     [java] Building QuickLink
47     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\persistence\QuickLinkPersistenceImpl.java
48     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\persistence\QuickLinkPersistence.java
49     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\persistence\QuickLinkUtil.java
50     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\model\impl\QuickLinkModelImpl.java
51     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\model\impl\QuickLinkImpl.java
52     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkModel.java
53     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLink.java
54     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkClp.java
55     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkWrapper.java
56     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\impl\QuickLinkLocalServiceImpl.java
57     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\base\QuickLinkLocalServiceBaseImpl.java
58     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalService.java
59     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceUtil.java
60     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceClp.java
61     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceWrapper.java
62     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\messaging\ClpMessageListener.java
63     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\ClpSerializer.java
64    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
65compile-java:
66    [javac] Compiling 13 source files to C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
67    [javac] Note: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceUtil.java uses or overrides a deprecated API.
68    [javac] Note: Recompile with -Xlint:deprecation for details.
69    [javac] Note: Some input files use unchecked or unsafe operations.
70    [javac] Note: Recompile with -Xlint:unchecked for details.
71      [zip] Building zip: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\lib\quick-links-portlet-service.jar
72   [delete] Deleting directory C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
73BUILD SUCCESSFUL
74Total time: 25 seconds
Adjunto

archivos adjuntos: errors.png (55,6k)
Ram Manusani
RE: Service Builder Errors
16 de febrero de 2012 13:17
Respuesta

Ram Manusani

Ranking: Regular Member

Mensajes: 124

Fecha de incorporación: 27 de octubre de 2011

Mensajes recientes

Could you do Ant clean and then Build Service in your eclipse if you have ant plugin for eclipse.

Do you see any errors now...
Nagendra Kumar Busam
RE: Service Builder Errors
16 de febrero de 2012 23:54
Respuesta

Nagendra Kumar Busam

Ranking: Liferay Master

Mensajes: 637

Fecha de incorporación: 7 de julio de 2009

Mensajes recientes

Can you try it from command prompt (building services part)
Juan Gonzalez
RE: Service Builder Errors
17 de febrero de 2012 7:47
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1983

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

Cameron McBride:
I'm getting some bizarre service builder errors on a new Liefray 6.0.6 CE Eclipse project.

1. I have created a brand new project
2. Started my server, made sure the hello world portlet works
3. Place my service.xml out there and ran it, through eclipse
4. The console output looks good but Eclipse has some errors.
5. Tons of errors where none of the generated classes can be resolved to a type
6. I hate to erase eclipse and my plugins sdk and resetup from scratch.

Eclipse error that pops up:
1An internal error occurred during: "Build services".
2Element not found: /liferay-plugins-sdk-6.0.6/portlets/quick-links-portlet/docroot/WEB-INF/src/com/hca/quicklinks.


Service.xml:
 1<?xml version="1.0" encoding="UTF-8" ?>
 2<!DOCTYPE service-builder PUBLIC
 3    "-//Liferay//DTD Service Builder 6.0.0//EN"
 4    "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 5   
 6<service-builder package-path="com.hca.quicklinks">
 7    <author>Cameron McBride</author>
 8    <namespace>QuickLinks</namespace>
 9    <entity name="QuickLink" local-service="true" remote-service="false">
10        <column name="quickLinkId" type="long" primary="true" />
11        <column name="companyId" type="long" />
12        <column name="groupId" type="long" />
13        <column name="userId" type="long" />
14        <column name="title" type="String" />
15        <column name="url" type="String" />
16        <column name="newWindow" type="boolean" />
17        <column name="created" type="Date" />
18       
19        <order by="asc">
20            <order-column name="title" />
21        </order>
22       
23        <finder name="CompanyId" return-type="Collection">
24            <finder-column name="companyId" />
25        </finder>
26
27        <finder name="GroupId" return-type="Collection">
28            <finder-column name="groupId" />
29        </finder>
30    </entity>
31   
32</service-builder>[/cpde]
33
34Console output:
35[code][Console output redirected to file:C:\liferay\workspace\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
36Buildfile: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\build.xml
37build-service:
38    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service
39    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\sql
40     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
41     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
42     [java] Loading file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes/portal-ext.properties
43     [java] Loading jar:file:/C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
44     [java] 20:38:43,127 INFO  [PortalImpl:278] Global lib directory /C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/
45     [java] 20:38:43,134 INFO  [PortalImpl:298] Portal lib directory /C:/liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/
46     [java] Building QuickLink
47     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\persistence\QuickLinkPersistenceImpl.java
48     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\persistence\QuickLinkPersistence.java
49     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\persistence\QuickLinkUtil.java
50     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\model\impl\QuickLinkModelImpl.java
51     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\model\impl\QuickLinkImpl.java
52     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkModel.java
53     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLink.java
54     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkClp.java
55     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\model\QuickLinkWrapper.java
56     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\impl\QuickLinkLocalServiceImpl.java
57     [java] Writing docroot\WEB-INF\src\com\hca\quicklinks\service\base\QuickLinkLocalServiceBaseImpl.java
58     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalService.java
59     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceUtil.java
60     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceClp.java
61     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceWrapper.java
62     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\messaging\ClpMessageListener.java
63     [java] Writing docroot\WEB-INF\service\com\hca\quicklinks\service\ClpSerializer.java
64    [mkdir] Created dir: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
65compile-java:
66    [javac] Compiling 13 source files to C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
67    [javac] Note: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service\com\hca\quicklinks\service\QuickLinkLocalServiceUtil.java uses or overrides a deprecated API.
68    [javac] Note: Recompile with -Xlint:deprecation for details.
69    [javac] Note: Some input files use unchecked or unsafe operations.
70    [javac] Note: Recompile with -Xlint:unchecked for details.
71      [zip] Building zip: C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\lib\quick-links-portlet-service.jar
72   [delete] Deleting directory C:\liferay\workspace\liferay-plugins-sdk-6.0.6\liferay-plugins-sdk-6.0.6\portlets\quick-links-portlet\docroot\WEB-INF\service-classes
73BUILD SUCCESSFUL
74Total time: 25 seconds


Seems there is an error with package-path. Perhaps there are some problems with those directories.
Cameron McBride
RE: Service Builder Errors
23 de febrero de 2012 7:55
Respuesta

Cameron McBride

Ranking: Expert

Mensajes: 273

Fecha de incorporación: 8 de febrero de 2011

Mensajes recientes

I figured out that each time I ran service builder and it got errors, it would build a few more classes. I ran it over and over (about 10 times) and then everything was built and working normally. I have made some changes since then and re-ran service builder with no issues.