« Back

Liferay Book: Liferay Portal 5.2 Systems Development

General Blogs April 21, 2009 By Jonas Yuan

Liferay Portal 5.2 Systems Development

A Java developer's guide to developing custom intranet systems, based on Liferay's platform. Sample Chapter; Code Download; Table of Contents;

Build Java-based custom intranet systems on top of Liferay portal

  • Learn to use Liferay tools to create your own applications as a Java developer, with hands-on examples
  • Customize Liferay portal using the JSR-286 portlet, extension environment, and Struts framework
  • Build your own Social Office with portlets, hooks, and themes and manage your own community
  • The only Liferay book aimed at Java developers
  • In More Detail

In Detail

Liferay portal is one of the most mature portal frameworks in the market, offering many key business benefits that involve personalization, customization, and workflow. If you are a Java developer who wants to build custom web sites and intranet applications using Liferay portal, this is where your search ends.

This book shows how Java developers can use Liferay as a framework to develop custom intranet systems, based on Liferay portal platform thus helping you to maximize your productivity gains. Get ready for a rich, friendly, intuitive and collaborative end-user experience!

The author's experience customizing Liferay using Java enables him to explain in a clear and precise manner how to build custom systems on top of Liferay portal.

Using this book you can customize Liferay into a single point of access to all an organization's data, content, web content, and other information from both existing in-house applications (HR, CRM) and external sources (such as Alfresco, FatWire, Magnolia, Vignette).

What you will learn from this book

This book will give you plenty of hands-on examples to customize and extend Liferay portal. You will learn how to:

  • Work with the JSR-286 portlets and Extension environment, helping you to build larger applications and reuse portlets in different scenarios
  • Build basic and advanced Struts portlets with permissions and a set of actions helping you to build enterprise-ready Java web applications
  • Manage communities and pages with locale and tracking features to employ layout templates dynamically
  • Customize WYSIWYG editor FCKEditor – Making images, links, videos, games, video queues, video lists, and play lists as part of web content
  • Empower CMS and WCM providing you with one central place to aggregate and manage all content
  • Build My Community – Share web sites, pages, and portlets with friends allowing you to introduce control panel and inter-portlet communication
  • Develop layout templates and themes in the Plugins SDK environment so that you can customize the overall look and feel of web sites and pages
  • Build your Social Office with portlets, hooks, and themes enabling you to be a part of the team without sacrificing your preferences
  • Stage, schedule, and publish web content with workflow capability allowing you to alter and manage what you have created
  • Build custom attributes, OpenSearch, Spring services, and web services thus helping you to build dynamic web sites smoothly

Approach

This book focuses on teaching by example. Every chapter provides an overview, and then dives right into hands-on examples so you can see and play with the solution in your own environment. All code samples run on both the latest Enterprise and Community releases.

Who this book is written for

This book will be most useful to professional Java developers who want to build custom web sites, portals, and highly customized intranet applications using Liferay portal as a framework.

This book is for Java developers, and you will get most from the book if you already work with Java but you need not have prior experience on Liferay portal. Although Liferay portal makes heavy use of open source frameworks such as Spring, Hibernate, Struts, and Lucene, no prior experience using these is assumed.

Acknowledgements

I would like to thank team members at Liferay, especially thanks to Raymond Auge, Brian Chan, Bryan Cheung, Jorge Ferrer, Michael Young, Jerry Niu, Ed Shin, Craig Kaneko, Brian Kim, Bruno Farache, Thiago Moreira, Amos Fong, Scott Lee and David Truong of Liferay for providing the valuable information and all the support. Thanks to friends in Liferay community for providing comments and suggestions.

Threaded Replies Author Date
Does packt publishing provide beta versions of... Rob A Meidal April 27, 2009 1:40 PM
Hi Rob Thank you. I guess it is possible to... Jonas Yuan April 28, 2009 9:27 AM
I purchase the ebook from the publisher. I was... John Joseph Ryan April 28, 2009 10:27 AM
Hi John, Thank you! I believe that only the... Jonas Yuan April 28, 2009 10:37 AM
I've purchased the PDF version of the book but... Tony Lim May 14, 2009 9:13 AM
Hi Tony, Thank you! Just received message... Jonas Yuan May 14, 2009 11:10 AM
Hi, I am planning to get this book but will it... Farouk Alhassan May 19, 2009 5:48 AM
Hi Farouk, You may find the table of content... Jonas Yuan May 26, 2009 12:05 PM
Downloaded the PDF to the book but am having an... John Joseph Ryan May 27, 2009 9:48 PM
Hi John, Thank you. The... Jonas Yuan May 28, 2009 4:05 AM
After trying a lot of things and redoing the... John Joseph Ryan May 28, 2009 10:32 PM
Hi John, Thank you. I will add a note on the... Jonas Yuan June 1, 2009 9:57 AM
Hi Jonas - I have need to build a social space... supa - way June 9, 2009 11:05 AM
Hi Joy, I believe that the chapter 10 -... Jonas Yuan June 9, 2009 7:31 PM
Hello Jonas I just ordered your book (which is... Amine Bousta June 10, 2009 8:20 AM
Hi Amine, Thank you so much. Sysdeo tomcat... Jonas Yuan June 10, 2009 8:59 AM
Hi Joan, Thanks for your response. I am... supa - way July 23, 2009 4:25 PM
problem solved by removing... supa - way July 23, 2009 5:30 PM
Hi SPA, thank you. I have added this as an... Jonas Yuan July 24, 2009 8:24 AM
Hi Jonas, using page 97 I tried to change the... supa - way July 24, 2009 5:33 PM
Hi SPA, thank you. You need to clean and deploy... Jonas Yuan July 24, 2009 10:31 PM
Thanks it helps - pls could you guide me on how... supa - way July 25, 2009 12:09 PM
got the error below while compiling... supa - way July 25, 2009 1:59 PM
Hi Jonas, When running the servicebuilder in... supa - way July 25, 2009 5:40 PM
Hi SPA, Thank you. There is an erratum for the... Jonas Yuan July 27, 2009 10:51 PM
Hi Jonas - the codes from the download work... supa - way July 28, 2009 10:45 AM
Hi Jonas On page 374 you have mentioned of a... supa - way July 28, 2009 10:49 AM
Hi SPA, thank you. The version 5.3 will update... Jonas Yuan July 28, 2009 1:46 PM
Hi Jonas - thanks for the update. Also, I have... supa - way July 28, 2009 2:39 PM
Hi SPA, you should use 5.2.x, exactly... Jonas Yuan July 28, 2009 4:03 PM
Hi SPA, you may need to deploy theme. Good luck! Jonas Yuan July 28, 2009 3:58 PM
Hi SPA, there are no exception in above code.... Jonas Yuan July 27, 2009 10:41 PM
Hi SPA, you can try the following steps: ... Jonas Yuan July 27, 2009 10:53 PM
Hello Jonas, Your Chapter 3 gave me lots of... Amine Bousta June 12, 2009 12:45 AM
Hi Amine, Thank you. For the ext, we can... Jonas Yuan June 12, 2009 3:49 AM
I see But in your exemple it seems you don't... Amine Bousta June 12, 2009 10:05 AM
Hi Amine, Thank you. You are right that I... Jonas Yuan June 14, 2009 3:36 PM
Ok thank you Jonas ! I'm not used to work with... Amine Bousta June 15, 2009 12:14 AM
Hi Amine, Thank you so much! It is possible to... Jonas Yuan June 19, 2009 2:27 PM
Yes that is what I used to do. I read step by... Amine Bousta June 23, 2009 6:05 AM
Note : I went back to the 5.2.3 version and got... Amine Bousta June 23, 2009 8:37 AM
[resolved] Actually it was not a problem of... Amine Bousta June 24, 2009 10:26 AM
Hi Amine, Thank you so much. Yes, we need to... Jonas Yuan June 24, 2009 11:37 AM
Trouble with book-street-theme in Chap. 6.... Sam Bergenstrahle July 5, 2009 3:18 PM
Hi Sam, Thank you! You are right that the... Jonas Yuan July 7, 2009 8:14 AM
Chapter4 -advanced struts portlet -... Nagendra Kumar Busam July 13, 2009 12:22 AM
Somehow it got fixed. I don't know exact reason... Nagendra Kumar Busam July 14, 2009 6:19 AM
Hi Nagendra, thank you so much! You are... Jonas Yuan July 14, 2009 7:44 AM
Thank you Jonas for clarification regarding... Nagendra Kumar Busam July 14, 2009 8:08 AM
Chapter5: Managing Pages -... Nagendra Kumar Busam July 14, 2009 8:06 AM
Hi Nagendra, Thank you so much! You did find a... Jonas Yuan July 15, 2009 6:35 AM
Hi Jonas. I bought the PDF version of the... Chris Brooks July 28, 2009 12:19 AM
Hi Jonas. I bought the PDF version of the... Chris Brooks July 28, 2009 12:23 AM
Hi Chris, thank you. It should work ... You may... Jonas Yuan July 28, 2009 11:35 AM
Hi Jonas - thanks for all your previous... supa - way July 28, 2009 11:49 AM
Thank you, SPA, you did find another erratum.... Jonas Yuan July 28, 2009 4:13 PM
Hi Jonas, thanks too for your gr8 book. ... supa - way July 28, 2009 4:33 PM
Hi Supa, thank you. I guess that you need to... Jonas Yuan July 28, 2009 5:47 PM
I have gone through Chapter 6: Customizing the... Nagendra Kumar Busam July 28, 2009 8:01 AM
Hi Nagendra, Thank you. Do you install the... Jonas Yuan July 28, 2009 5:49 PM
Hi Jonas, Can you please check if this... supa - way July 28, 2009 4:16 PM
Hi Supa, thank you. The statement "The code... Jonas Yuan July 28, 2009 4:23 PM
Hi Jonas, Thank you very much for quick... Nagendra Kumar Busam July 29, 2009 7:48 AM
Hi Nagendra, Thank you. You could find detailed... Jonas Yuan July 29, 2009 7:57 AM
According to instructions in page 222, i have... Nagendra Kumar Busam July 29, 2009 8:26 AM
Hi Nagendra, Thank you. You did have good... Jonas Yuan July 29, 2009 1:10 PM
Hi Jonas, I have painstakingly follow the... supa - way July 29, 2009 10:30 AM
Hi SPA, Thank you. It seems that you are... Jonas Yuan July 29, 2009 2:35 PM
Hi Jonas, Would you mind to please give a... supa - way July 30, 2009 8:22 AM
Hi Jonas, The jsp page described on page 412... supa - way July 30, 2009 9:43 AM
Hi Jonas - after deploying the chat portlet and... supa - way July 31, 2009 11:24 AM
see the activities that keep repeating itself... supa - way July 31, 2009 11:38 AM
Hi SPA, thank you. You can clean up Tomcat and... Jonas Yuan July 31, 2009 1:30 PM
Hi Jonas, Thanks and I have done all these. I... supa - way July 31, 2009 4:12 PM
Hi SPA, Thank you. There is a bug (the process... Jonas Yuan August 4, 2009 11:41 AM
I am using the 5.2.3 CE,but I still met the... heypig Chu March 31, 2010 6:32 PM
Hi Heypig, thanks. For some reason, you may... Jonas Yuan April 1, 2010 5:19 PM
Hi SPA, thank you. You did find another erratum... Jonas Yuan August 3, 2009 11:54 AM
Hi SPA, Thank you! You can find details in... Jonas Yuan August 3, 2009 11:21 AM
Thanks, That was really helpful BUT one thing... Nagendra Kumar Busam July 29, 2009 10:50 AM
Hi Nagendra, the URL should like: ... Jonas Yuan July 29, 2009 11:18 AM
Hi Jonas, According to inputs given by you, i... Nagendra Kumar Busam July 30, 2009 8:09 AM
Hi Nagendra, Thank you. You are ready to use... Jonas Yuan July 31, 2009 1:21 PM
Hi Jonas, Thank you very much for the reply. ... Nagendra Kumar Busam August 3, 2009 6:18 AM
Hi Nagendra, thanks. Do you make the section... Jonas Yuan August 3, 2009 11:09 AM
Hi Jonas, Thank you very much for your reply. ... Nagendra Kumar Busam August 3, 2009 11:20 PM
Hi Nagendra, thank you. You are right that in... Jonas Yuan August 4, 2009 10:59 AM
Hi Jonas, I downloaded the liferay source code... supa - way August 4, 2009 12:33 PM
Hi SPA, thank you. It would be better to use... Jonas Yuan August 4, 2009 1:59 PM
Hi Jonas, many thanks - I was able to build a... supa - way August 4, 2009 2:45 PM
Hi Jonas, I am beginning to think I have a... supa - way August 4, 2009 6:20 PM
Hi SPA, It is really a good news that you have... Jonas Yuan August 5, 2009 6:40 AM
Hi Jonas - many thanks. Please are you able to... supa - way August 5, 2009 7:43 AM
Hi SPA, Thanks. The downloading code is... Jonas Yuan August 5, 2009 9:45 AM
Hi Jonas, I've integrated fckeditor in liferay... koun neak February 25, 2011 8:03 AM
Hi Koun, Thanks. Are you able to view... Jonas Yuan February 28, 2011 6:41 PM
Thank Jonas, No i'm not able to view the... koun neak March 1, 2011 1:27 AM
Hi Jonas, I bought the book, it's really good... Denis Signoretto August 7, 2009 1:11 AM
Hi Denis, Thank you. Yes, in page 80,... Jonas Yuan August 7, 2009 5:55 AM
Hi Jonas, thanks for all your previous... supa - way August 10, 2009 2:54 PM
Hi SPA, Thank you. I am not sure about the... Jonas Yuan August 11, 2009 7:08 AM
Chapter7#Customizing CMS and WCM - i was going... Nagendra Kumar Busam August 14, 2009 9:57 AM
Hi Nagendra, Thank you. You are right that the... Jonas Yuan August 14, 2009 5:44 PM
Hi Jonas, Thank you very much for clarification Nagendra Kumar Busam August 18, 2009 5:59 AM
Hi, your book is really good, specially... Pablo M Mino October 15, 2009 4:09 PM
Hi Pablo, Thank you. It seems that the code did... Jonas Yuan October 16, 2009 5:23 AM
I apologize for this delayed answer, I was... Pablo M Mino October 28, 2009 3:43 PM
sorry for the delay, yes, I checked the jar and... Pablo M Mino October 28, 2009 4:02 PM
My apologies for the double post, my profile... Pablo M Mino October 29, 2009 4:20 PM
Hi Pablo, thank you. Do you get the portlet... Jonas Yuan November 3, 2009 1:33 PM
I met the same problem with Pablo. To make it... Binh Do November 27, 2009 10:33 AM
Thank you, Binh. Jonas Yuan November 28, 2009 7:32 AM
Hi Jonas, I follow ext Community example in... Binh Do November 27, 2009 10:40 AM
Hi Binh, thanks. You may refer to... Jonas Yuan November 28, 2009 7:31 AM
Thanks Jonas, I replaced my... Binh Do November 29, 2009 5:14 PM
Thank you , Binh. Nice to know that it is... Jonas Yuan December 3, 2009 1:09 PM
Jonas, Bought the eBook, working through it... Matthew Dickson November 29, 2009 12:50 PM
Hi Mathew, thanks. It is better for you to use... Jonas Yuan November 30, 2009 9:47 AM
I was working the advanced portlet example and... John Joseph Ryan December 6, 2009 2:36 PM
The view all books link will show the newly... John Joseph Ryan December 6, 2009 2:38 PM
Hi John, It seems that action names did not get... Jonas Yuan December 8, 2009 12:26 PM
Hi John, thanks. It seems actions are missing. ... Jonas Yuan December 8, 2009 12:22 PM
Hello Jonas, Thank you for writing a practical... Nischala Kale January 6, 2010 8:06 AM
Hi Nischala, thank you. Supports indicates... Jonas Yuan January 6, 2010 2:36 PM
Jonas, Thank you very much for your response. ... Nischala Kale January 6, 2010 5:36 PM
Hi Nischala, thank you. You did find one more... Jonas Yuan January 7, 2010 4:00 PM
Hello Jonas, After making the changes for... Nischala Kale January 7, 2010 9:12 PM
Hi Nischala, Thanks. Which version are you... Jonas Yuan January 11, 2010 8:49 AM
I'm using 5.2.3 CE. Nischala Kale January 11, 2010 2:14 PM
Thanks Jonas. I've looked in the 5.3 code base... Nischala Kale January 13, 2010 9:00 AM
Hi Nischala, Flash URL in Editor of 5.3 is not... Jonas Yuan January 13, 2010 9:29 AM
Thanks for the SCAYT blog post Jonas; it is... Nischala Kale January 14, 2010 4:13 PM
Hi Nischala, Thanks. It seems that the network... Jonas Yuan January 15, 2010 6:03 PM
Hi Nischala, it seems that you are trying to... Jonas Yuan January 13, 2010 9:25 AM
According to your book Liferay Portal 5.2... Hermann yao February 7, 2010 1:12 PM
Hi Hermann, thanks. The current trunk is for... Jonas Yuan February 7, 2010 3:25 PM
Thank you, it works. I walk on my project!!! Hermann yao February 8, 2010 5:04 AM
Hello Jonas, I have a problem with the Asset... Dracus X March 3, 2010 4:04 AM
Hi Dracus, thank you. Could you please give... Jonas Yuan March 4, 2010 10:53 AM
Hello, Ok, I will try to give more details. ... Dracus X March 5, 2010 3:08 AM
Hi Dracus, Thank you. Very good practice. Do... Jonas Yuan March 7, 2010 8:40 AM
Let me know if anyone needs the PDF version of... Navin D Singh March 19, 2010 12:57 PM
Dracus, Hello. I encountered the same problem... Matthew Dickson May 17, 2010 2:25 PM
Jonas, I have encountered a small bug when... Matthew Dickson May 17, 2010 2:33 PM
Hi Matt, thanks. I did not encounter this kind... Jonas Yuan May 21, 2010 10:29 AM
Jonas, Your book is great. I'm following it to... Anonymous May 24, 2010 6:20 AM
Thanks, Tom. There are at least two use cases... Jonas Yuan May 24, 2010 10:39 AM
Jonas, Thanks for help. Yes, there are 2 use... Anonymous May 24, 2010 9:22 PM
Hi Jonas, "delete entry from Group_ and... Denis Signoretto May 25, 2010 12:26 AM
Denis That's only my suggestion for production... Anonymous May 25, 2010 1:12 AM
Hi Denis, thanks. Group_ and ExtGroup are... Jonas Yuan May 26, 2010 10:57 AM
Hi, Jonas thank you for your book and i`m... le hung June 9, 2010 10:20 AM
Hi Le, thanks. Which Liferay portal version are... Jonas Yuan June 10, 2010 3:36 PM
thanks for reply. I deployed ext again and... le hung June 11, 2010 2:27 AM
Thank you, Le. It is very nice that it was... Jonas Yuan June 14, 2010 8:42 AM
Hi. After learning about advanced struts... le hung June 14, 2010 11:09 PM
Hi Le, thanks. The book especially chapter 4... Jonas Yuan June 15, 2010 4:49 PM
Hi Jonas. I have developed my dictionary... le hung June 21, 2010 11:37 PM
Hi, Le. Thanks. You can use database or file to... Jonas Yuan June 28, 2010 10:30 AM
Hi Jonas. Thank for your support. I have... le hung June 28, 2010 9:52 PM
Hello Jonas On the chapter 5, i can't seems to... William B July 22, 2010 8:03 AM
Tried it and it work, off course all the other... William B July 22, 2010 8:10 AM
Thanks William. I had just come across this... Sean C August 16, 2010 9:11 AM
Hi Sean, sorry to come back to you so late. it... Jonas Yuan September 25, 2010 11:52 AM
Hi William, do you get answers for your... Jonas Yuan August 18, 2010 3:54 PM
Hi Tom, you may refer to the book - online... Jonas Yuan May 26, 2010 10:46 AM
I began to read this book. My goal is to build... cristian ronzio September 24, 2010 3:23 PM
Hi Cristian, Thanks. I believe that Liferay... Jonas Yuan September 24, 2010 10:26 PM
Hi Jonas. I'm going to Ant build Liferay as... cristian ronzio September 25, 2010 10:55 AM
Hi Cristian, Thanks. In 5.2 or previous... Jonas Yuan September 25, 2010 11:50 AM
Thanks Jonas. I will switch to Liferay Portal 6... cristian ronzio September 25, 2010 12:02 PM
Jonas, I am just re-starting working through... Matthew Dickson May 2, 2011 4:27 AM
Hi Matthew, do you get the issue fixed? which... Jonas Yuan May 13, 2011 2:18 PM
Good day all! I am a recruiter with Accenture,... Traci Morgan September 19, 2011 2:51 PM

Does packt publishing provide beta versions of their books? I would love to order a pdf to get a look at the current edition even if it might have rough edges.
Posted on 4/27/09 1:40 PM.
Hi Rob

Thank you.

I guess it is possible to get a PDF at http://www.packtpub.com/liferay-portal-5-2-systems-development/book. As expected, the book will be released at May 14, 2009.

Jonas Yuan
Posted on 4/28/09 9:27 AM in reply to Rob A Meidal.
I purchase the ebook from the publisher. I was not allowed to download the book. I would really like to see what content is available. I can give you my order number and show you a receipt if there is a way to get the pdf now even if it isn't totally polished.
Posted on 4/28/09 10:27 AM in reply to Jonas Yuan.
Hi John, Thank you!

I believe that only the publisher can answer the questions related to the release. As expected, the book will be released at May 14, 2009. Therefore, there are two more weeks - for downloading the ebook from the publisher, I guess.

Jonas Yuan
Posted on 4/28/09 10:37 AM in reply to John Joseph Ryan.
I've purchased the PDF version of the book but still can't download it. When is the expected release date?
Posted on 5/14/09 9:13 AM.
Hi Tony,

Thank you! Just received message from the Publisher. It mentioned that the book "Liferay Portal 5.2 Systems Development" was scheduled to release on 30th May 2009.
Posted on 5/14/09 11:10 AM in reply to Tony Lim.
Hi, I am planning to get this book but will it help me to develop portlets using netbeans? As in does it cover the portal plugin () and/or JSF bridge??
Regards
Posted on 5/19/09 5:48 AM.
Hi Farouk,

You may find the table of content at http://www.packtpub.com/article/liferay-portal-5-2-systems-development-table-of-­contents, and the sample chapter at http://www.packtpub.com/files/liferay-portal-5-2-systems-development-sample-chap­ter-5-managing-pages.pdf. Hope that it helps.

Thanks

Jonas Yuan
Posted on 5/26/09 12:05 PM in reply to Farouk Alhassan.
Downloaded the PDF to the book but am having an issue with the ext deploy not finding StrutsPortlet. Everything worked up till page 76. Below is the error
Any ideas?

Building jar: M:\liferay_portal\workspace\ext\ext-service\ext-service.jar
deploy:
Copying 1 file to M:\liferay_portal\apache-tomcat-6.0.18\lib\ext
compile:
Created dir: M:\liferay_portal\workspace\ext\ext-impl\classes
Compiling 10 source files to M:\liferay_portal\workspace\ext\ext-impl\classes
M:\liferay_portal\workspace\ext\ext-impl\src\com\ext\portlet\reports\ReportsPort­let.java:25: cannot find symbol
symbol : class StrutsPortlet
location: package com.liferay.portlet
import com.liferay.portlet.StrutsPortlet;
......etc.....
Posted on 5/27/09 9:48 PM.
Hi John,

Thank you. The com.liferay.portlet.StrutsPortlet is a part of portal-impl.jar. You can find the source code at /portal/portal-impl/src in the IDE. After the ant targets - ant clean start build-ext, you would have this JAR ready in the EXT (/ext/modules/portal-impl.jar). And in /ext/.classpath (Navigator view), you should have

...
<classpathentry excluding="**/.svn/**|.svn/" kind="src" path="ext-impl/src"/>
<classpathentry excluding="**/.svn/**|.svn/" kind="src" path="ext-service/src"/>
...
<classpathentry kind="lib" path="modules/portal-impl.jar"/>
...
Posted on 5/28/09 4:05 AM in reply to John Joseph Ryan.
After trying a lot of things and redoing the deployment several times ( even switching to other branches), I found out what was wrong.

Page 75 says to copy build.${user.name}.properties to the ext project from the portal project, but this is what was causing the problems. The build.xml file in the ext project worked when I removed the build.${user.name}.properties. You may want to add a note or errata on the book web site. I think classpath.ext is the required attribute in ext's build.xml that disapears when the properties from portal is copied.
Posted on 5/28/09 10:32 PM.
Hi John, Thank you. I will add a note on the book web site about this. Jonas Yuan
Posted on 6/1/09 9:57 AM in reply to John Joseph Ryan.
Hi Jonas - I have need to build a social space for a group of users comprising - a blog, a wiki, chat and alert. Will this book assist me in any way? Could it get to speed on how to extend the existing functionalities?

SPA
Posted on 6/9/09 11:05 AM in reply to Jonas Yuan.
Hi Joy,

I believe that the chapter 10 - Building My Social Office - would give you answers, where you could see:

Develop the Social Office theme
Add mail and chat portlets
Build Social Office with portlets
Hook portal properties and custom JSP files (WIKI, blogs, forums, ducuments, etc. ) into Social Office
Use hooks more efficiently.

Hope that it helps.

Jonas Yuan
Posted on 6/9/09 7:31 PM in reply to Sunday - Joy.
Hello Jonas

I just ordered your book (which is really good btw) and I'm reading the chapter 3 in the pdf version.
Is there a reason to recommend sysdeo tomcat plugin instead of WTP to deal with tomcat and debug mode?
I mean a reason due to some Liferay specificity?
Posted on 6/10/09 8:20 AM in reply to Jonas Yuan.
Hi Amine,

Thank you so much. Sysdeo tomcat plugin in Eclipse IDE is used for demo purpose only, since it is small and simple. As mentioned in the book, You can use any other Tomcat plugins (for debug), such as WTP, MyEclipse, etc.

Good Luck!
Posted on 6/10/09 8:59 AM in reply to Amine Bousta.
Hello Jonas,

Your Chapter 3 gave me lots of answers about the dev environment.
But I still have a question.
When we checkout the portal module from Liferay svn repository, we can build an ext project dedicated to our custom needs.
Thus, this ext project can be shared among the development team through another svn repository.
But when we checkout the plugin sdk module at the end of chapter 3, it seems that we have to work directly in this checked out project
But custom plugins should not be stored in the svn liferay repository.
Is there a way, like in ext, to create our custom plugin sdk instance?
Or is it finally better to download directly the sdk in liferay sourceforge and customize it?

(btw i really liked your tip to fast dev plugins with tomcat emoticon )
Posted on 6/12/09 12:45 AM.
Hi Amine, Thank you.

For the ext, we can build an ext project dedicated to our custom needs. This ext project can be shared among the development team through another svn repository.

For the Plugins SDK, we can do the same: custom plugins (themes, portlets, etc.) could be stored in the another svn repository. For example, we have plugin my-abc-portlet, we can store it in our repository: ../plugins/portlets/my-abc-portlet; then check out my-abc-portlet from our svn repository to the plugins SDK $PLUIGINS_SDK_HOME/portlets/.

Thus, this plugin project (for example my-abc-portlet) can be shared among the development team through another svn repository. :-)
Posted on 6/12/09 3:49 AM in reply to Amine Bousta.
I see
But in your exemple it seems you don't have a Plugins sdk coming from the Liferay repository, it's like you have a plugin SDK coming from sourceforge don't you?

In the Chapter 3, you first checkout the entire plugin SDK from Liferay SVN Repo into your workspace/Plugins SDK
Then you create plugins in there.

Then now if I want to store new portlets and themes in another repository I have two ways :
1. Cutting the link to the official Liferay repository and then posting this into my own svn repository
2. Or creating a copy of the plugin SDK (like we can do it with the EXT ant script in portal for exemple) that is not binded to the Liferay svn repo

Am I wrong?
Posted on 6/12/09 10:05 AM in reply to Jonas Yuan.
Hi Amine, Thank you. You are right that I should add how to share project via another repository obviously.

In fact, as mentioned in the book, we can first check out entire repository in $PLUGINS_SDK_HOME from Liferay portal Plugins SVN; then check out custom portlet, such as abc-portlet, in $PLUGINS_SDK_HOME/portlets from another repository. Thus, we can get updates for sample portlets from Liferay portal SVN. At the same time, we can share custom portlets among the team. This would satisfy our different requirements.
Posted on 6/14/09 3:36 PM in reply to Amine Bousta.
Ok thank you Jonas !

I'm not used to work with two svn repositories in the same eclipse project that's why I didn't figure this out. :-)
Posted on 6/15/09 12:14 AM in reply to Jonas Yuan.
Hi Amine, Thank you so much! It is possible to use only one repository, if you use Plugins SDK officially released version, such as 5.2.3.
Posted on 6/19/09 2:27 PM in reply to Amine Bousta.
Yes that is what I used to do.

I read step by step your chapter 4 and found issues with the jsp portlet (page 94)
I'm using the last portal version from svn (5.3).

When I try to add this hello world jsp portlet in my page, I get a null pointer exception and jsp portlet is not available in the "add application" div. (the entire category is missing)

The exception is coming from category_view.jsp when it tries to list available portlets.
It calls PortletConfigImpl.java and then null pointer occurs at line 202
bundle = portletBag.getResourceBundle(locale);

"portletBag" is null indeed (I can see it in debug mode with eclipse)

The line above is :
PortletBag portletBag = PortletBagPool.get(
_portlet.getRootPortletId());

So I suppose our new jsp portlet is not part of the portletBagPool as it returns null

What do you think about that? What could make a portlet out of the portletBag pool?
Posted on 6/23/09 6:05 AM in reply to Jonas Yuan.
Note : I went back to the 5.2.3 version and got exactly the same issue
Posted on 6/23/09 8:37 AM in reply to Amine Bousta.

Actually it was not a problem of liferay versions.
The thing was that Liferay doesn't trim the portlet.getResourceBundleName() value.

As I inserted a tab and a carriage return in portlet.xml, Liferay could not figure out the name of the resource bundle for this jsp portlet and threw this exception (that crashes the Administration UI as well by the way...)
Posted on 6/24/09 10:26 AM in reply to Amine Bousta.
Hi Amine, Thank you so much.

Yes, we need to replace the following

<resource-bundle>
com.liferay.portlet.StrutsResourceBundle
</resource-bundle>

with

<resource-bundle>c­om.liferay.portlet.StrutsResourceBundle</resource-bundle>

in portlet(-ext).xml. You are right, Liferay portal doesn't trim the portlet.getResourceBundleName() value - this is a bug (see http://issues.liferay.com/browse/LPS-3829)
Posted on 6/24/09 11:37 AM in reply to Amine Bousta.
Trouble with book-street-theme in Chap. 6.
Jonas, thanks much for your great work on this book!

As I'm working my way through it I ran into a bit of confusion. In Chapter six "Preparing CSS styles in themes" on page 186-187 you refer to the book-street-theme folder, but I'm unable to find it.

Browsing ahead I see that we are creating this custom theme (book-street-theme) in Chapter nine.

Should I go ahead and finish Chap. 9 before continuing on Chap. 6 or would you suggest another approach to completing Chap. 6? I would not be surprised if I have missed an essential step prior to page 186, but I can't seem to find it. ;-)

Cheers!
Posted on 7/5/09 3:18 PM.
Hi Sam, Thank you!

You are right that the entire theme (as a plugin) is available in chapter 9. In chapter 6, you can only find CSS files at /code/templates and styles/css/street and /code/templates and styles/css/workshop.

If you want to have a look on CSS files only, you may check these CSS files. If you want to see the entire theme and use it in run time, you may go ahead and finish the chapter 9.

You did not miss any steps. The book should provide the entire themes as plugins (street and workshop) in chapter 6, too.
Posted on 7/7/09 8:14 AM in reply to Sam Bergenstrahle.
Chapter4 -advanced struts portlet - [JDBCExceptionReporter:101] Duplicate entry error on tomcat startup

I was following your latest book, i am a newbie to liferay CMS. It was really a great book, After going through "advanced struts portlet" section of your book when i started tomcat it was giving the above error.
Posted on 7/13/09 12:22 AM.
Somehow it got fixed. I don't know exact reason for that error. There was some space before & after fully qualified class name in portal-class for portlet element portal-ext.xml. Thinking might be this is the actual problem
Posted on 7/14/09 6:19 AM in reply to Nagendra Kumar Busam.
Hi Nagendra, thank you so much!

You are right, Liferay portal doesn't trim the portal-class value - this is a bug (similar to the bug - http://issues.liferay.com/browse/LPS-3829). This issue got fixed in 5.3 like

<portlet-class> com.ext.portlet.reports.ReportsPortlet </portlet-class>

in portlet-ext.xml

Fortunately, it is working fine in 5.3 (At revision: 34353).
Posted on 7/14/09 7:44 AM in reply to Nagendra Kumar Busam.
Chapter5: Managing Pages - [JDBCExceptionReporter:101] Unknown column 'extgroupim0_.creator' in 'field list'

I was getting above error when i followed as it is steps in book. I hope there is one extra column column 'creator' in service.xml for creator

I checked the same by downloading the code from http://www.packtpub.com/support for Liferay Portal 5.2 Systems Development
, In downloaded code 'creator' column is not there in service.xml of chapter5.

Please let me know which one to follow. Really book is of great use for newbies like me as well experienced programmers.
Posted on 7/14/09 8:06 AM.
Thank you Jonas for clarification regarding exact problem
Posted on 7/14/09 8:08 AM in reply to Jonas Yuan.
Hi Nagendra, Thank you so much! You did find a mismatching column of service.xml in the book.

If fact, the following line is not expected in page 145. It has "creator" in the book - It should be removed. Downloading code is correct (both service.xml and extgroup.sql).

<column name="creator" type="String" />

If you read sql in page 146, you will see that the query is correct, having no column "creator".

Thank you again, I will put above updates in website.
Posted on 7/15/09 6:35 AM in reply to Nagendra Kumar Busam.
Hi Joan,

Thanks for your response. I am trying to deploy ext and am getting the error below.

Compiling 10 source files to E:\projects\trunk\LIFERAY_PORTAL\workspace\ext\ext-impl\classes
E:\projects\trunk­\LIFERAY_PORTAL\workspace\ext\ext-impl\src\com\ext\portlet\reports\ReportsPortle­t.java:25: cannot find symbol
symbol : class StrutsPortlet
location: package com.liferay.portlet
import com.liferay.portlet.StrutsPortlet;
E:\projects\trunk\LIFERAY_PORTAL\workspace\ext­\ext-impl\src\com\ext\portlet\reports\ReportsPortlet.java:40: cannot find symbol
symbol: class StrutsPortlet
public class ReportsPortlet extends StrutsPortlet {
E:\projects\trunk\LIFERAY_PORTAL\workspace\ext\ext-impl\src\com\ext\portlet\rep­orts\action\ViewReportsAction.java:25: package com.liferay.portal.struts does not exist
import com.liferay.portal.struts.PortletAction;
E:\projects\trunk\LIFERAY_PORTAL\workspa­ce\ext\ext-impl\src\com\ext\portlet\reports\action\ViewReportsAction.java:48: cannot find symbol
symbol: class PortletAction
public class ViewReportsAction extends PortletAction {

I am using netbeans 6.1 and a pluggable tomcat different from the one bundled with netbeans

cheers

SPA
Posted on 7/23/09 4:25 PM in reply to Jonas Yuan.
problem solved by removing build.${user.name}.properties - thank you John Joseph Ryan for your post! SPA!
Posted on 7/23/09 5:30 PM in reply to supa - way.
Hi SPA, thank you. I have added this as an errata on the book web site (page 75) - removing build.${user.name}.properties - this causes errors in Ext (especially, for NetBeans IDE) - Ant Target compile.
Posted on 7/24/09 8:24 AM in reply to supa - way.
Hi Jonas,

using page 97 I tried to change the title of the jsp_portlet by adding javax.portlet.title.jsp_portlet=JSP Portlet to language.ext.properties under /ext/ext-impl/src/content folder and after cleanup and deploy of ext-web - the title remains the same tho the category now change to sample as expected. Any idea why the title refuses to change?

SPA
Posted on 7/24/09 5:33 PM in reply to Jonas Yuan.
Hi SPA, thank you. You need to clean and deploy of the ext, too. If you change the JSP files only, you can do fast deploy of the ext-web. Hope that it helps.
Posted on 7/24/09 10:31 PM in reply to supa - way.
Thanks it helps - pls could you guide me on how to import ext as a project in netbeans so I could access it in packages?

many thanks.

SPA
Posted on 7/25/09 12:09 PM in reply to Jonas Yuan.
got the error below while compiling ViewBookReportsAction on page 103

found : javax.portlet.PortletPreferences
required: com.liferay.portal.model.PortletPreferences
PortletPreferences prefs = renderRequest.getPreferences();
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

the errorneous line is
PortletPreferences prefs = renderRequest.getPreferences();

Pls guide towards correction and I am using latest source from the trunk.

thanks

SPA
Posted on 7/25/09 1:59 PM in reply to supa - way.
Hi Jonas,

When running the servicebuilder in page 114/115 - the BookReportsEntry and BookReportsEntrysoap classes wwere not created thus am getting errors like cannot find symbol symbol : class ReportsEntry
location: class com.ext.portlet.bookreports.action.BookLocalServiceUtil
public static ReportsEntry addBook(ActionRequest req) throws PortalException, SystemException {

pls guide towards solution

SPA!
Posted on 7/25/09 5:40 PM in reply to supa - way.
Hi SPA, you can try the following steps:

Importing the project into NetBeans 6.5
* Start the Import Eclipse Project dialog (via File -> Import Project menu)
In the Project Import dialog box, you are presented with two options:
* Import Projects from Workspace
* Import Project ignoring Project Dependencies
Choose the first option, and "browse" to the eclipse workspace where you have created the project

Hope that it helps.
Posted on 7/27/09 10:53 PM in reply to supa - way.
Hi SPA, there are no exception in above code. You simply import javax.portlet.PortletPreferences ... Hope that it helps.
Posted on 7/27/09 10:41 PM in reply to supa - way.
Hi SPA, Thank you. There is an erratum for the code in pages 114/115. The "ReportsEntry" should be "BookReportsEntry". The code from downloading web site is correct. I have added this as an erratum in the book web site. Thank you again.
Posted on 7/27/09 10:51 PM in reply to supa - way.
Hi Jonas. I bought the PDF version of the book, and I'm having a problem on Tomcat startup on p. 77. Constantly getting Connnection refused errors. I'm developing on Vista Business SP1, Tomcat 6.0.18, LR portal/trunk HEAD, MySQL 5.1.11. Any help would be greatly appreciated. MySQL issues seem to be common with Liferay.
Posted on 7/28/09 12:19 AM.
Hi Jonas. I bought the PDF version of the book, and I'm having a problem on Tomcat startup on p. 77. Constantly getting Connnection refused errors. I'm developing on Vista Business SP1, Tomcat 6.0.18, LR portal/trunk HEAD, MySQL 5.1.11. Any help would be greatly appreciated. MySQL issues seem to be common with Liferay.
Posted on 7/28/09 12:23 AM.
I have gone through Chapter 6: Customizing the WYSIWYG Editor

I have added some docsthrough Document library and some images added through Image Gallery interfaces.

I have created web content (journal article) from control panel, I want to add\include images and docs created through document library\image gallery in web content created

When i clicked on Insert\Edit Image from FCKEditor i am getting "Image Info","Link","Advanced" tabs, there was a URL field with "Browse Server" button - when i clicked on "Browser Server" button i am going to a search page BUT i am not able to search for any existing content (I am searching using Title field) . Please help me out to make this work
Posted on 7/28/09 8:01 AM.
Hi Jonas - the codes from the download work fine + gr8 work in the book.
Posted on 7/28/09 10:45 AM in reply to Jonas Yuan.
Hi Jonas

On page 374 you have mentioned of a dock.vm template file that is present in this folder: /portal/portal-web/docroot/html/themes/_unstyled/templates/ - however, there is no dock.vm file in this folder. I am using the latest update 5.3.0.1 - am i missing something?

cheers

SPA
Posted on 7/28/09 10:49 AM in reply to supa - way.
Hi Chris, thank you. It should work ... You may need to set up database properly: test database: mysql -u username -ppassword ... you should be able to access the database.

Hope it helps.
Posted on 7/28/09 11:35 AM in reply to Chris Brooks.
Hi Jonas - thanks for all your previous responses as they were all helpful. On page 377 under changing themes you mentioned of a control_panel folder that is present in portal/portal-impl/docroot/html/themes folder and that similar structure be created in ext/ext-impl folder. unfortunately this folder is only present in portal/portal-web/docroot/html/themes folder. am i missing anything from this page? also is it the case that the portal/portal-impl be replaced with portal/portal-web?

thanks in advance

SPA
Posted on 7/28/09 11:49 AM in reply to Jonas Yuan.
Hi SPA, thank you. The version 5.3 will update the dock (merging the dock.vm into portal_normal.vm) as #dockbar(). I will add this as an erratum in the book web site.
Posted on 7/28/09 1:46 PM in reply to supa - way.
Hi Jonas - thanks for the update. Also, I have followed the instructions in the book on pages 377 - 378 on customizing the control panel by changing the theme and also by editing the edit page and view page. I even changed the company_logo.png in _diffs/images/common and also the custom.css in _diffs/css and after deploying all these using the build.xml of ext - nothing changes as the control panel remains the same - no change to look and feel and the logo too did not change.

Any guide?

SPA
Posted on 7/28/09 2:39 PM in reply to Jonas Yuan.
Hi SPA, you should use 5.2.x, exactly compatible with the book. The version 5.3 is not released yet. So please use the 5.2.x. By the way, you can use 5.3 later and regenerate services.
Posted on 7/28/09 4:03 PM in reply to supa - way.
Hi SPA, you may need to deploy theme. Good luck!
Posted on 7/28/09 3:58 PM in reply to supa - way.
Hi Nagendra, Thank you. Do you install the package cms_services? The cms_services will provide default assets. Hope that it helps.
Posted on 7/28/09 5:49 PM in reply to Nagendra Kumar Busam.
Thank you, SPA, you did find another erratum. Yes, "/portal/portal-impl/" should be "/portal/portal-web/" on page 377. I will add this in the book web site.
Posted on 7/28/09 4:13 PM in reply to supa - way.
Hi Jonas,

Can you please check if this statement "The code above shows registration of the book-street-theme theme with ID as so and name as Social Office." on page 390 is correct? I think the "book-street-theme" should read "so-theme". This is just before the last heading on the page 390.

thanks 4 ur previous responses.

PLEASE how do I get to downgrade my present 5.3 to 5.2 because there is no version selection while using the svn (subversion) in NetBeans to check out the source.

thanks in advance.

SPA
Posted on 7/28/09 4:16 PM in reply to Jonas Yuan.
Hi Supa, thank you. The statement "The code above shows registration of the book-street-theme theme with ID as so and name as Social Office." is talking about ("so" and "Social Office")

<theme id="so" name="Social Office" />

It would be better to re-write this statement in future - reducing confusion. :-)

For 5.2.x, you can use the branch version, since the trunk version (5.3) is under development.
Posted on 7/28/09 4:23 PM in reply to supa - way.
Hi Jonas,

thanks too for your gr8 book. However, all the change customizations advised on page 377 & 378 for customizing the control panel were not reflected when I deployed ext. I changed logo by replacing logo with another one but same name yet no success. I edited the css files still no success.

any guide?

SPA
Posted on 7/28/09 4:33 PM in reply to Jonas Yuan.
Hi Supa, thank you. I guess that you need to override the theme (control panel) in the ext, applying the mechanism. By the way, there is one more errata in page 377: "/ext/ext-impl/docroot/html/" should be "/ext/ext-web/docroot/html/". In addition, replace "/portal-impl/" with "/portal-web/", and "/ext-impl/" with "/ext-web/" in page 378.

Please correct it and deploy the Ext. You should be able to see the changes.
Posted on 7/28/09 5:47 PM in reply to supa - way.
Hi Jonas, Thank you very much for quick reply.It seems I didn't installed cms_services. How to install cms_services package?

Do we need to download war file from

http://liferay.cignex.com/palm_tree/book/cms_services.war

Help me out to proceed further
Posted on 7/29/09 7:48 AM in reply to Jonas Yuan.
Hi Nagendra, Thank you. You could find detailed instructions in page 222.
Posted on 7/29/09 7:57 AM in reply to Nagendra Kumar Busam.
According to instructions in page 222, i have downloaded cms_sercies.war & bookpub.sql. Do i need to put war file in deploy folder/do we need to upload the same from control panel. (I am a newbie my questions may seem silly )
Posted on 7/29/09 8:26 AM in reply to Jonas Yuan.
Hi Nagendra, Thank you. You did have good comments in page 222. It should add detailed information - how to install cms_sercies.war and bookpub.sql.

1) for services:
download cms_services.war at http://liferay.cignex.com/palm_tree/book/
copy cms_sercies.war to the folder $TOMCAT_HOME/webapps

2) for database:
download bookpub.sql at http://liferay.cignex.com/palm_tree/book/

mysql>create database bookpub;
mysql>grant all on bookpub.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
mysql>grant all on bookpub.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;

>mysql -u lportal -plportal -f bookpub <bookpub.sql

Hope that it helps.
Posted on 7/29/09 1:10 PM in reply to Nagendra Kumar Busam.
Hi Jonas,

I have painstakingly follow the guides for building the social office themes and portlets in chapter 10. I used the codes from the download because there is no so theme & portlet in the branches. However, after going throu the social office them is only applied to the default home page and all other pages i.e. My Profile, My Home, My Sites ALL reverts back to the usual liferay portal 2 column layout and classic themes.

Any guide to ensure that the so them is applied throughout the site?

your response will be appreciated to move ahead.

thanks

SPA
Posted on 7/29/09 10:30 AM in reply to Jonas Yuan.
Thanks, That was really helpful BUT one thing how am i going to use the same once deployed. I tried by adding portlet it was pointing to following URL

http://localhost:9080/web/guest/landingpage/-/waiapp/cms_services/

I tried to access video/swf files from journal article's edit page (FCKEditor), i was not able to search for any content

Any help in this regard is much appreciated
Posted on 7/29/09 10:50 AM in reply to Jonas Yuan.
Hi SPA, Thank you. It seems that you are talking about the usage - how to apply the so-theme on the site. You can apply the so-theme on the pages manually (Administration features); or you can modify the so-portlet (hooking functions) in order to apply the so-theme automatically (Development features). Hope that it helps.
Posted on 7/29/09 2:35 PM in reply to supa - way.
Hi Nagendra, the URL should like:

http://localhost:9080/cms_services/services?action=navigateAssetADS&assetType=IM­AGE&title=test

You can test search functions as
http://liferay.cignex.com:8080/cms_services/services?action=navigateAssetADS&a­ssetType=IMAGE&title=test

Then you should be able to see the UI as shown in page 207.
Posted on 7/29/09 11:18 AM in reply to Nagendra Kumar Busam.
Hi Jonas,

According to inputs given by you, i tried out following URLs
http://localhost:9080/cms_services/services?action=navigateAssetADS&assetTyp­e=IMAGE&title=test

http://localhost:9080/cms_services/services?action=navigateAss­etLINK&assetType=COMBO&title=test

http://localhost:9080/cms_services/services?act­ion=navigateAssetLINK&assetType=TEXT&title=test

http://localhost:9080/cms_service­s/services?action=download&uid=d5eab167-16cc-11dd-a1a2-3f408a4274b3

Everything is working fine. How can i use the cms_servies content in my liferay instance?

What are the steps need to make it work in my liferay instance?

I can say one thing about your book if any newbie/advanced programmer who went through your book thoroughly they can master most of the fetures liferay is supporting/providing.

Thanks,
- Nagendra Kumar
Posted on 7/30/09 8:09 AM in reply to Jonas Yuan.
Hi Jonas,

Would you mind to please give a specific example of how to use the hooking functions to apply the so-theme to all pages that will appear in the so-portlet?

The descriptions in pages 395, 396, 397 and 398 are ALL different from what you have in the code download and the descriptions of placement of folders to me clearly shows it won't lead to expected results as proven in my case.

However, I am able to login to the home page of the so-portlet but could only see "Welcome" tab on the far right and all the other tabs as described in the book say page 395 i.e Home, calendar, documents etc are all missing.

your guide will be appreciated!

SPA
Posted on 7/30/09 8:22 AM in reply to Jonas Yuan.
Hi Jonas,

The jsp page described on page 412 was introduced as 'For instance, we can customize the edit_event.jsp file as follows:' however, the content of this jsp is quite different from what is available in the code download.

Any guide that will ensue the so-portlet described in chapter 10 will work as described in the book will be appreciated.

thanks

SPA
Posted on 7/30/09 9:43 AM in reply to supa - way.
Hi Jonas - after deploying the chat portlet and themail portlet - my appserver temp folder keeps having a duplicate copies of the the two portlets with a serial number b4 the name.

I believe the tomcat logs below is what is causing this behavour.

INFO: Reloading this Context has started
18:21:14,908 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:21:14,911 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
18:21:18,286 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/4-mail-portlet/WEB-INF/classes/portlet.prope­rties
18:21:19,422 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:21:19 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:21:20,838 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:21:20,865 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/5-chat-portlet/WEB-INF/classes/service.prope­rties
18:21:27,077 INFO [DialectDetector:58] Determining dialect for MySQL 5


Any guide on how to stop this behaviour as its filling up my disk space quickly and also the chat seems not useful while it is unregistered.

thanks

SPA
Posted on 7/31/09 11:24 AM in reply to supa - way.
see the activities that keep repeating itself on my tomcat log console!

INFO: Reloading this Context has started
18:22:01,019 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:22:01,026 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/8-chat-portlet/WEB-INF/classes/service.prope­rties
18:22:06,056 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:22:06,059 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/8-chat-portlet/WEB-INF/classes/service.prope­rties
Loading file:/C:/liferay/tomcat-6.0.18/temp/8-chat-portlet/WEB-INF/classes/service.prope­rties
18:22:07,935 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/8-chat-portlet/WEB-INF/classes/portlet.prope­rties
18:22:08,867 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
31-Jul-2009 18:22:19 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:22:22,460 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:22:22,461 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:22:22,499 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
18:22:27,153 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/9-so-portlet/WEB-INF/classes/portal.properti­es
18:22:31,217 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:22:31,232 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:22:32,023 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
31-Jul-2009 18:22:32 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:22:32,179 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:22:32,182 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
18:22:35,679 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/10-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:22:36,636 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:22:36 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:22:37,553 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:22:37,556 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/11-chat-portlet/WEB-INF/classes/service.prop­erties
18:22:42,209 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:22:42,215 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/11-chat-portlet/WEB-INF/classes/service.prop­erties
Loading file:/C:/liferay/tomcat-6.0.18/temp/11-chat-portlet/WEB-INF/classes/service.prop­erties
18:22:44,135 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/11-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:22:44,991 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
31-Jul-2009 18:22:55 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:22:58,525 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:22:58,526 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:22:58,532 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
18:23:03,022 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/12-so-portlet/WEB-INF/classes/portal.propert­ies
18:23:07,273 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:23:07,286 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:23:08,308 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
18:23:08,441 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
31-Jul-2009 18:23:08 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:23:08,450 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
18:23:11,688 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/13-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:23:12,631 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:23:12 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:23:13,441 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:23:13,444 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/14-chat-portlet/WEB-INF/classes/service.prop­erties
18:23:18,144 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:23:18,146 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/14-chat-portlet/WEB-INF/classes/service.prop­erties
Loading file:/C:/liferay/tomcat-6.0.18/temp/14-chat-portlet/WEB-INF/classes/service.prop­erties
18:23:19,981 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/14-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:23:22,372 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
31-Jul-2009 18:23:32 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:23:36,136 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:23:36,137 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:23:36,143 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
18:23:40,064 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/15-so-portlet/WEB-INF/classes/portal.propert­ies
18:23:45,170 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:23:45,184 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:23:45,746 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
18:23:45,848 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:23:45,850 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
31-Jul-2009 18:23:45 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:23:48,972 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/16-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:23:49,739 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:23:49 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:23:50,537 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:23:50,539 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/17-chat-portlet/WEB-INF/classes/service.prop­erties
18:23:54,427 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:23:54,428 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/17-chat-portlet/WEB-INF/classes/service.prop­erties
Loading file:/C:/liferay/tomcat-6.0.18/temp/17-chat-portlet/WEB-INF/classes/service.prop­erties
18:23:56,134 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/17-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:23:56,872 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
31-Jul-2009 18:24:07 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:24:10,357 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:24:10,358 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:24:10,368 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
18:24:14,564 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/18-so-portlet/WEB-INF/classes/portal.propert­ies
18:24:19,255 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:24:19,268 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:24:19,899 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
18:24:20,035 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:24:20,037 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
31-Jul-2009 18:24:19 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:24:25,578 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/19-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:24:26,674 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:24:26 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:24:27,354 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:24:27,359 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/20-chat-portlet/WEB-INF/classes/service.prop­erties
18:24:31,678 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:24:31,680 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/20-chat-portlet/WEB-INF/classes/service.prop­erties
Loading file:/C:/liferay/tomcat-6.0.18/temp/20-chat-portlet/WEB-INF/classes/service.prop­erties
18:24:33,683 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/20-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:24:34,526 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
31-Jul-2009 18:24:44 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:24:47,891 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:24:47,892 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:24:47,897 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/20-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:24:50,723 INFO [PluginPackageUtil:1339] Checking for available updates
18:24:50,725 INFO [PluginPackageUtil:1383] Finished checking for available updates in 1 ms
18:24:52,888 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/21-so-portlet/WEB-INF/classes/portal.propert­ies
18:24:56,853 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:24:56,877 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:24:57,541 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
31-Jul-2009 18:24:57 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:24:57,665 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:24:57,667 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
18:25:00,662 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/22-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:25:01,499 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:25:01 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:25:02,243 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:25:02,245 ERROR [PollerServlet:305] Poller processor not found for portlet 1_WAR_chatportlet
18:25:02,246 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
18:25:04,273 ERROR [PollerServlet:305] Poller processor not found for portlet 1_WAR_chatportlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/23-chat-portlet/WEB-INF/classes/service.prop­erties
18:25:06,610 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:25:06,611 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/23-chat-portlet/WEB-INF/classes/service.prop­erties
18:25:07,310 ERROR [PollerServlet:305] Poller processor not found for portlet 1_WAR_chatportlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/23-chat-portlet/WEB-INF/classes/service.prop­erties
18:25:08,870 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/23-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:25:09,654 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
Loading file:/C:/liferay/tomcat-6.0.18/temp/23-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:25:15,873 INFO [PluginPackageUtil:1339] Checking for available updates
18:25:15,875 INFO [PluginPackageUtil:1383] Finished checking for available updates in 1 ms
Loading jar:file:/C:/liferay/tomcat-6.0.18/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/con­tent-types.properties
31-Jul-2009 18:25:20 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:25:23,054 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:25:23,055 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:25:23,060 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered
18:25:26,730 INFO [HookHotDeployListener:184] Registering hook for so-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/24-so-portlet/WEB-INF/classes/portal.propert­ies
18:25:31,912 INFO [HookHotDeployListener:379] Hook for so-portlet is available for use
18:25:31,925 INFO [PortletHotDeployListener:221] Registering portlets for so-portlet
18:25:32,519 INFO [PortletHotDeployListener:345] 4 portlets for so-portlet are available for use
18:25:32,643 INFO [PortletHotDeployListener:375] Unregistering portlets for mail-portlet
18:25:32,645 INFO [PortletHotDeployListener:406] 1 portlet for mail-portlet was unregistered
31-Jul-2009 18:25:32 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:25:35,710 INFO [PortletHotDeployListener:221] Registering portlets for mail-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/25-mail-portlet/WEB-INF/classes/portlet.prop­erties
18:25:36,456 INFO [PortletHotDeployListener:340] 1 portlet for mail-portlet is available for use
31-Jul-2009 18:25:36 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:25:37,219 INFO [PortletHotDeployListener:375] Unregistering portlets for chat-portlet
18:25:37,222 INFO [PortletHotDeployListener:406] 1 portlet for chat-portlet was unregistered
Loading file:/C:/liferay/tomcat-6.0.18/temp/26-chat-portlet/WEB-INF/classes/service.prop­erties
18:25:42,481 INFO [DialectDetector:58] Determining dialect for MySQL 5
18:25:42,483 INFO [DialectDetector:91] Using dialect org.hibernate.dialect.MySQLDialect
Loading file:/C:/liferay/tomcat-6.0.18/temp/26-chat-portlet/WEB-INF/classes/service.prop­erties
Loading file:/C:/liferay/tomcat-6.0.18/temp/26-chat-portlet/WEB-INF/classes/service.prop­erties
18:25:44,439 INFO [PortletHotDeployListener:221] Registering portlets for chat-portlet
Loading file:/C:/liferay/tomcat-6.0.18/temp/26-chat-portlet/WEB-INF/classes/portlet.prop­erties
18:25:45,257 INFO [PortletHotDeployListener:340] 1 portlet for chat-portlet is available for use
18:25:50,436 INFO [PluginPackageUtil:1339] Checking for available updates
18:25:50,437 INFO [PluginPackageUtil:1383] Finished checking for available updates in 0 ms
31-Jul-2009 18:25:55 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
18:25:58,698 INFO [HookHotDeployListener:442] Hook for so-portlet was unregistered
18:25:58,699 INFO [PortletHotDeployListener:375] Unregistering portlets for so-portlet
18:25:58,705 INFO [PortletHotDeployListener:411] 4 portlets for so-portlet was unregistered

How can I stop this plz?
Posted on 7/31/09 11:38 AM in reply to supa - way.
Hi Nagendra, Thank you. You are ready to use the section "Customizing the File Browser Connector with RESTful services". Please walk through the pages 195 -205. You should be able to search links and images via FCKEditor in web content, and have UI similar to the UI in page 191. Thank you again.
Posted on 7/31/09 1:21 PM in reply to Nagendra Kumar Busam.
Hi SPA, thank you. You can clean up Tomcat and restart Liferay portal. Supposed that you use 5.2.x (The version 5.3 is under development.)

1) shutdown Liferay portal
2) remove all in $CATALINA_HOME/temp; and remove all in $CATALINA_HOME/work; remove all in $CATALINA_HOME/conf/Catalina/localhost (for 5.3);
3) Restart Liferay portal

Hope that it helps
Posted on 7/31/09 1:30 PM in reply to supa - way.
Hi Jonas,

Thanks and I have done all these. I am now using 5.2 and perhaps what I mean is to stop the process of creating repeated folders in my temp folder.

However, I noticed that after deploying the so-portlet and the admin logged in or any user created by the admin the only portlet that get displayed for any user logging into the so-portlet is the 'welcome' page that only allow you to login, create account, do forgot password and when login is successful the other portlets (Home, Calendar, documents etc) described in page 392 or 395 does not show at all.

Kindly guide on how the admin can add all these other portlets to the logged in page of any user.

SPA
Posted on 7/31/09 4:12 PM in reply to Jonas Yuan.
Hi Jonas, Thank you very much for the reply.

I have gone through the mentioned pages twice - BUT of now use (to make it work)

I was not able to search anything, what might be the issue please let me know? Eagerly looking for this feature to work

These files are missing (i hope these won't make any difference)
<link href="/themeStreet/css/main.css" rel="stylesheet"/> - page no#196 - main.css mentioned in frmactualfolder.html
<link href="alternatives.css" type="text/css" rel="stylesheet" /> - page no#197 - alternatives.css mentioned in frmresourceslist.html
Posted on 8/3/09 6:18 AM in reply to Jonas Yuan.
Hi Nagendra, thanks. Do you make the section "Configuring a File Browser Connector with
Liferay portal services" working? Hopefully, you got.

Then you can walk through the section "Customizing the File Browser Connector with
RESTful services", where you should be able to search images and links. You can find the REST services in the page 202:

var searchADSPath = "cms_services/services?action
=navigateAssetADS&";
var searchLINKPath = "cms_services/services?action
=navigateAssetLINK&";

I guess that you mentioned main.css in the page 184 - th section "Adding templates and styles in FCKeditor";

In page 197 "alternatives.css" is an erratum. It should be deleted. I will add this in the book website. Thank you.
Posted on 8/3/09 11:09 AM in reply to Nagendra Kumar Busam.
Hi SPA, Thank you! You can find details in LayoutSetListener.java, where you can add your custom code. (You may get all code including LayoutSetListener.java from downloading website.) Hope that it helps.
Posted on 8/3/09 11:21 AM in reply to supa - way.
Hi SPA, thank you. You did find another erratum in page 412. The content of this jsp IS quite different from what is available in the code download. let me check the details and post corrections.
Posted on 8/3/09 11:54 AM in reply to supa - way.
Hi Jonas,
Thank you very much for your reply.

In page no# 183 we have statement like below

Locate the JSP file FCKeditor.jsp in the folder /ext/ext-web/docroot/html/js/editor/FCKeditor and open it.

I think filename should be fckconfig.jsp

In page 186 we have a stament, Create a CSS style file global_style_headings.css in the folder
book-street-theme/docroot/_diffs/css and open it. I didn't find this kind of path

I am using Ext environment for development, does above kind of path comes in Plugins SDK development if so please do help me to make mentioned code in chapter#6 working
Posted on 8/3/09 11:20 PM in reply to Jonas Yuan.
Hi Nagendra, thank you. You are right that in page 183 "FCKeditor.jsp" should be "fckconfig.jsp"; "/ext/ext-web/docroot/html/js/editor/FCKeditor" should be "/ext/ext-web/docroot/html/js/editor/fckeditor".

In page 186, it mentioned the theme book-street-theme, but the code is available only in the chapter 9. It should add code about book-street-theme in chapter 6 too.
Posted on 8/4/09 10:59 AM in reply to Nagendra Kumar Busam.
Hi SPA, Thank you. There is a bug (the process of creating repeated folders in temp folder). This bug was fixed in official released versions (e.g., 5.2.3, 5.2.4). You may meet this issue again if you were using branch version or trunk version.

For default pages of so-portlet, you may check LayoutSetListener.java (from downloading code), where it adds layouts: Home, Calendar, Documents, Forums, Blogs, Wiki, Members, etc. Hope that it helps.
Posted on 8/4/09 11:41 AM in reply to supa - way.
Hi Jonas,

I downloaded the liferay source code using svn from the branches and checked out the 5.2.x but while trying to build I got this error:

\LiferayPortal\portal-kernel\src\com\liferay\po
: reference to addAll is ambiguous, both method
tends E>) in java.util.Collection<capture#810 o
va.util.Collection<? extends E>) in java.util.L
ch
copy.addAll(master);
^
input files use or override a deprecated API.
pile with -Xlint:deprecation for details.
input files use unchecked or unsafe operations.
pile with -Xlint:unchecked for details.

Any guide will be appreciated.

thanks

SPA
Posted on 8/4/09 12:33 PM in reply to Nagendra Kumar Busam.
Hi SPA, thank you. It would be better to use official released version such as 5.2.3 (portal source code). Do not use branch version or trunk version, since they are unstable at moment.
Posted on 8/4/09 1:59 PM in reply to supa - way.
Hi Jonas,

many thanks - I was able to build a fresh ext environment by checking out the 5.2.3 source using subversion.

thanks

SPA
Posted on 8/4/09 2:45 PM in reply to Jonas Yuan.
Hi Jonas,

I am beginning to think I have a major version conflict that is really getting on my way and not allowing me to make any meaningful progress for days.

Now I have succeeded in building ext with portal version 5.2.3 from tags in subversion and liferay seems to be OK when I deployed that. However, when I deployed the mail-portlet, chat-portlet, so-portlet and the so-theme as described things does not work at all.

Please are you able to tell me the exact source of so-portlet, so-theme, mail-portlet & chat-portlet that are compatible with 5.2.3?

Apprently, if you download the bundled social office from liferay that seems OK but I need to be able to build from source.

I'll appreciate your guidance to get building social office from sources OK!

thanks

SPA
Posted on 8/4/09 6:20 PM in reply to supa - way.
Hi SPA, It is really a good news that you have passed most of chapters. For the portlets: chat-portlet, mail-portlet, so-portlet, it would be better to use the downloading code first. Then you can customize / modify these portlets. The above portlets in SVN are either branch version or trunk version. Both versions are unstable at moment.
Posted on 8/5/09 6:40 AM in reply to supa - way.
Hi Jonas - many thanks. Please are you able to post the link to the download here as I have searched for it without success. Thanks - SPA
Posted on 8/5/09 7:43 AM in reply to Jonas Yuan.
Hi SPA, Thanks. The downloading code is available at

http://liferay.cignex.com/palm_tree/book/4701_Code.zip

The same URL link has been updated on "Code Download".

By the way, the chat and mail portlets are not included in downloading code. You may get these portlets from official released version.
Posted on 8/5/09 9:45 AM in reply to supa - way.
Hi Jonas,

I bought the book, it's really good and not with no trivials contents.

On page 80 you wrote struts-config.xm instead struts-config.xml. I thought I can update the Errata Wiki page directly but I prefered you agreement.

Bye thanks,
Denis.
Posted on 8/7/09 1:11 AM.
Hi Denis, Thank you. Yes, in page 80, "struts-config.xm" should be "struts-config.xml". I updated the same in the Errata Wiki page.
Posted on 8/7/09 5:55 AM in reply to Denis Signoretto.
Hi Jonas,

thanks for all your previous responses. On page 309, the UserServiceUtil.updateReminderQuery(user.getUserId(), question, answer); is throwing PrincipalException as pasted below:

21:27:03,489 ERROR [jsp:165] com.liferay.portal.security.auth.PrincipalException
at com.liferay.portal.service.permission.UserPermissionImpl.check(UserPermissionImp­l.java:48)
at com.liferay.portal.service.permission.UserPermissionUtil.check(UserPermissionUti­l.java:40)
at com.liferay.portal.service.impl.UserServiceImpl.updateReminderQuery(UserServiceI­mpl.java:539)
at com.liferay.portal.service.UserServiceUtil.updateReminderQuery(UserServiceUtil.j­ava:323)
at com.liferay.portlet.login.action.CreateAccountAction.addUser(CreateAccountAction­.java:248)
at com.liferay.portlet.login.action.CreateAccountAction.processAction(CreateAccount­Action.java:95)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso­r.java:180)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter­ChainImpl.java:98)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j­ava:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664)­
at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:359­)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:6­04)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:428)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.­java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.­java:157)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)


any guide would be appreciated.

thanks

SPA
Posted on 8/10/09 2:54 PM in reply to Jonas Yuan.
Hi SPA, Thank you. I am not sure about the issue you met, since I can not reproduce it. Can you please narrow the issue: UserServiceUtil.updateReminderQuery(user.getUserId(), question, answer). The user "user" should have permissions to update "Reminder Query".

"throwing PrincipalException" means that you do not have proper permissions.

Maybe, there is an erratum related to item 5). It would be nice that you could confirm this. Thanks.
Posted on 8/11/09 7:08 AM in reply to supa - way.
Chapter7#Customizing CMS and WCM - i was going through this chapter, In page#242 there was a statement like below

GroupLocalServiceUtil.getGroup(groupId);

What is the exact use of this statement i didn't get. It was not assigned return value to any variable. It was throwing exceptions it seems (UnCaughtException kind of)

Please do clarify me. Thanks in advance
Posted on 8/14/09 9:57 AM.
Hi Nagendra, Thank you. You are right that the line "GroupLocalServiceUtil.getGroup(groupId);" has no usage. It should be removed. I will put the same in the book wiki page "errata".
Posted on 8/14/09 5:44 PM in reply to Nagendra Kumar Busam.
Hi Jonas, Thank you very much for clarification
Posted on 8/18/09 5:59 AM in reply to Jonas Yuan.
Hi, your book is really good, specially explaining step by step how liferay works

I got this problem with the strut portlet from chapter 4, it throws this exception, which results in my portlet saying it is not available:

javax.portlet.UnavailableException: com.ext.portlet.bookreports.BookReportsPortlet

I wrote examples exactly as they are in the book and after failing I used the source code, placed those files there and still I got the same result

Something else i got a doubt is that after modifying the Language-ext.properties with

javax.portlet.title.jsp_portlet=JSP Portlet

the portlet still shows as javax.portlet.title.jsp_portlet, why?, thank you for your help
Posted on 10/15/09 4:09 PM.
Hi Pablo, Thank you. It seems that the code did not get deployed properly. Can you check $PORTAL_ROOT_HOME/WEB_INF/lib/ext-impl.jar? Both com.ext.portlet.bookreports.BookReportsPortlet and Language-ext.properties should be included in this jar.

At the same time, you should have javax.portlet.title.jsp_portlet=JSP Portlet in Language-ext.properties of the JAR file ext-impl.jar.

Please let me know your findings. Thanks, Jonas
Posted on 10/16/09 5:23 AM in reply to Pablo M Mino.
I apologize for this delayed answer, I was working on themes and avoiding the problem for a while

I checked the jar and both files are inside the jar, and the language-ext.properties does contain that entry
Posted on 10/28/09 3:43 PM in reply to Jonas Yuan.
sorry for the delay, yes, I checked the jar and both files are there and languages-ext got that entry

Is there a chance that my whole ext enviroment is wrong?
Posted on 10/28/09 4:02 PM in reply to Jonas Yuan.
My apologies for the double post, my profile had a non updated version of the blog, found the problem, well I think so...

I checked the error from my portlet again and found something about referring to a mismatch on the number of portlets

I dropped my lportal scheme, made a new one, and voila

I really dont know how I caused the problem, Plugins SDK maybe, or me copy/pasting the chat portlet many times, but letting ext build the database again helped, thanks emoticon
Posted on 10/29/09 4:20 PM in reply to Jonas Yuan.
Hi Pablo, thank you. Do you get the portlet working? Hope that you got it ... If possible, it would be nice that you could share your experience. Thanks. Jonas
Posted on 11/3/09 1:33 PM in reply to Pablo M Mino.
I met the same problem with Pablo. To make it right just run Ant: clean and deploy in ext.
Posted on 11/27/09 10:33 AM in reply to Jonas Yuan.
Hi Jonas,

I follow ext Community example in Chapter 5. Everything works fine. The only problem is: GroupId in ExtGroup is always 0 whenever i create a community so i cannot get the keyword field displayed.

Could you show me where am i wrong?
Posted on 11/27/09 10:40 AM.
Hi Binh, thanks. You may refer to download-code, where you could get entire code..

http://www.packtpub.com/liferay-portal-5-2-systems-development/book
Posted on 11/28/09 7:31 AM in reply to Binh Do.
Thank you, Binh.
Posted on 11/28/09 7:32 AM in reply to Binh Do.
Jonas,

Bought the eBook, working through it (Chap 3, at present). Just did a clean, deploy on Ext & started Tomcat (p77). Seems I got the "No bean named 'com.liferay.portal.service.persistence.ResourcePersistence.impl' is defined" ERROR you logged in LPS-6053.

With this in mind, just wondering if you knew which is the best latest revision/build we should be working on with your book's examples.

Cheers, and thanks again for a great book
Posted on 11/29/09 12:50 PM.
Thanks Jonas,
I replaced my ExtEditGroupAction.java with yours and I worked.
Posted on 11/29/09 5:14 PM in reply to Jonas Yuan.
Hi Mathew, thanks. It is better for you to use 5.2.x both CE and EE. Currently the the trunk 5.3.x is unstable.
Posted on 11/30/09 9:47 AM in reply to Matthew Dickson.
Thank you , Binh. Nice to know that it is working fine for you.
Posted on 12/3/09 1:09 PM in reply to Binh Do.
I was working the advanced portlet example and I get the following error:
22:33:40,931 ERROR [jsp:165] com.liferay.portal.ResourceActionsException: There are no actions associated with the resource com.ext.portlet.bookreports.model.BookReportsEntry

It looks like I did everything according the examples. I also noticed that some book adds I did are in the database now even though the gui gives the "Reports for Books is temporarily unavailable" message when I try to add.

Any ideas on what might be causing this?
Posted on 12/6/09 2:36 PM.
The view all books link will show the newly added books after getting the error. The full stack trace is.

10:10:03,851 ERROR [jsp:165] com.liferay.portal.ResourceActionsException: There are no actions associated with the resource com.ext.portlet.bookreports.model.BookReportsEntry
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.validate(ResourceLocalS­erviceImpl.java:871)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addModelResources(Resou­rceLocalServiceImpl.java:82)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addModelResources(Resou­rceLocalServiceImpl.java:67)
at com.liferay.portal.service.ResourceLocalServiceUtil.addModelResources(ResourceLo­calServiceUtil.java:117)
at com.ext.portlet.bookreports.action.BookLocalServiceUtil.addEntryResources(BookLo­calServiceUtil.java:61)
at com.ext.portlet.bookreports.action.BookLocalServiceUtil.addBook(BookLocalService­Util.java:56)
at com.ext.portlet.bookreports.action.AddBookAction.processAction(AddBookAction.jav­a:42)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso­r.java:180)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter­ChainImpl.java:98)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j­ava:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664)­
at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:359­)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:6­04)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:428)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.­java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.­java:157)

22:19:14,673 ERROR [jsp:165] com.liferay.portal.ResourceActionsException: There are no actions associated with the resource com.ext.portlet.bookreports.model.BookReportsEntry
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.validate(ResourceLocalS­erviceImpl.java:871)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addModelResources(Resou­rceLocalServiceImpl.java:82)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addModelResources(Resou­rceLocalServiceImpl.java:67)
at com.liferay.portal.service.ResourceLocalServiceUtil.addModelResources(ResourceLo­calServiceUtil.java:117)
at com.ext.portlet.bookreports.action.BookLocalServiceUtil.addEntryResources(BookLo­calServiceUtil.java:61)
at com.ext.portlet.bookreports.action.BookLocalServiceUtil.addBook(BookLocalService­Util.java:56)
at com.ext.portlet.bookreports.action.AddBookAction.processAction(AddBookAction.jav­a:42)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso­r.java:180)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter­ChainImpl.java:98)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j­ava:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664)­
at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:359­)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:6­04)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:428)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.­java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.­java:157)
Posted on 12/6/09 2:38 PM in reply to John Joseph Ryan.
Hi John, thanks. It seems actions are missing. You may refer to downloaded code. The downloading code is available at
http://liferay.cignex.com/palm_tree/book/4701_Code.zip
The same URL link has been updated on "Code Download".
Hope that downloaded code helps.
Posted on 12/8/09 12:22 PM in reply to John Joseph Ryan.
Hi John, It seems that action names did not get referred properly in portlet configuration. Please check the source code, and verify them with downloaded code.

You would get it working ASAP. :-)
Posted on 12/8/09 12:26 PM in reply to John Joseph Ryan.
Hello Jonas,
Thank you for writing a practical book on Liferay. I'm finally making sense of how to customize Liferay. I have 2 questions about Chapter 7, page 232 and 233 - while customizing the Web Content Display portlet :

On page 232, why is there an extra <supports> element for application/vnd.wap..?
On page 233, how did you figure out that the <configuration-action-class> should be com.portlet.journalcontent.action.ConfigurationActionImpl?

Thanks!
Nischala
Posted on 1/6/10 8:06 AM.
Hi Nischala, thank you.

Supports indicates the portlet modes a portlet supports for a specific content type. All portlets must support the view mode. The following lines should be removed.

<supports>
<mime-type>application/vnd.wap.xhtml+xml</mime-type>
</supports­>

I will update the same at the book Wiki page: http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Errata+for+the+Lifer­ay+Portal+5.2+Systems+Development

By default, <configuration-action-class> should be com.portlet.journalcontent.action.ConfigurationActionImpl for the portlet Web Content Display. But you should have your own implementation class if you like.
Posted on 1/6/10 2:36 PM in reply to Nischala Kale.
Jonas,
Thank you very much for your response.

My second question was how can one find out what configuration-action-class is being used by a Portlet provided by Liferay (in this case, the Web Content Display). I searched through Liferay source, but did not find a 'link' from Web Content Display to the action-class. I'd like to know this just in case I have to extend a different out-of-the-box Portlet.

Thanks
Posted on 1/6/10 5:36 PM in reply to Jonas Yuan.
Hi Nischala, thank you. You did find one more errata ... Just updated the same in the Book errata page.

By the way, the downloading code is correct like:
<configuration-action-class>com.liferay.portlet.journalcontent.action.Confi­gurationActionImpl</configuration-action-class>
Posted on 1/7/10 4:00 PM in reply to Nischala Kale.
Hello Jonas,
After making the changes for customizing the FCKEditor for inserting flash files into web content, and running deploy-fast, I'm getting a "java.lang.ClassNotFoundException: com.liferay.portal.editor.fckeditor.receiver.impl.FlashCommandReceiver".

I can't find the class anywhere.

Thanks
Nischala
Posted on 1/7/10 9:12 PM.
Hi Nischala, Thanks. Which version are you using now? 5.2.3? CE or EE?
Posted on 1/11/10 8:49 AM in reply to Nischala Kale.
I'm using 5.2.3 CE.
Posted on 1/11/10 2:14 PM in reply to Jonas Yuan.
Thanks Jonas. I've looked in the 5.3 code base too, but couldn't find it.

My search for the missing file has led me to this page, http://translate.google.com/translate?hl=en&sl=zh-CN&tl=en&u=http%3A%2F%2Fwww.bw­csc.net%2F%3Fq%3Dnode%2F369
but it seems to be missing some referred classes.

Thanks again for your responses.
Nischala
Posted on 1/13/10 9:00 AM in reply to Nischala Kale.
Hi Nischala, it seems that you are trying to use URL flash in editor. This is not supported by default. But you can customize this as well as that of chapter 6 Customizing the WYSIWYG editor of the Book.
Posted on 1/13/10 9:25 AM in reply to Nischala Kale.
Hi Nischala, Flash URL in Editor of 5.3 is not supported by default, too. But you can customize this in 5.3, similar to that of chapter 6 Customizing the WYSIWYG editor of the Book. In addition, you may refer to the blogs http://www.liferay.com/web/jonas.yuan/blog/-/blogs/scayt-spell-check-as-you-type­-%E2%80%93-what-and-how
Posted on 1/13/10 9:29 AM in reply to Nischala Kale.
Thanks for the SCAYT blog post Jonas; it is very useful. I also went back through Chapter 6 and re-configured the file browser, so now I see the 'Asset search' dialog.
-The Asset Search dialog shows, but I get a "no results found" when I search based on title.
-I followed your conversation with Nagendra, and so I do have cms-service.war, executed SQL from bookpub.sql.
-When I try this URL from the browser, I get a Connector element with no files.
http://localhost:8085/cms_services/services?action=navigateAssetADS&assetType=IM­AGE&title=test

At the same time, there is an exception like below :
1333547 [http-8085-4] INFO org.apache.commons.httpclient.HttpMethodDirector - Retrying request
1334547 [http-8085-4] INFO org.apache.commons.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectE
ght when processing request: Connection refused: connect
1334547 [http-8085-4] INFO org.apache.commons.httpclient.HttpMethodDirector - Retrying request
Jan 14, 2010 5:07:36 PM com.noelios.restlet.ext.httpclient.HttpMethodCall sendRequest
WARNING: An error occurred during the communication with the remote HTTP server.
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:240) org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket­(DefaultProtocolSocke:80)
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket­(DefaultProtocolSocke
:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
org.ap­ache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter­.open(MultiThre
ctionManager.java:1361)
org.apache.commons.httpclient.HttpMethodDi­rector.executeWithRetry(HttpMethodDirector.java:387)
org.apache.commons.httpclien­t.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
com.n­oelios.restlet.ext.httpclient.HttpMethodCall.sendRequest(HttpMethodCall.java:183­)
com.noelios.restlet.http.HttpClientConverter.commit(HttpClientConverter.java:10­0)
at com.noelios.restlet.http.HttpClientHelper.handle(HttpClientHelper.java:79)
at org.restlet.Client.handle(Client.java:111)
at org.restlet.Uniform.handle(Uniform.java:97)
org.sesame.rest.util.RestConstant.adv­ancedSearchAssetURL(RestConstant.java:956)
org.sesame.rest.util.ContentServiceImp­l.advancedSearchAsset(ContentServiceImpl.java:270).

Once again, thanks for your patient responses.
-Nischala
Posted on 1/14/10 4:13 PM in reply to Jonas Yuan.
Hi Nischala, Thanks. It seems that the network had an issue yesterday. Try to test again, it should work now. Please let me know your test results.
Posted on 1/15/10 6:03 PM in reply to Nischala Kale.
According to your book Liferay Portal 5.2 Systems Development, I did a checkout from svn link: // svn.liferay.com / repos / public. We asked for a password. I seized guest without a password. Ok I downloaded the trunk of the project. But I do not see the file build-ext.xml and build-ext-dir.xml. Help me please!
Posted on 2/7/10 1:12 PM.
Hi Hermann, thanks. The current trunk is for 6.0 (not released yet). You should use the tag version at svn://svn.liferay.com/repos/public/portal/tags/5.2.3.

Hope that it helps.
Posted on 2/7/10 3:25 PM in reply to Hermann yao.
Thank you, it works. I walk on my project!!!
Posted on 2/8/10 5:04 AM in reply to Jonas Yuan.
Hello Jonas,

I have a problem with the Asset Publisher Portlet of chapter 7. I’m not able to show the large image of the main article. It seems that the method getData() in the init.jsp doesn’t work fine. This method passes for the argument "eInstanceId" an empty String to the JournalArticleImageLocalServiceUtil.getArticleImageId() method.

However, when I take a look at the database table “journalarticleimage”, I note that the field “elInstanceId” is informed. (It seems that Liferay generates for every field of the underlying structure a value for "elInstanceId" using a random password, when saving an article.)

The result is, that the getData() method in the init.jsp don’t retrieve the correct articleImageId. It rather inserts a new record with an empty “elInstanceId” in the database table :-(

Can you help me?

Thank you!
Posted on 3/3/10 4:04 AM.
Hi Dracus, thank you. Could you please give more details about your code?
Posted on 3/4/10 10:53 AM in reply to Dracus X.
Hello,

Ok, I will try to give more details.

I’m working with the source code of the released version 5.2.3 of Liferay and I followed the steps described in the section “Customizing the Asset Publisher portlet” of chapter 7 (page 246 - 255) to extend the Asset Publisher portlet.

Now I’m trying to test the code:

First I create some sample Web Content using the control panel of Liferay. For each Web Content I
- select the “POLL” structure (with the related “ARTICLE_CONTENT” template)
- fill out the different fields of the form (Name, Author Article Created, Author Job Title, Author, Large Image, Medium Image, Text)
- select “Press Release” as type
- select the “edi” tag to categorize the article
- click the “Save and Approve” button

When I take a look at Liferay’s source code and the underlying data base, I can see that the content of each article is stored in the “content” field of the “journalarticle” table as an XML entry, which has the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<root>

<dynamic-element instance-id="xbt8cuwU" name="large_image" type="image">
<dynamic-content id="13217">
/image/journal/article?img_id=13217&amp;t=1267779741841
</dynamic-content>
</dynamic-element>

</root>

I see that Liferay stores every field of the structure in a tag named “dynamic-element”. Further it generates a value for the instance-id attribute (in this example the value is “xbt8cuwU”). This is done in the _format() method of the edit_article.jsp in the /portal/portal-web/docroot/html/portlet/journal folder (line 1118).

Next Liferay creates for every image of the article a new record in the “journalarticleimage” table. In my example the values are:
articleImageId = 13217
articleId = 13214
eInstanceId = xbt8cuwU
eName = large_image

Finally the binary image is stored in the table “image”, relating the imageId with the field journalarticleimage.articleImageId.

Now I like to test the customized extension of the Asset Publisher Portlet. I expect to see one article in the main area of the portlet showing up the large image, and some related articles in the left column. But the large image doesn’t appear.

The following code of the abstract.jsp (in the folder ext-web/docroot/html/portlet/ext/asset_publisher/display) intends to show the large image for the first article:

if(assetIndex == 0){
sb.append("<div><a href=\""+viewURL+"\">");
sb.append("<img src=\"");
sb.append(getData("large_image", articleDisplay, languageId) + "\" /></div>");
sb.append("</a>");
}

The getData() method is defined in the init.jsp (in the folder ext-web/docroot/html/portlet/ext/asset_publisher folder) as

public String getData(String image, JournalArticleDisplay art, String languageId) throws Exception {
long imgId = JournalArticleImageLocalServiceUtil.getArticleImageId(art.getGroupId(), art.getArticleId(), art.getVersion(), "", image, "");
String imgURL = "/image/journal/article?img_id=" + imgId;
return imgURL;
};

This method calls at JournalArticleImageLocalServiceUtil.getArticleImageId() to retrieve the articleImageId from the “journalarticleimage” table. The fourth argument corresponds to the instance-id of the image element. Here the code is passing an empty string. This call ends up executing the following method getArticleImageId() of the class JournalArticleImageLocalServiceImpl in the com.liferay.portlet.journal.service.impl package:

public long getArticleImageId(
long groupId, String articleId, double version, String elInstanceId,
String elName, String languageId, boolean tempImage)
throws SystemException
{
JournalArticleImage articleImage =
journalArticleImagePersistence.fetchByG_A_V_E_E_L(
groupId, articleId, version, elInstanceId, elName, languageId);

if (articleImage == null) {
long articleImageId = counterLocalService.increment();

articleImage = journalArticleImagePersistence.create(
articleImageId);

articleImage.setGroupId(groupId);
articleImage.setArticleId(articleId);
articleImage.setVersion(version);
articleImage.setElInstanceId(elInstanceId);
articleImage.setElName(elName);
articleImage.setLanguageId(languageId);
articleImage.setTempImage(tempImage);

journalArticleImagePersistence.update(articleImage, false);
}

return articleImage.getArticleImageId();
}

The code tries to retrieve the articleImageId. In the example this method receives an empty string for the argument elInstanceId, but in the database the record is saved with the value eInstanceId =“xbt8cuwU”. So the method journalArticleImagePersistence.fetchByG_A_V_E_E_L() can’t find the correct record and returns NULL. Later the code inserts a new record and returns the wrong articleImageId.

The result is, that img tag in the abstract.jsp points to an image, that doesn’t exist and the portlet isn’t able to show the large image correctly.

I hope that helps.

Thank you!
Posted on 3/5/10 3:08 AM in reply to Jonas Yuan.
Hi Dracus, Thank you. Very good practice. Do you get issue fixed?

There is a default image for Web content (Journal article) as small image. You have some issue on this default image. You should use default API to retrieve the image ID like:

`smallImage`,
`smallImageId`,
`smallImageURL`

The book added more: medium size image and large size image, added in article template - that you can retrieve them by getData().

Hope that it helps. Please let me know if you have any questions,

Jonas
Posted on 3/7/10 8:40 AM in reply to Dracus X.
Let me know if anyone needs the PDF version of this book.
Posted on 3/19/10 12:57 PM in reply to Jonas Yuan.
I am using the 5.2.3 CE,but I still met the bug(the process of creating repeated folders in temp folder).

How to slove it?
Posted on 3/31/10 6:32 PM in reply to Jonas Yuan.
Hi Heypig, thanks.

For some reason, you may clean and restart the portal. Therefore, you may take the following lines into account:
• Run $TOMCAT_AS_DIR/bin/shutdown.sh/bat
• Remove all files and folders in $TOMCAT_AS_DIR/temp
• Remove all files and folders in $TOMCAT_AS_DIR/work
• Delete all files in $TOMCAT_AS_DIR/conf/Catalina/localhost, except ROOT.xml.
• Run $TOMCAT_AS_DIR/bin/startup.sh/bat

Abstracted from the book: Liferay Portal 6 Enterprise Intranets (coming out soon).
Posted on 4/1/10 5:19 PM in reply to heypig Chu.
Dracus,

Hello. I encountered the same problem with getData() returning a seemly random/incorrect ID value.

Did you end up finding the cause?
Posted on 5/17/10 2:25 PM in reply to Dracus X.
Jonas,

I have encountered a small bug when using the TOUT structure as outlined in Chapter 7. This structures uses a Multi-selection list to select the touts to display. It seems when creating an article (for example the 'Tout Test I') with this structure, the article will only save the multi-list selection the first time the article is 'Saved and Approved'. If you attempt to re-edit the article, any selections in the Multi-list will not be saved.

Just wondering if you, or anybody else has encountered this?

Matt
Posted on 5/17/10 2:33 PM.
Hi Matt, thanks. I did not encounter this kind of issue. You may disable "cachable" when editing your template. Hope that it helps.
Posted on 5/21/10 10:29 AM in reply to Matthew Dickson.
Jonas,

Your book is great. I'm following it to learn Liferay.

By the way, I have a question on page 148 about adding:

AddGroupLocalServiceUtil.deleteGroup(actoinRequest);
before
deleteGroup(act­ionRequest);

Do we, somehow for a production system, have to put those two statement in one transaction? (the same for the advanced Struts portlet in ch. 4).

Again, awesome book, help a lot for Liferay beginner, like me.

Tom
Posted on 5/24/10 6:20 AM in reply to Jonas Yuan.
Thanks, Tom.

There are at least two use cases in the page 148.

1) delete group if required

2) update group when in need.

In your real cases, you may need one of them; or both of them.

For production system, you would use 1) to delete group; or 2) to update group. You are not required to put these two statement in one transaction. But if in need (delete one and update another) you can put them together.

Hope that it helps.
Posted on 5/24/10 10:39 AM in reply to .
Jonas,

Thanks for help. Yes, there are 2 use cases. One is deletion and another is update. What I meant is that the statements to delete entry from Group_ and ExtGroup should be is one transaction. The same is for statements to update Group_ and ExtGroup to be one transaction.

Besides your 3 great books, which I brought 2 already. Could you point me to any materials that give full picture of Liferay architecture, database schema, and api/tag lib usage. Although it is "fun" "sometime" to peek into source code, it is very easy to get lost or lost focus for a large platform, like Liferay, with many layers, abstraction, and module, etc. Thanks in advance.

Tom
Posted on 5/24/10 9:22 PM in reply to Jonas Yuan.
Hi Jonas,

"delete entry from Group_ and ExtGroup should be is one transaction" it's a really interesting question where I'm involved as well. Can you help us, undertanding the best way approaching the problem?

Thanks,
Denis.
Posted on 5/25/10 12:26 AM in reply to .
Denis

That's only my suggestion for production system. If you really want them in one transaction. In brief, you create a another method, put the statements in the method, and annotate it transactional.

Of course, if Liferay could somehow allow us to auto-build a new single ORM object, utilities class, ..., etc., to work on. It will be even better! :-)

Tom
Posted on 5/25/10 1:12 AM in reply to Denis Signoretto.
Hi Tom, you may refer to the book - online document.

Liferay Portal Administrator's Guide, Third Edition

at

http://docs.liferay.com/portal/5.2/official/liferay-administration-guid­e.pdf
Posted on 5/26/10 10:46 AM in reply to .
Hi Denis, thanks. Group_ and ExtGroup are different database tables - this would be better approach to keep Liferay core AS IS.

Of course, you can put two transactions together if you want.

Hope that it helps.
Posted on 5/26/10 10:57 AM in reply to Denis Signoretto.
Hi, Jonas
thank you for your book and i`m training with it and I met some error in chapter 4. I deploy the jsp_portlet correctly but when i fast deploy it by changing view.jsp and reloaded page in my brower, jsp_portlet doesn`t change. I can`t understand.
could you tell me the solution.
thanks.
Posted on 6/9/10 10:20 AM in reply to Jonas Yuan.
Hi Le, thanks. Which Liferay portal version are you using? which kind of error did you meet? It would be nice that you could post error info here.
Posted on 6/10/10 3:36 PM in reply to le hung.
thanks for reply.
I deployed ext again and this error didn`t occur.
May be there were some errors in my setting.
i `m using version 5.2.3, and i`m sure I will ask you to support later. emoticon
thank again.
Posted on 6/11/10 2:27 AM in reply to Jonas X. Yuan.
Thank you, Le. It is very nice that it was working well for you. Let me know if you meet any issues.
Posted on 6/14/10 8:42 AM in reply to le hung.
Hi.
After learning about advanced struts portlet in chapter 4, I want to build a dictionary search portlet in portal for demo purpose.
Could you tell me some advice.
thanks
Posted on 6/14/10 11:09 PM in reply to Jonas X. Yuan.
Hi Le, thanks. The book especially chapter 4 will guide you to develop this portlet - a dictionary search portlet. You can follow the steps and make it happening.
Posted on 6/15/10 4:49 PM in reply to le hung.
Hi Jonas. I have developed my dictionary portlet. It have a database in a data file with name dict.xml. Searching on file is OK but I don`t know how to take this file to my serve and where it should be stored. For demo purpose, I don`t want to creat big database with mysql ... or convert my file. Could you tell me the solution or the configuration.
thank a lot.
Posted on 6/21/10 11:37 PM in reply to Jonas X. Yuan.
Hi, Le. Thanks. You can use database or file to hold data (dictionary). As you mentioned, you prefer to a data file ... Thus, you may take following steps
1) put dict.xml along with your code;
2) write code to index all data from dict.xml;
3) write code to search through indexing engine;

Hope that it helps.
Posted on 6/28/10 10:30 AM in reply to le hung.
Hi Jonas. Thank for your support.
I have finished my dictionary portlet. It runs normaly. This make me glad. In future, I will use database not file. I have learn much skill in this example.
thank again
Posted on 6/28/10 9:52 PM in reply to Jonas X. Yuan.
Hello Jonas
On the chapter 5, i can't seems to be able to edit or delete the communities. The action menu works, but when i click on either link it says:

Liferay: You do not have the roles required to access this portlet.
Tomcat:
The struts path communities does not belong to portlet extCommunities. Check the definition in liferay-portlet.xml

After searching through the code, i found out that the view.jsp include the community action :
// Action
row.addJSP("right", SearchEntry.DEFAULT_VALIGN, "/html/portlet/communities/community_action.jsp");

which isn't modified for the ext communities portlet. and this the action path isn't working.
Am i missing something or do i have to make a copy and edit this jsp directly in the ext project?

Thank you
Posted on 7/22/10 8:03 AM in reply to le hung.
Tried it and it work, off course all the other actions don't work, since they refer to the original communities portlet path.
Is there a way to make it work without having to copy everything?
If i add the path in struts config, i'm afraid the original portlet won't work then.
Although in this example we wouldn't be using the old communities portlet, so it might be the valid way to go?
Posted on 7/22/10 8:10 AM in reply to William B.
Thanks William. I had just come across this problem. Have you had any success with adding in to struts config or liferay-portlet-ext.xml?

BTW Thanks to Jonas - great book. Thanks to the LR guys - great system.

SC
Posted on 8/16/10 9:11 AM in reply to William B.
Hi William, do you get answers for your questions?

Good luck!
Posted on 8/18/10 3:54 PM in reply to William B.
I began to read this book.
My goal is to build a portal that can host a set of extranets.
Portlets should query the database and give to users the possibility to update it. Will be better if each user has its database to work on.
Inserted data should generate specific documents using openoffice conversion and they also should dispatched in a Document Library portlet.
The great thing could be a mirror interaction with Alfresco.

Do you have any useful suggestion to drive me in??
Thanks in advance.
Posted on 9/24/10 3:23 PM.
Hi Cristian, Thanks. I believe that Liferay portal (plus additional CMS like Alfresco) would be your best choice. You may have a deep look on Liferay portal, and you will be excited ...

Please let me know if you need any helps,
Posted on 9/24/10 10:26 PM in reply to Cristian Ronzio.
Hi Jonas.
I'm going to Ant build Liferay as described in chapter 3 of the book.
In build.xml I can't find the targets build-ext and build-ext-dir. Maybe the checked-out version includes a different build method for this step.
What should I do?

thanks
Posted on 9/25/10 10:55 AM in reply to Jonas X. Yuan.
Hi Cristian, Thanks.

In 5.2 or previous versions, there is ext environment. From 6.0, ext environment becomes ext plugin.

Refere to http://www.liferay.com/web/jonas.yuan/blog/-/blogs/hooks-and-plugin-ext-in-lifer­ay-portal-6

If you are currently using 5.2, then you will see ext environment. If you are using 6.0, you would see ext plugin with other plugins like portlets, themes, hooks etc. in Plugins SDK.

For Liferay portal 6, you may refer to the book:
Liferay Portal 6 Enterprise Intranets
http://www.amazon.com/Liferay-Portal-6-Enterprise-Intranets/dp/18495103­85/

or online official doc.

Hope that it helps,

Please let me know if you have any questions,

Thanks

Jonas
Posted on 9/25/10 11:50 AM in reply to cristian ronzio.
Hi Sean, sorry to come back to you so late. it seems that your post got missed. Do you get answers for your questions?
Posted on 9/25/10 11:52 AM in reply to Sean Condon.
Thanks Jonas. I will switch to Liferay Portal 6 Enterprise Intranets.
Posted on 9/25/10 12:02 PM in reply to Jonas X. Yuan.
Hi Jonas,
I've integrated fckeditor in liferay 5.2
i've done those step :
1) for services:
download cms_services.war at http://liferay.cignex.com/palm_tree/book/
copy cms_sercies.war to the folder $TOMCAT_HOME/webapps

2) for database:
download bookpub.sql at http://liferay.cignex.com/palm_tree/book/

mysql>create database bookpub;
mysql>grant all on bookpub.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
mysql>grant all on bookpub.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;

>mysql -u lportal -plportal -f bookpub <bookpub.sql
and I tested

http://localhost:8080/cms_services/services?action=navigateAssetADS&assetTyp%ADe­=IMAGE&title=test
I've got this result :
Aucune information de style ne semble associée à ce fichier XML. L'arbre du document est affiché ci-dessous.

-
<Connector>
<CurrentFolder name="type" guid="keyword" url="http://type"/>
<ParentFolder name="type" guid="type" url="http://type"/>
<Files>
</Files>
</Connector>

but with this test follow it work fine
http://localhost:8080/cms_services/services?action=navigateAss%ADetLINK&assetTyp­e=COMBO&title=test


However when i tested with search content of fckeditor :
the result : No results found
and this error :

13:54:22,390 WARN [ThemeLocalServiceImpl:129] No theme found for specified theme id . Returning the default theme.
0 [http-8080-6] INFO org.mortbay.log - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
21157 [http-8080-6] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Communication Error (1001)
43767 [http-8080-6] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Communication Error (1001)
1218479 [http-8080-6] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Internal Connector Error (1002)
1316184 [http-8080-6] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Internal Connector Error (1002)
6419598 [http-8080-6] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Internal Connector Error (1002)

and in the console of deburg firefox :
GET http://localhost:8080/cms_services/services?acti...tType=TEXT&startIndex=0&block­Size=50&title=test&
GET http://localhost:8080/cms_services/services?action=navigateAssetLINK&assetType=T­EXT&startIndex=0&blockSize=50&title=test&

500 Erreur Interne de Servlet
41.88s
fckxml.js (ligne 97)

Could you help me, thank you.
info : i'm beginning developper.
Posted on 2/25/11 8:03 AM in reply to Jonas Yuan.
Hi Koun, Thanks.

Are you able to view content?
http://localhost:8080/cms_services/services?action=navigateAssetADS&assetTyp%ADe­­=IMAGE&title=test

I wants to narrow down the issue.

Thanks
Posted on 2/28/11 6:41 PM in reply to koun neak.
Thank Jonas,
No i'm not able to view the content.
When I tested this link :
http://localhost:8080/cms_services/services?action=navigateAssetADS&assetTyp%ADe­­­=IMAGE&title=test
I got this result :

Aucune information de style ne semble associée à ce fichier XML. L'arbre du document est affiché ci-dessous.
<Connector>
<CurrentFolder name="type" guid="keyword" url="http://type"/>
<ParentFolder name="type" guid="type" url="http://type"/>
<Files>
</Files>
</Connector>

and an error in tomcat :

3437402 [http-8080-5] INFO org.sesame.rest.util.RestConstant - An unexpected status was returned: Communication Error (1001)
Posted on 3/1/11 1:27 AM in reply to Jonas Yuan.
Jonas,

I am just re-starting working through your book after a break. I initally got everything working on Ubuntu, but have now got everything up and running on a Mac.

A strange thing is happening with the 'liferay-display.xml' file. If I make the edits suggested with regard to adding <portlet id="jsp_portlet"/> it does not show up in the Applications list when running the portal and trying to add a new application.

In fact if I insert that text under another category, the entire category will not show up in the applications list. For example if I move to the 'Tools' category, the entire Tools category will not show up. But if I re-edit the xml file, removing the reference and re-deploy, it shows up.

Any ideas? I'm sure it is something very basic, but I am missing it.

Thanks

Matt
Posted on 5/2/11 4:27 AM.
Hi Matthew, do you get the issue fixed? which version are you using?
Posted on 5/13/11 2:18 PM in reply to Matthew Dickson.
Good day all! I am a recruiter with Accenture, and I am currently looking for Web Portal Developers and Managers of Web Portal teams. There is 80% travel to clients Mon-Thurs. Contact me immediately for consideration! Traci.Morgan@accenture.com
Posted on 9/19/11 2:51 PM.