« Back

Liferay in Action now has all its chapters

Company Blogs March 10, 2011 By Richard Sezov Staff

The Liferay in Action MEAP was updated today and now includes all the chapters that will be a part of the book. I still have some editing to do, but we're getting pretty close now. From the Manning announcement: 
 
What's new:
Chapter 1, "Liferay is a different portal," has been revised.
Chapter 2, "Appray: Development at light speed," has been revised.
Chapter 3, "A data-driven portlet made easy," has been revised.
Chapter 4, "MVC the Liferay way," has been revised.
Chapter 5, "Providing your own site design with themes and layout templates," has been revised.
Chapter 9, "Liferay architecture and extension points," has been revised.
Chapter 10, "A tour of Liferay APIs," has been added.
 
The new chapter 10 provides a tour of Liferay APIs that you'll want to use in your applications. You can give your applications friendly URLs, organize larger applications with ActionCommands, use the message bus, schedule jobs, index your data, and more. Chapters 1-5 and 9 have been updated in response to reader and reviewer feedback.
 
Next, the book will be moving into production, where it will get a copy edit and will be typeset for printing.
 
What's next:
I have to get the manuscript for its final technical review. Once that's done, there will be another batch of revised chapters in the next update. So you can still subscribe to the MEAP, and now is a great time to do it, since the book now has all its chapters. You can get a 35% discount on it by clicking here or on any of the banners for it that you see on liferay.com. 
 
To anyone who's been reading, thank you for your valuable comments and feedback. We're on the home stretch now! 
Threaded Replies Author Date
Hi Richard, I read before that in Liferay 6.1... Puj Z March 11, 2011 2:06 AM
Puj, I don't know about plans for the book but... Mika Koivisto March 11, 2011 10:40 AM
Hi Puj, I won't be able to get that in, but I... Richard Sezov March 18, 2011 7:33 AM
Where may I download the book's sample source... Larry Smith March 23, 2011 6:09 PM
It's in Richards document folder:... Dave Weitzel March 28, 2011 12:57 PM
In addition to more focus on more current UI... Larry Smith March 23, 2011 6:38 PM
Wouldn't you consider leaving Struts for JSF 2? Larry Smith March 23, 2011 6:10 PM
Very nice Rich, can't wait to get my hard copy.... Gregory Amerson March 11, 2011 7:16 AM
Great job Rich! Looking forward to read the... Jorge Ferrer March 12, 2011 5:12 AM
hi sir, how to upload the file (Image or txt... satya jangala March 14, 2011 4:56 AM
tnx man, i've just bought a copy Oleg Yurii Derid March 16, 2011 12:27 PM
Great Rich. Your book will be in good demand... Manish Kumar Gupta March 18, 2011 4:17 AM
Hey Manish, Is it not available in India? If... Richard Sezov March 18, 2011 7:33 AM
Hi Richard, I am trying to get your hook to... Dave Weitzel April 4, 2011 3:54 PM
Richard, can you call or email me about the... Dave Weitzel April 20, 2011 8:21 AM
Hi Dave, Please see my reply over on the... Richard Sezov April 20, 2011 8:30 AM
Typo in Page 90 of the PDF: shouldn't... Mehul Patel May 18, 2011 7:29 AM
I can't find the source code in... Rami Grossman June 28, 2011 2:25 AM
Dear Richard, Your book is not available in... NIRVAN V. JAIN July 4, 2011 4:08 AM
Hi Richard, I am interested with your coming... Wen Ching Chua August 9, 2011 4:20 AM
Hi Chua, I can't give you advice on where to... Richard Sezov August 9, 2011 6:09 AM
Noted. Thanks anyway :) Wen Ching Chua August 9, 2011 5:58 PM
Hi Richard, This is a great book. I have been... Li Dong November 29, 2011 7:00 PM
Hi Li Dong, Please see my reply to Dave... Richard Sezov November 29, 2011 8:49 PM
Thank you, Rich, for your prompt response. In... Li Dong November 30, 2011 7:51 PM
Hi Rich, Could you please provide some advice... Li Dong December 2, 2011 7:00 PM
Hi Li, Sorry; I've been traveling and have... Richard Sezov December 5, 2011 10:07 AM
Hi Rich, Thank you for your response. I... Li Dong December 5, 2011 6:20 PM
Richard, Thanks for the book, it is very... Kirk Stork July 5, 2012 10:31 AM
Hi Kirk, I just tested the download from my... Richard Sezov July 11, 2012 5:47 PM

Hi Richard,

I read before that in Liferay 6.1 overriding struts action methods will be possible in hooks. Are you going to update the chapter on hooks respectively or do you want to keep it specific to liferay 6.0?
Posted on 3/11/11 2:06 AM.
Very nice Rich, can't wait to get my hard copy. Liferay has so many features I need an index.
Posted on 3/11/11 7:16 AM.
Puj, I don't know about plans for the book but I've blogged about the struts action hooks here http://www.liferay.com/web/mika.koivisto/blog/-/blogs/overriding-and-adding-stru­ts-actions-from-hook-plugins

I'll blog later about servlet filter hooks which is also possible in 6.1.
Posted on 3/11/11 10:40 AM in reply to Puj Z.
Great job Rich!

Looking forward to read the last chapters.
Posted on 3/12/11 5:12 AM.
hi sir,

how to upload the file (Image or txt or xls or docx) using AJAX
Posted on 3/14/11 4:56 AM in reply to Jorge Ferrer.
tnx man, i've just bought a copy
Posted on 3/16/11 12:27 PM.
Great Rich.

Your book will be in good demand in India. Manning should make it available here.
Posted on 3/18/11 4:17 AM.
Hi Puj,

I won't be able to get that in, but I am planning a last minute appendix on an important feature in 6.1...stay tuned....

:-)
Posted on 3/18/11 7:33 AM in reply to Puj Z.
Hey Manish,

Is it not available in India? If not, I'll let them know.

Thanks!

--Rich
Posted on 3/18/11 7:33 AM in reply to Manish Kumar Gupta.
Where may I download the book's sample source code from?

Also, it would be good for Liferay to have a site for sample project source code that members could add to.
Posted on 3/23/11 6:09 PM in reply to Richard Sezov.
Wouldn't you consider leaving Struts for JSF 2?
Posted on 3/23/11 6:10 PM in reply to Puj Z.
In addition to more focus on more current UI frameworks such as JSF, the samples in the book should provide examples of portal interfacing with other applications via web services. Accessing database from a portal is somewhat not aligned with strength of portal, which is integrating applications.
Posted on 3/23/11 6:38 PM in reply to Richard Sezov.
It's in Richards document folder:
http://www.liferay.com/web/richard.sezov/documents
Posted on 3/28/11 12:57 PM in reply to Larry Smith.
Hi Richard,
I am trying to get your hook to actually deploy using IDE and 6.0.6 as I am having problems with my own hooks. Sure enough you r code gets the same error in th ecategories.jsp file:

"Only a type can be imported. com.inkwell.internet.shopping.sb.model.ShoppingCategoryImage resolves to a package"
this then spawns other cannot resolve issues when using ShoppingCategoryImage and the LocalServiceUtil.

This has been a problem for 9 months now so I would have thought there was a known work around.

I have tried copying the service jar file to the ROOT/web-INF/lib folder which I think has worked before but not this time.

Any ideas?
Posted on 4/4/11 3:54 PM.
Richard,
can you call or email me about the deployment of the inkwell shopping image hook.
I cannot get it to run without deleting the service jar file.
Have posted to LIA forum on Manning's site as well.
I cannot deploy any hooks that use service builder
Posted on 4/20/11 8:21 AM.
Hi Dave,

Please see my reply over on the Manning forums. The service.jar needs to be moved from the hook to the global classpath, because hooked Liferay JSPs need access to those classes. I will make this more clear in the chapter.

--Rich
Posted on 4/20/11 8:30 AM in reply to Dave Weitzel.
Typo in Page 90 of the PDF: shouldn't "getRegistrations()" be "getUserRegistrations()" based on the column name "userRegistration"....
Posted on 5/18/11 7:29 AM.
I can't find the source code in http://www.liferay.com/web/richard.sezov/documents
Anyone can help?
Posted on 6/28/11 2:25 AM in reply to Mehul Patel.
Dear Richard,

Your book is not available in Indian Edition in India.

Your book has very HIGH demand in INDIA.

Thanks!
-NIrvan
Posted on 7/4/11 4:08 AM in reply to Rami Grossman.
Hi Richard,

I am interested with your coming book. Hope it is beginner and intermediate friendly on how to build apps or portlets at liferay 6.0.6 or newer version. Is it step by step to get things around or more to academic book?

I notice in amazon i can pre-order way cheaper than manning site after the 35% discounts - check here http://www.amazon.com/Liferay-Action-Official-Portal-Development/dp/193518282X/r­ef=sr_1_6?ie=UTF8&qid=1312887487&sr=8-6

so should i buy from amazon instead? Any help? if i buy from amazon, can you send me the pdf copy too? maybe i can show you the amazon receipt or something? any help? thanks.
Posted on 8/9/11 4:20 AM.
Hi Chua,

I can't give you advice on where to purchase the book. You should purchase it from wherever you are most comfortable purchasing it. I can't give out PDFs of the book, as I'm not involved so much with the selling of the book, but one benefit of buying from Manning is that you get both the print book and the ebook in multiple formats.

I'm assuming that since Manning will be selling a Kindle / epub version of the book that they will also be available direct from Amazon / B&N as well.

--Rich
Posted on 8/9/11 6:09 AM in reply to Wen Ching Chua.
Noted. Thanks anyway emoticon
Posted on 8/9/11 5:58 PM.
Hi Richard,

This is a great book. I have been reading Chapters 3 and 8 (Hooks) to add a new field (named "AddInfo") to the user portlet. I created the following service.xml and saved it to docroot\WEB-INF under the hook I created.

<?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.liferay.sampuser">
<namespace>sampuser</namespace>
<entity name="AddInfo" table="AddInfo" local-service="true" remote-service="true">
<column name="statusId" type="long" primary="true" />
<column name="userId" type="long" />
<column name="status" type="boolean" />
<column name="user" type="Collection" entity="com.liferay.portal.User" mapping-key="userId" />

<order by="asc">
<order-column name="userId" />
</order>

<reference package-path="com.liferay.portal" entity="User" />
<reference package-path="com.liferay.portlet.expando" entity="ExpandoValue" />
<reference package-path="com.liferay.portlet.expando" entity="ExpandoRow" />

</entity>
</service-builder>

Following the instructions in Chapters 3 and 8, I also created other files including AddInfoLocalServiceImpl.java (\docroot\WEB-INF\src\com\liferay\sampuser\service\impl) and SampuserInfoLocalServiceImpl.java (\docroot\WEB-INF\src\com\liferay\sampuser\service) together with the necessary .jsp files.

After I ran service builder without any question, I ran ant deploy. However, I received a lot of errors. One part of the errors are related to "AddInfo" such as the following:

docroot\WEB-INF\src\com\liferay\sampuser\service\impl\AddInfoLocalServ­iceImpl.java:37: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo addAddInfo(boolean Stat, long userId)

In this case, the entity "AddInfo" defined in service.xml cannot be found.

The other type of error is related to classes in the automatically generated file AddInfoPersistenceImpl.java. The error is like the following:

\docroot\WEB-INF\src\com\liferay\sampuser\service\persistence\AddInfoPersistence­Impl.java:522: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl

I am relatively new to liferay , but have been stuck at this point for a while. Can you please advise what were the mistakes that I might have made? Any help to fix the errors is greatly appreciated!!

Also, it will be great if you can have some training courses available online.
Posted on 11/29/11 7:00 PM.
Hi Li Dong,

Please see my reply to Dave above. The issue is that you need to move the service .jar that Service Builder generated to your global class path, if you're customizing a Liferay JSP that needs to call one of your services.

--Rich
Posted on 11/29/11 8:49 PM in reply to Li Dong.
Thank you, Rich, for your prompt response. In my case, I didn't see the error message like Dave's, that is, "Only a type can be imported. com.inkwell.internet.shopping.sb.model.ShoppingCategoryImage resolves to a package". I did try your suggestion, and moved my *-service.jar ("*" represents the name of the hook) located in docroot/WEB-INF/lib in the hook to ROOT.war/WEB-INF/lib/ (I used jboss). It seemed the problem didn't get fixed. Instead, I got more errors. Did I move the correct service .jar to the correct place??

Hope this won't be tiring you out...I am including the whole version of errors below generated before I moved the *-service.jar to the global path. Not sure if I am on the right track or I am totally off-track. Greatly appreciate your advice.
Buildfile: C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\build.xml

compile:

merge­:

compile-java:
Compiling 10 source files to C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\classe­s
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:46: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo addAddInfo(boolean Stat, long userId)
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:58: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo getAddInfoByUser(long userId)
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:71: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo getEmptyStatus() {
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:77: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo updateInfo(AddInfo info)
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:77: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
public AddInfo updateInfo(AddInfo info)
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:47: cannot find symbol
symbol : method getExpandoBridgeAttributes()
location: class org.omg.IOP.ServiceContext
boolean status=(boolean) serviceContext.getExpandoBridgeAttributes().get("status");
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:47: inconvertible types
found : org.omg.IOP.ServiceContext.getExpandoBridgeAttributes.get
required: boolean
boolean status=(boolean) serviceContext.getExpandoBridgeAttributes().get("status");
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:49: cannot find symbol
symbol : method addUser(long,boolean,java.lang.String,java.lang.String,boolean,java.lang.String,­java.lang.String,java.lang.String,java.util.Locale,java.lang.String,java.lang.St­ring,java.lang.String,int,int,boolean,int,int,int,java.lang.String,long[],long[]­,long[],long[],boolean,org.omg.IOP.ServiceContext)
location: class com.liferay.portal.service.UserLocalServiceWrapper
User user=super.addUser(companyId, autoPassword, password1, password2,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:56: cannot find symbol
symbol : method addAddInfo(boolean,long)
location: class com.liferay.sampuser.service.AddInfoLocalServiceUtil
AddInfoLocalServiceUtil.addAddInfo(status,user.getUserId());
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:66: cannot find symbol
symbol : variable serviceContent
location: class com.liferay.portal.model.SampuserInfoLocalServiceImpl
boolean status=(boolean) serviceContent.getExpandoBridgeAttributes().get("status");
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:66: inconvertible types
found : serviceContent.getExpandoBridgeAttributes.get
required: boolean
boolean status=(boolean) serviceContent.getExpandoBridgeAttributes().get("status");
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:68: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.SampuserInfoLocalServiceImpl
AddInfo info=AddInfoLocalServiceUtil.getAddInfoByUser(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:68: cannot find symbol
symbol : method getAddInfoByUser(long)
location: class com.liferay.sampuser.service.AddInfoLocalServiceUtil
AddInfo info=AddInfoLocalServiceUtil.getAddInfoByUser(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:71: cannot find symbol
symbol : method addAddInfo(boolean,long)
location: class com.liferay.sampuser.service.AddInfoLocalServiceUtil
AddInfoLocalServiceUtil.addAddInfo(status,userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\SampuserInfoLocalServiceImpl.java:82: cannot find symbol
symbol : method deleteInfo(long)
location: class com.liferay.sampuser.service.AddInfoLocalServiceUtil
AddInfoLocalServiceUtil.deleteInfo(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:49: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
AddInfo info = AddInfoPersistence.create(
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:51: cannot find symbol
symbol : class info
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
info.class.getName()));
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:49: cannot find symbol
symbol : variable AddInfoPersistence
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
AddInfo info = AddInfoPersistence.create(
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:55: cannot find symbol
symbol : variable AddInfoPersistence
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
return AddInfoPersistence.update(info, false);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:61: cannot find symbol
symbol : class List
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
List<AddInfo> stat=getAddInfoByuserID(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:61: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
List<AddInfo> stat=getAddInfoByuserID(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:61: cannot find symbol
symbol : method getAddInfoByuserID(long)
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
List<AddInfo> stat=getAddInfoByuserID(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:72: cannot find symbol
symbol : class AddInfo
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
AddInfo info=AddInfoPersistence.create(0);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:72: cannot find symbol
symbol : variable AddInfoPersistence
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
AddInfo info=AddInfoPersistence.create(0);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:79: cannot find symbol
symbol : variable AddInfoPersistence
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
info=AddInfoPersistence.update(info);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\impl\AddInfoLocalServiceImpl.java:87: cannot find symbol
symbol : variable AddInfoPersistence
location: class com.liferay.portal.model.AddInfoLocalServiceImpl
AddInfoPersistence.remove(userId);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:409: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
public static final FinderPath FINDER_PATH_GET_USERS = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:410: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
com.liferay.portal.model.impl.UserModelImpl.FINDER_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:411: cannot find symbol
symbol : class UserPersistenceImpl
location: package com.liferay.portal.service.persistence
com.liferay.portal.service.persistence.UserPersistenceImpl.FINDER_CLASS_NA­ME_LIST,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:409: internal error; cannot instantiate FinderPath(boolean,boolean,java.lang.String,java.lang.String,java.lang.String[])­ at com.liferay.portal.kernel.dao.orm.FinderPath to ()
public static final FinderPath FINDER_PATH_GET_USERS = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:447: cannot find symbol
symbol : class UserImpl
location: package com.liferay.portal.model.impl
com.liferay.portal.model.impl.UserImpl.class);
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:476: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
public static final FinderPath FINDER_PATH_GET_USERS_SIZE = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:477: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
com.liferay.portal.model.impl.UserModelImpl.FINDER_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:478: cannot find symbol
symbol : class UserPersistenceImpl
location: package com.liferay.portal.service.persistence
com.liferay.portal.service.persistence.UserPersistenceImpl.FINDER_CLASS_NA­ME_LIST,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:476: internal error; cannot instantiate FinderPath(boolean,boolean,java.lang.String,java.lang.String,java.lang.String[])­ at com.liferay.portal.kernel.dao.orm.FinderPath to ()
public static final FinderPath FINDER_PATH_GET_USERS_SIZE = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:522: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
public static final FinderPath FINDER_PATH_CONTAINS_USER = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:523: cannot find symbol
symbol : class UserModelImpl
location: package com.liferay.portal.model.impl
com.liferay.portal.model.impl.UserModelImpl.FINDER_CACHE_ENABLED,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:524: cannot find symbol
symbol : class UserPersistenceImpl
location: package com.liferay.portal.service.persistence
com.liferay.portal.service.persistence.UserPersistenceImpl.FINDER_CLASS_NA­ME_LIST,
^
C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java:522: internal error; cannot instantiate FinderPath(boolean,boolean,java.lang.String,java.lang.String,java.lang.String[])­ at com.liferay.portal.kernel.dao.orm.FinderPath to ()
public static final FinderPath FINDER_PATH_CONTAINS_USER = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
^
Note: C:\webapps\edu-sc-asph-mysph-1p\plugins\hooks\sample-hook\docroot\WEB-INF\src\co­m\liferay\sampuser\service\persistence\AddInfoPersistenceImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
39 errors
Posted on 11/30/11 7:51 PM in reply to Richard Sezov.
Hi Rich,

Could you please provide some advice on my question? Am I totally off track? What is the possible problem (or problems) that the entity "AddInfo" specified in service.xml cannot be recognized? Your help is highly highly appreciated!!

Li
Posted on 12/2/11 7:00 PM in reply to Li Dong.
Hi Li,

Sorry; I've been traveling and have had sporadic Internet access. It looks like you've moved the service .jar to the wrong place. It needs to be on the GLOBAL classpath, not Liferay's classpath, which is where you've put it. This is the same place you'd find portlet.jar or portal-service.jar.

Hope this helps!

--Rich
Posted on 12/5/11 10:07 AM in reply to Li Dong.
Hi Rich,

Thank you for your response. I greatly appreciated your time and help. I now did move it to the global classpath. However, this didn't change my fortune. I still received the same error message as above. Is it possible that I wrote my service.xml wrong or I put it in a wrong place (currently it is in /docroot/WEB-INF of the hook)? I included the service.xml codes below.

Thank you for your help!!

Li
The service.xml codes:
----------------------
<?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.liferay.sampuser">
<namespace>sampuser</namespace>
<entity name="AddInfo" table="AddInfo" local-service="true" remote-service="true">
<column name="statusId" type="long" primary="true" />
<column name="userId" type="long" />
<column name="status" type="boolean" />
<column name="user" type="Collection" entity="com.liferay.portal.User" mapping-key="userId" />

<order by="asc">
<order-column name="userId" />
</order>

<reference package-path="com.liferay.portal" entity="User" />
<reference package-path="com.liferay.portlet.expando" entity="ExpandoValue" />
<reference package-path="com.liferay.portlet.expando" entity="ExpandoRow" />

</entity>
</service-builder>
Posted on 12/5/11 6:20 PM in reply to Richard Sezov.
Richard,

Thanks for the book, it is very helpful.

Just to let you know, the code download on the Manning site is out of date, and the one here in your doc library produces an error when unzipping.

Thanks
Posted on 7/5/12 10:31 AM.
Hi Kirk,

I just tested the download from my doc lib and it worked fine without errors. Can you try it again?

--Rich
Posted on 7/11/12 5:47 PM in reply to Kirk Stork.