Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Alexander Widerberg
No luck running the service builder in eclipse -Help Needed!
April 14, 2012 2:25 PM
Answer

Alexander Widerberg

Rank: New Member

Posts: 7

Join Date: April 14, 2012

Recent Posts

Hi!

I´m new to developing in liferay and i think i need som help from a more focused person. emoticon

I´m trying to build the following service in Eclipse IDE but i´m getting ALOT of exceptions. (See below)

Essentially, what i want is to create multiple entities and then i have one entitiy that has relations to the others. (see pic below)



I know the post seems abit long, but the exceptions are eating rows emoticon

  1<?xml version="1.0" encoding="UTF-8"?>
  2<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
  3<service-builder package-path="com.polaris.inquiry">
  4    <author>AmbaTop</author>
  5    <namespace>inq</namespace>
  6
  7    <entity name="Consumer" local-service="true" table="Consumer_" remote-service="true">
  8
  9        <column name="consumerID" type="long" primary="true" id-type="increment" />
 10        <column name="emailAddress" type="String" />
 11        <column name="comments" type="String" />
 12        <column name="firstName" type="String" />
 13        <column name="middleName" type="String"></column>
 14        <column name="lastName" type="String" />
 15        <column name="streetAddress1" type="String" />
 16        <column name="streetAddress2" type="String" />
 17        <column name="city" type="String" />
 18        <column name="state" type="String" />
 19        <column name="zip" type="int"/>
 20        <column name="phone" type="String"></column>
 21        <column name="createDate" type="Date"></column>
 22        <column name="modifiedDate" type="Date" />
 23
 24        <order by="asc">
 25            <order-column name="consumerID"></order-column>
 26        </order>
 27
 28        <finder name="Consumerid" return-type="Collection">
 29            <finder-column name="consumerID"></finder-column>
 30        </finder>
 31       
 32    </entity>
 33   
 34    <entity name="Service" local-service="true" table="Service_" remote-service="true">
 35
 36        <column name="serviceID" type="long" primary="true" id-type="increment"/>
 37        <column name="bulletinID" type="long"></column>
 38        <column name="bulletinDescription" type="String"></column>
 39        <column name="bulletinType" type="Collection"></column>
 40        <column name="bulletinStatus" type="Collection"></column>
 41        <column name="createDate" type="Date"></column>
 42        <column name="modifiedDate" type="Date" />
 43
 44        <order by="asc">
 45            <order-column name="serviceID"></order-column>
 46        </order>
 47
 48        <finder name="Serviceid" return-type="Collection">
 49            <finder-column name="serviceID"></finder-column>
 50        </finder>
 51       
 52    </entity>
 53   
 54        <entity name="Warranty" local-service="true" table="Warranty_" remote-service="true">
 55
 56        <column name="warrantyID" type="long" primary="true" id-type="increment"/>
 57        <column name="dealerID" type="long"></column>
 58        <column name="date" type="Date"></column>
 59        <column name="complaint" type="String"></column>
 60        <column name="authorizationType" type="Collection"></column>
 61        <column name="status" type="Collection"></column>
 62        <column name="repairAuthorized" type="boolean"></column>
 63        <column name="createDate" type="Date"></column>
 64        <column name="modifiedDate" type="Date" />
 65
 66        <order by="asc">
 67            <order-column name="warrantyID"></order-column>
 68        </order>
 69
 70        <finder name="Warrantyid" return-type="Collection">
 71            <finder-column name="warrantyID"></finder-column>
 72        </finder>
 73       
 74    </entity>
 75   
 76    <entity local-service="true" name="Unit" table="Unit_" remote-service="true">
 77        <column name="unitID" type="long" primary="true" id-type="increment" filter-primary="false"></column>
 78        <column name="serialNumber" type="long"></column>
 79        <column name="modelNumber" type="long"></column>
 80        <column name="dealerID" type="long"></column>
 81        <column name="consumerID" type="long"></column>
 82        <column name="warrantyID" type="long"></column>
 83        <column name="serviceID" type="long"></column>
 84        <column name="createDate" type="Date"></column>
 85        <column name="modifiedDate" type="Date"></column>
 86        <column name="comments" type="String"></column>
 87        <column name="productionDate" type="Date"></column>
 88        <column name="purchaseDate" type="Date"></column>
 89        <column name="registrationDate" type="Date"></column>
 90        <column name="warrantyExpirationDate" type="Date"></column>
 91        <column name="extendedServiceContractVendor" type="long"></column>
 92       
 93        <order by="asc">
 94            <order-column name="unitID"></order-column>
 95        </order>
 96       
 97        <finder name="Unitid" return-type="Collection">
 98            <finder-column name="unitID"></finder-column>
 99        </finder>
100        <reference entity="Consumer"></reference>
101        <reference entity="Service"></reference>
102        <reference entity="Warranty"></reference>
103       
104     </entity>
105    
106</service-builder>


The exceptions i get are the following:

  1 ....[echo] Building Service
  2     [echo] Method public com.liferay.portal.tools.servicebuilder.Entity com.liferay.portal.tools.servicebuilder.ServiceBuilder.getEntity(java.lang.String) throws java.io.IOException threw an exception when invoked on com.liferay.portal.tools.servicebuilder.ServiceBuilder@2f9795d8
  3     [echo] The problematic instruction:
  4     [echo] ----------
  5     [echo] ==> assignment: tempEntity=serviceBuilder.getEntity(column.getEJBName()) [on line 4100, column 25 in com/liferay/portal/tools/servicebuilder/dependencies/persistence_impl.ftl]
  6     [echo] ----------
  7     [echo] Java backtrace for programmers:
  8     [echo] ----------
  9     [echo] freemarker.template.TemplateModelException: Method public com.liferay.portal.tools.servicebuilder.Entity com.liferay.portal.tools.servicebuilder.ServiceBuilder.getEntity(java.lang.String) throws java.io.IOException threw an exception when invoked on com.liferay.portal.tools.servicebuilder.ServiceBuilder@2f9795d8
 10     [echo]     at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
 11     [echo]     at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
 12     [echo]     at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
 13     [echo]     at freemarker.core.Assignment.accept(Assignment.java:90)
 14     [echo]     at freemarker.core.Environment.visit(Environment.java:221)
 15     [echo]     at freemarker.core.MixedContent.accept(MixedContent.java:92)
 16     [echo]     at freemarker.core.Environment.visit(Environment.java:221)
 17     [echo]     at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
 18     [echo]     at freemarker.core.Environment.visit(Environment.java:221)
 19     [echo]     at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
 20     [echo]     at freemarker.core.Environment.visit(Environment.java:428)
 21     [echo]     at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
 22     [echo]     at freemarker.core.Environment.visit(Environment.java:221)
 23     [echo]     at freemarker.core.MixedContent.accept(MixedContent.java:92)
 24     [echo]     at freemarker.core.Environment.visit(Environment.java:221)
 25     [echo]     at freemarker.core.Environment.process(Environment.java:199)
 26     [echo]     at freemarker.template.Template.process(Template.java:237)
 27     [echo]     at com.liferay.portal.freemarker.FreeMarkerUtil.process(FreeMarkerUtil.java:49)
 28     [echo]     at com.liferay.portal.freemarker.FreeMarkerUtil.process(FreeMarkerUtil.java:39)
 29     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder._processTemplate(ServiceBuilder.java:4788)
 30     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder._createPersistenceImpl(ServiceBuilder.java:2430)
 31     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:649)
 32     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:430)
 33     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:146)
 34     [echo]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 35     [echo]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 36     [echo]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 37     [echo]     at java.lang.reflect.Method.invoke(Unknown Source)
 38     [echo]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
 39     [echo]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
 40     [echo]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
 41     [echo]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
 42     [echo]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
 43     [echo]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
 44     [echo]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 45     [echo]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 46     [echo]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 47     [echo]     at java.lang.reflect.Method.invoke(Unknown Source)
 48     [echo]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 49     [echo]     at org.apache.tools.ant.Task.perform(Task.java:348)
 50     [echo]     at org.apache.tools.ant.Target.execute(Target.java:390)
 51     [echo]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
 52     [echo]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 53     [echo]     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
 54     [echo]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 55     [echo]     at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
 56     [echo]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 57     [echo]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
 58     [echo]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
 59     [echo] Caused by: java.lang.NullPointerException
 60     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.getEntity(ServiceBuilder.java:850)
 61     [echo]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 62     [echo]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 63     [echo]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 64     [echo]     at java.lang.reflect.Method.invoke(Unknown Source)
 65     [echo]     at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:866)
 66     [echo]     at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)
 67     [echo]     ... 48 more
 68   [delete] Deleting: C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\ServiceBuilder.temp
 69    [mkdir] Created dir: C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service-classes
 70compile-java:
 71     [copy] Copied 6 empty directories to 6 empty directories under C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service-classes
 72    [javac] Compiling 15 source files to C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service-classes
 73    [javac] ----------
 74    [javac] 1. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 94)
 75    [javac]     ClpSerializer.translateInput(consumer));
 76    [javac]     ^^^^^^^^^^^^^
 77    [javac] ClpSerializer cannot be resolved
 78    [javac] ----------
 79    [javac] 2. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 113)
 80    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
 81    [javac]                                                ^^^^^^^^^^^^^
 82    [javac] ClpSerializer cannot be resolved
 83    [javac] ----------
 84    [javac] 3. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 135)
 85    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
 86    [javac]                                                ^^^^^^^^^^^^^
 87    [javac] ClpSerializer cannot be resolved
 88    [javac] ----------
 89    [javac] 4. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 169)
 90    [javac]     ClpSerializer.translateInput(consumer));
 91    [javac]     ^^^^^^^^^^^^^
 92    [javac] ClpSerializer cannot be resolved
 93    [javac] ----------
 94    [javac] 5. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 196)
 95    [javac]     ClpSerializer.translateInput(dynamicQuery));
 96    [javac]     ^^^^^^^^^^^^^
 97    [javac] ClpSerializer cannot be resolved
 98    [javac] ----------
 99    [javac] 6. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 215)
100    [javac]     return (java.util.List)ClpSerializer.translateOutput(returnObj);
101    [javac]                            ^^^^^^^^^^^^^
102    [javac] ClpSerializer cannot be resolved
103    [javac] ----------
104    [javac] 7. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 225)
105    [javac]     ClpSerializer.translateInput(dynamicQuery), start, end);
106    [javac]     ^^^^^^^^^^^^^
107    [javac] ClpSerializer cannot be resolved
108    [javac] ----------
109    [javac] 8. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 244)
110    [javac]     return (java.util.List)ClpSerializer.translateOutput(returnObj);
111    [javac]                            ^^^^^^^^^^^^^
112    [javac] ClpSerializer cannot be resolved
113    [javac] ----------
114    [javac] 9. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 256)
115    [javac]     ClpSerializer.translateInput(dynamicQuery), start, end,
116    [javac]     ^^^^^^^^^^^^^
117    [javac] ClpSerializer cannot be resolved
118    [javac] ----------
119    [javac] 10. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 257)
120    [javac]     ClpSerializer.translateInput(orderByComparator));
121    [javac]     ^^^^^^^^^^^^^
122    [javac] ClpSerializer cannot be resolved
123    [javac] ----------
124    [javac] 11. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 276)
125    [javac]     return (java.util.List)ClpSerializer.translateOutput(returnObj);
126    [javac]                            ^^^^^^^^^^^^^
127    [javac] ClpSerializer cannot be resolved
128    [javac] ----------
129    [javac] 12. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 285)
130    [javac]     ClpSerializer.translateInput(dynamicQuery));
131    [javac]     ^^^^^^^^^^^^^
132    [javac] ClpSerializer cannot be resolved
133    [javac] ----------
134    [javac] 13. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 331)
135    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
136    [javac]                                                ^^^^^^^^^^^^^
137    [javac] ClpSerializer cannot be resolved
138    [javac] ----------
139    [javac] 14. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 363)
140    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
141    [javac]                                                ^^^^^^^^^^^^^
142    [javac] ClpSerializer cannot be resolved
143    [javac] ----------
144    [javac] 15. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 373)
145    [javac]     ClpSerializer.translateInput(primaryKeyObj));
146    [javac]     ^^^^^^^^^^^^^
147    [javac] ClpSerializer cannot be resolved
148    [javac] ----------
149    [javac] 16. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 396)
150    [javac]     return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj);
151    [javac]                                                     ^^^^^^^^^^^^^
152    [javac] ClpSerializer cannot be resolved
153    [javac] ----------
154    [javac] 17. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 424)
155    [javac]     return (java.util.List<com.polaris.inquiry.model.Consumer>)ClpSerializer.translateOutput(returnObj);
156    [javac]                                                                ^^^^^^^^^^^^^
157    [javac] ClpSerializer cannot be resolved
158    [javac] ----------
159    [javac] 18. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 459)
160    [javac]     ClpSerializer.translateInput(consumer));
161    [javac]     ^^^^^^^^^^^^^
162    [javac] ClpSerializer cannot be resolved
163    [javac] ----------
164    [javac] 19. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 478)
165    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
166    [javac]                                                ^^^^^^^^^^^^^
167    [javac] ClpSerializer cannot be resolved
168    [javac] ----------
169    [javac] 20. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 487)
170    [javac]     ClpSerializer.translateInput(consumer), merge);
171    [javac]     ^^^^^^^^^^^^^
172    [javac] ClpSerializer cannot be resolved
173    [javac] ----------
174    [javac] 21. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 506)
175    [javac]     return (com.polaris.inquiry.model.Consumer)ClpSerializer.translateOutput(returnObj);
176    [javac]                                                ^^^^^^^^^^^^^
177    [javac] ClpSerializer cannot be resolved
178    [javac] ----------
179    [javac] 22. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 527)
180    [javac]     return (java.lang.String)ClpSerializer.translateOutput(returnObj);
181    [javac]                              ^^^^^^^^^^^^^
182    [javac] ClpSerializer cannot be resolved
183    [javac] ----------
184    [javac] 23. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceClp.java (at line 532)
185    [javac]     ClpSerializer.translateInput(beanIdentifier));
186    [javac]     ^^^^^^^^^^^^^
187    [javac] ClpSerializer cannot be resolved
188    [javac] ----------
189    [javac] ----------
190    [javac] 24. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceUtil.java (at line 270)
191    [javac]     Object object = PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
192    [javac]                                                   ^^^^^^^^^^^^^
193    [javac] ClpSerializer cannot be resolved
194    [javac] ----------
195    [javac] 25. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceUtil.java (at line 272)
196    [javac]     ClassLoader portletClassLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
197    [javac]                                                                                 ^^^^^^^^^^^^^
198    [javac] ClpSerializer cannot be resolved
199    [javac] ----------
200    [javac] 26. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerLocalServiceUtil.java (at line 280)
201    [javac]     ClpSerializer.setClassLoader(portletClassLoader);
202    [javac]     ^^^^^^^^^^^^^
203    [javac] ClpSerializer cannot be resolved
204    [javac] ----------
205    [javac] ----------
206    [javac] 27. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerServiceUtil.java (at line 47)
207    [javac]     Object object = PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
208    [javac]                                                   ^^^^^^^^^^^^^
209    [javac] ClpSerializer cannot be resolved
210    [javac] ----------
211    [javac] 28. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerServiceUtil.java (at line 49)
212    [javac]     ClassLoader portletClassLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
213    [javac]                                                                                 ^^^^^^^^^^^^^
214    [javac] ClpSerializer cannot be resolved
215    [javac] ----------
216    [javac] 29. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\ConsumerServiceUtil.java (at line 57)
217    [javac]     ClpSerializer.setClassLoader(portletClassLoader);
218    [javac]     ^^^^^^^^^^^^^
219    [javac] ClpSerializer cannot be resolved
220    [javac] ----------
221    [javac] ----------
222    [javac] 30. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 73)
223    [javac]     com.polaris.inquiry.NoSuchConsumerException;
224    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
225    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
226    [javac] ----------
227    [javac] 31. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 89)
228    [javac]     com.polaris.inquiry.NoSuchConsumerException;
229    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
231    [javac] ----------
232    [javac] 32. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 165)
233    [javac]     com.polaris.inquiry.NoSuchConsumerException;
234    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
235    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
236    [javac] ----------
237    [javac] 33. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 184)
238    [javac]     com.polaris.inquiry.NoSuchConsumerException;
239    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
241    [javac] ----------
242    [javac] 34. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 201)
243    [javac]     long consumerID, long consumerID,
244    [javac]                           ^^^^^^^^^^
245    [javac] Duplicate parameter consumerID
246    [javac] ----------
247    [javac] 35. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerPersistence.java (at line 204)
248    [javac]     com.polaris.inquiry.NoSuchConsumerException;
249    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
250    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
251    [javac] ----------
252    [javac] ----------
253    [javac] 36. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 152)
254    [javac]     com.polaris.inquiry.NoSuchConsumerException {
255    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
256    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
257    [javac] ----------
258    [javac] 37. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 153)
259    [javac]     return getPersistence().remove(consumerID);
260    [javac]                             ^^^^^^
261    [javac] The method remove(long) from the type ConsumerPersistence refers to the missing type NoSuchConsumerException
262    [javac] ----------
263    [javac] 38. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 173)
264    [javac]     com.polaris.inquiry.NoSuchConsumerException {
265    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
266    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
267    [javac] ----------
268    [javac] 39. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 174)
269    [javac]     return getPersistence().findByPrimaryKey(consumerID);
270    [javac]                             ^^^^^^^^^^^^^^^^
271    [javac] The method findByPrimaryKey(long) from the type ConsumerPersistence refers to the missing type NoSuchConsumerException
272    [javac] ----------
273    [javac] 40. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 261)
274    [javac]     com.polaris.inquiry.NoSuchConsumerException {
275    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
277    [javac] ----------
278    [javac] 41. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 263)
279    [javac]     .findByConsumerid_First(consumerID, orderByComparator);
280    [javac]      ^^^^^^^^^^^^^^^^^^^^^^
281    [javac] The method findByConsumerid_First(long, OrderByComparator) from the type ConsumerPersistence refers to the missing type NoSuchConsumerException
282    [javac] ----------
283    [javac] 42. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 283)
284    [javac]     com.polaris.inquiry.NoSuchConsumerException {
285    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
287    [javac] ----------
288    [javac] 43. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 285)
289    [javac]     .findByConsumerid_Last(consumerID, orderByComparator);
290    [javac]      ^^^^^^^^^^^^^^^^^^^^^
291    [javac] The method findByConsumerid_Last(long, OrderByComparator) from the type ConsumerPersistence refers to the missing type NoSuchConsumerException
292    [javac] ----------
293    [javac] 44. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 303)
294    [javac]     long consumerID, long consumerID,
295    [javac]                           ^^^^^^^^^^
296    [javac] Duplicate parameter consumerID
297    [javac] ----------
298    [javac] 45. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 306)
299    [javac]     com.polaris.inquiry.NoSuchConsumerException {
300    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
301    [javac] com.polaris.inquiry.NoSuchConsumerException cannot be resolved to a type
302    [javac] ----------
303    [javac] 46. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 308)
304    [javac]     .findByConsumerid_PrevAndNext(consumerID, consumerID,
305    [javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
306    [javac] The method findByConsumerid_PrevAndNext(long, long, OrderByComparator) from the type ConsumerPersistence refers to the missing type NoSuchConsumerException
307    [javac] ----------
308    [javac] 47. ERROR in C:\Users\AmbaTop\Desktop\Utveckling\Liferay SDK\portlets\Unit-Inquiry-portlet\docroot\WEB-INF\service\com\polaris\inquiry\service\persistence\ConsumerUtil.java (at line 407)
309    [javac]     _persistence = (ConsumerPersistence)PortletBeanLocatorUtil.locate(com.polaris.inquiry.service.ClpSerializer.getServletContextName(),
310    [javac]                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311    [javac] com.polaris.inquiry.service.ClpSerializer cannot be resolved to a type
312    [javac] ----------
313    [javac] 47 problems (47 errors)
314
315BUILD FAILED.....


Can someone please point me in the right direction or maybe give me a more complete solution?

Thanks in advance!
Alexander
David H Nebinger
RE: No luck running the service builder in eclipse -Help Needed!
April 14, 2012 3:19 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6254

Join Date: September 1, 2006

Recent Posts

First you do not need to define finders for the primary keys, they will be automatically created.

Second, since all of the entities are defined in the same service.xml file, you do not need to declare them as references. References are only used when you need to pull in an entity defined in some other service declaration (i.e. one of the Liferay services).

Third you cannot declare a collection as a naked column type; when using collections you will typically be referring to some other table.
Alexander Widerberg
RE: No luck running the service builder in eclipse -Help Needed!
April 15, 2012 2:00 AM
Answer

Alexander Widerberg

Rank: New Member

Posts: 7

Join Date: April 14, 2012

Recent Posts

Thanks for the heads up! I´ll try to fix the above and return with my findings.
Sebastian Kirchner
RE: No luck running the service builder in eclipse -Help Needed!
April 27, 2012 12:07 AM
Answer

Sebastian Kirchner

Rank: New Member

Posts: 11

Join Date: April 24, 2012

Recent Posts

i had the problem with the duplicate entries for the primary key too, thanks for your help ;o)