I am sorry, but i want create 1 table and add data into table.
I create table by file service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.test">
<author>admin</author>
<namespace>admin</namespace>
<entity name="Book" remote-service="true" local-service="true"
table="book">
<column name="bookid" type="long" primary="true" />
<column name="title" type="String" />
<column name="description" type="String" />
<column name="price" type="double" />
<column name="author" type="String" />
<order>
<order-column name="title" order-by="acs" />
</order>
<finder return-type="Collection" name="Title">
<finder-column name="title" />
</finder>
</entity>
</service-builder>
and and i add method in class BookLocalService
public Book addbook(String title, String description, double price,
String author) throws SystemException, PortalException {
Book book = bookPersistence.create(CounterLocalServiceUtil
.increment(Book.class.getName()));
book.setTitle(title);
book.setDescription(description);
book.setPrice(price);
book.setAuthor(author);
return bookPersistence.update(book, true);
I add success method but when i call method add the error
Please sign in to flag this as inappropriate.