Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Matt S.
Service builder issue
February 3, 2013 9:06 AM
Answer

Matt S.

Rank: Junior Member

Posts: 36

Join Date: November 29, 2012

Recent Posts

Hi all,

I have a problem with the service builder. I've wrote this service.xml
 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN"
 4"http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 5<service-builder package-path="com.test">
 6       <namespace>Events</namespace>
 7       <entity name="Eventi" local-service="true" remote-service="true">
 8             <!-- PK fields -->
 9             <column name="eventId" type="long" primary="true" />
10             <!-- Audit fields -->
11             <column name="name" type="String"/>
12             <column name="city" type="String"/>
13             <column name="place" type="String"/>
14             <column name="date" type="Date"/>
15             <column name="time" type="Date"/>
16             <column name="price" type="long"/>
17             <column name="category" type="String"/>
18             <column name="createDate" type="Date" />
19             <column name="modifiedDate" type="Date" />
20        <finder name="EventId" return-type="Collection">
21        <finder-column name="eventId"></finder-column>
22        </finder>
23        <finder name="City" return-type="Collection">
24        <finder-column name="city"></finder-column>
25        </finder>
26        <finder name="Date" return-type="Collection">
27        <finder-column name="date"></finder-column>
28        </finder>
29        <finder name="Category" return-type="Collection">
30        <finder-column name="category"></finder-column>
31        </finder>
32      </entity>
33      </service-builder>


then i go to liferay->build service to build the file but I have this error
1
2BUILD FAILED
3C:\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:288: The following error occurred while executing this line:
4C:\liferay-plugins-sdk-6.1.1\build-common.xml:95: Compile failed; see the compiler error output for details.

The packages are created in web-inf/src but there isn't EventiLocalserviceUtil in com.test.service.impl and so i can't use it to implement my custom class! Where I can find this class and how can I solve this problem?
Devendra Patel
Re: [Liferay Forums][3. Development] Service builder issue
February 3, 2013 9:19 AM
Answer

Devendra Patel

Rank: Junior Member

Posts: 71

Join Date: September 25, 2011

Recent Posts

Hi Matt,

You have not declared author tag in your service.xml file.I think author
tag is mandatory.Please check DTD of service.xml.

Regards,
Dev Patel

On Sun, Feb 3, 2013 at 10:35 PM, Matt S. from liferay.com <
forums@liferay.com> wrote:

> Hi all,
>
> I have a problem with the service builder. I've wrote this service.xml
> 1
> 2<?xml version="1.0" encoding="UTF-8"?>
> 3<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder
> 6.0.0//EN"
> 4"http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
> 5<service-builder package-path="com.test">
> 6 <namespace>Events</namespace>
> 7 <entity name="Eventi" local-service="true" remote-service="true">
> 8 <!-- PK fields -->
> 9 <column name="eventId" type="long" primary="true" />
> 10 <!-- Audit fields -->
> 11 <column name="name" type="String"/>
> 12 <column name="city" type="String"/>
> 13 <column name="place" type="String"/>
> 14 <column name="date" type="Date"/>
> 15 <column name="time" type="Date"/>
> 16 <column name="price" type="long"/>
> 17 <column name="category" type="String"/>
> 18 <column name="createDate" type="Date" />
> 19 <column name="modifiedDate" type="Date" />
> 20 <finder name="EventId" return-type="Collection">
> 21 <finder-column name="eventId"></finder-column>
> 22 </finder>
> 23 <finder name="City" return-type="Collection">
> 24 <finder-column name="city"></finder-column>
> 25 </finder>
> 26 <finder name="Date" return-type="Collection">
> 27 <finder-column name="date"></finder-column>
> 28 </finder>
> 29 <finder name="Category" return-type="Collection">
> 30 <finder-column name="category"></finder-column>
> 31 </finder>
> 32 </entity>
> 33 </service-builder>
>
>
> then i go to liferay->build service to build the file but I have this error
> 1
> 2BUILD FAILED
> 3C:\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:288: The following
> error occurred while executing this line:
> 4C:\liferay-plugins-sdk-6.1.1\build-common.xml:95: Compile failed; see
> the compiler error output for details.
>
> Te packages ar created in web-inf/src but there isn't in
> EventiLocalserviceUtil in com.test.service.impl and so i can't use it to
> implement my custom class! Where I can find this class and how can I solve
> this problem?
>
>
> To view the thread, follow the link below:
>
> http://www.liferay.com/community/forums/-/message_boards/view_message/21173355
> --
> Thanks, Liferay.com Forums <http://http://www.liferay.com>
Subhash Pavuskar
RE: Service builder issue
February 3, 2013 9:31 AM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 233

Join Date: March 12, 2012

Recent Posts

Hi Matt S,

Read This thread !! Hope it may help you Click Here
Matt S.
RE: Service builder issue
February 3, 2013 9:48 AM
Answer

Matt S.

Rank: Junior Member

Posts: 36

Join Date: November 29, 2012

Recent Posts

I've seen in the documentation but in service.xml there isn't the author tag. Where I have to put in service.xml? and what I have to wrote in?
Devendra Patel
Re: [Liferay Forums][3. Development] RE: Service builder issue
February 3, 2013 10:10 AM
Answer

Devendra Patel

Rank: Junior Member

Posts: 71

Join Date: September 25, 2011

Recent Posts

Hi Matt,

According DTD you have to put author tag above namespace tag.

Regards,
Dev Patel

On Sun, Feb 3, 2013 at 11:18 PM, Matt S. from liferay.com <
forums@liferay.com> wrote:

> I've seen in the documentation but in service.xml there isn't the author
> tag. Where I have to put in service.xml? and what I have to wrote in?
>
>
> To view the thread, follow the link below:
>
> http://www.liferay.com/community/forums/-/message_boards/view_message/21173576
> --
> Thanks, Liferay.com Forums <http://http://www.liferay.com>