Kombinált nézet Egyszerű nézet Fa-nézet
Szálak [ Előző | Következő ]
Todd Peterson
Liferay 6.0 - Getting Started Issues
2010. október 27. 7:35
Válasz

Todd Peterson

Rangsorolás: Junior Member

Hozzászólások: 29

Csatlakozás dátuma: 2010. szeptember 27.

Legújabb hozzászólások

Hi,

I recently started evaluation Liferay, as a potential solution for my company's enterprise portal strategy... In trying to get my arms around the capabilities, ease-of-use, integration understanding, etc., I decided to walk through the "Getting Started" guide (Liferay 6.0), and see if I could learn many of the capabilities by example. Most of the examples seemed to work fine for me, until I got into the "Services" extension capabilities (http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/service-builder)

After editing my services.xml file and attempting to perform the "ant build-service" task, I am getting errors that I can't seem to determine the root cause for:

47:
Buildfile: C:\Program Files (x86)\liferay-portal-6.0.5\sdk\portlets\build.xml
build-service:
build-service:
Copying 1 file to C:\Program Files (x86)\liferay-portal-6.0.5\sdk\portlets\my-greeting-portlet\docroot\WEB-INF\classes
Loading jar:file:/C:/Program%20Files%20(x86)/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Program%20Files%20(x86)/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading jar:file:/C:/Program%20Files%20(x86)/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
17:16:03,810 INFO [PortalImpl:277] Global lib directory /C:/Program Files (x86)/liferay-portal-6.0.5/tomcat-6.0.26/lib/ext/
17:16:03,825 INFO [PortalImpl:297] Portal lib directory /C:/Program Files (x86)/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/
Building Book
Writing docroot\WEB-INF\service\com\sample\portlet\library\model\BookWrapper.java
compile-java:
Compiling 18 source files to C:\Program Files (x86)\liferay-portal-6.0.5\sdk\portlets\my-greeting-portlet\docroot\WEB-INF\service-classes
C:/Program Files (x86)/liferay-portal-6.0.5/sdk/portlets/my-greeting-portlet/docroot/WEB-INF/service/com/sample/portlet/library/service/BookLocalService.java:207: cannot find symbol
symbol : class Book
location: interface com.sample.portlet.library.service.BookLocalService
public Book addBook(long userId, java.lang.String title)
^
C:/Program Files (x86)/liferay-portal-6.0.5/sdk/portlets/my-greeting-portlet/docroot/WEB-INF/service/com/sample/portlet/library/service/BookLocalServiceClp.java:388: cannot find symbol
symbol : class Book
location: class com.sample.portlet.library.service.BookLocalServiceClp
public Book addBook(long userId, java.lang.String title)
^
C:/Program Files (x86)/liferay-portal-6.0.5/sdk/portlets/my-greeting-portlet/docroot/WEB-INF/service/com/sample/portlet/library/service/BookLocalServiceUtil.java:226: cannot find symbol
symbol : class Book
location: class com.sample.portlet.library.service.BookLocalServiceUtil
public static Book addBook(long userId, java.lang.String title)
^
C:/Program Files (x86)/liferay-portal-6.0.5/sdk/portlets/my-greeting-portlet/docroot/WEB-INF/service/com/sample/portlet/library/service/BookLocalServiceWrapper.java:219: cannot find symbol
symbol : class Book
location: class com.sample.portlet.library.service.BookLocalServiceWrapper
public Book addBook(long userId, java.lang.String title)
^
C:/Program Files (x86)/liferay-portal-6.0.5/sdk/portlets/my-greeting-portlet/docroot/WEB-INF/service/com/sample/portlet/library/service/BookLocalServiceClp.java:417: cannot find symbol
symbol : class Book
location: class com.sample.portlet.library.service.BookLocalServiceClp
return (Book)ClpSerializer.translateOutput(returnObj);
^
5 errors

BUILD FAILED
C:\Program Files (x86)\liferay-portal-6.0.5\sdk\build-common-plugins.xml:7: The following error occurred while executing this line:
C:\Program Files (x86)\liferay-portal-6.0.5\sdk\build-common-plugins.xml:23: The following error occurred while executing this line:
C:\Program Files (x86)\liferay-portal-6.0.5\sdk\build-common-plugin.xml:216: The following error occurred while executing this line:
C:\Program Files (x86)\liferay-portal-6.0.5\sdk\build-common.xml:90: Compile failed; see the compiler error output for details.

Total time: 13 seconds


Any ideas as to whie I might not be able to compile this?

Thanks so much!
Todd
James Falkner
RE: Liferay 6.0 - Getting Started Issues
2010. november 3. 13:13
Válasz

James Falkner

LIFERAY STAFF

Rangsorolás: Liferay Master

Hozzászólások: 978

Csatlakozás dátuma: 2010. szeptember 17.

Legújabb hozzászólások

Hey Todd - Tried to reproduce this issue but it seems to work for me on Windows Vista and Mac. I suspect somehow your portlet source code area is corrupt in some way that we're not detecting in ServiceBuilder.

Can you delete and re-create the my-greeting-portlet (or create a different temporary portlet) using the 'create' utility, and try again by just creating the sample service.xml under WEB-INF and running 'ant build-service'?
Todd Peterson
RE: Liferay 6.0 - Getting Started Issues
2010. november 10. 13:00
Válasz

Todd Peterson

Rangsorolás: Junior Member

Hozzászólások: 29

Csatlakozás dátuma: 2010. szeptember 27.

Legújabb hozzászólások

Hi James,

I tried starting from scratch, to no avail... :-(

I even went as far as to start from a brand new install of Liferay, as I wanted a clean enviornment to begin from. My critical item for learning now, is how to create Porlets that do "real-world" things, like talk to a database, and provide some form of user interface, so that those Portlets can be "consumed" from a remote Portal server. I'm thinking WSRP is the appropriate path for this...

Basically, I'm trying to get my head around how I would "portletize" existing applications/functionality, and ingest those capabilties in a common portal interface. It doesn't seem reasonable to me that every piece of functionality that might be desired in a portal would have to be deployed to that portal, rather made available as a WSRP producer. If I can achieve creating a "simple", but "real-world" producer, meaning it has a UI and queries/updates a database, I will be 99% of the way there!

I don't necessarily have to get this "my-greeting" portlet working, using Service Builder, but I do have to be able to achieve it through some means. Are there any other examples you could refer me to?

A side note (and perhaps useful to others struggling, and finding this thread): The only thing about my enviornment that might not be "pure", based on the bundled install, is the fact that I had to execute a patch, so that I could even add a portlet on my default portal page, at all... I would click on the "add", then "more...", only to get a "loading" window that would not go away. I was never presented with any portlets to add. My fix was found in the following thread: http://www.liferay.com/community/forums/-/message_boards/message/5589046?_19_redirect=%2fcommunity%2fforums%2f-%2fmessage_boards%2fsearch%3f_19_redirect%3d%252Fcommunity%252Fforums%252F-%252Fmessage_boards%252Fcategory%252F4470261%26_19_breadcrumbsCategoryId%3d4470261%26_19_searchCategoryId%3d4470261%26_19_keywords%3dGA3

Please let me know if you have any thoughts on developing a "real-world" yet simple WSRP Portlet Producer.

Thanks and best regards,
Todd
James Falkner
RE: Liferay 6.0 - Getting Started Issues
2010. november 10. 16:05
Válasz

James Falkner

LIFERAY STAFF

Rangsorolás: Liferay Master

Hozzászólások: 978

Csatlakozás dátuma: 2010. szeptember 17.

Legújabb hozzászólások

Hmm, if you started fresh then I suspect something related to your OS is causing problems. For example, some kind of permissions problem creating files in the destination directory. Have you tried disabling UAC (user access control)? I noticed you were working out of C:\Program Files (x86) which may be cause problems either with UAC or spaces in the name or something. Also, temporarily disable virus scanners or other items that might interfere with the operation of ServiceBuilder. I don't think that patch would have affected this issue, as it was at runtime, and in the UI. Perhaps run everything out of c:\foo (no spaces, no permission issues).

On your other topic around integration.. I would caution you against using WSRP right out of the gate. It has several issues with it that would make me not want to use it for any integrations - it is very resource intensive (eats bandwidth and memory), and requires a separate identity propogration, authentication and authorization infrastructure as these topics were not addressed in the spec. These are usually handled by other enterprise WS-* setups. The only time I'd use WSRP is if the product I was integrating was based on it and provided 80%-90% of the work needed to complete the integration, or your portal was heavily based on it (e.g. Oracle WebCenter).

Depending on the nature of the apps you wish to integrate, there are many other techniques for integration (e.g. IFrames, custom portlets, web proxies). If you can give me more information on the nature of the products you are integrating I could give you some additional guidance. I just completed a whitepaper on this topic in fact and would probably be a good read for you.

If you want to setup an example WSRP consumer and producer, you can check out Ruth's recent entry. This example uses pre-created portlets, so you could use the non-service-builder my-greeting portlet (the one you were able to get to work) along with WSRP producer and consumer.
Todd Peterson
RE: Liferay 6.0 - Getting Started Issues
2010. november 11. 7:49
Válasz

Todd Peterson

Rangsorolás: Junior Member

Hozzászólások: 29

Csatlakozás dátuma: 2010. szeptember 27.

Legújabb hozzászólások

James - Please forgive the length of this response! I want to provide you with as much information as possible to have you help me determine a sound architectural approach.

James Falkner:
On your other topic around integration.. I would caution you against using WSRP right out of the gate. It has several issues with it that would make me not want to use it for any integrations - it is very resource intensive (eats bandwidth and memory), and requires a separate identity propogration, authentication and authorization infrastructure as these topics were not addressed in the spec. These are usually handled by other enterprise WS-* setups. The only time I'd use WSRP is if the product I was integrating was based on it and provided 80%-90% of the work needed to complete the integration, or your portal was heavily based on it (e.g. Oracle WebCenter).


Unfortunately, I've come to the same conclusion... I was reading the following thread, which members of the Liferay staff had responded: http://www.theserverside.com/news/thread.tss?thread_id=45109

This approach, at a glance, really appeared to be the direction that made the most sense, based on what I believe our requirements to be. I'm disappointed that it appears to be so problematic.

James Falkner:
Depending on the nature of the apps you wish to integrate, there are many other techniques for integration (e.g. IFrames, custom portlets, web proxies). If you can give me more information on the nature of the products you are integrating I could give you some additional guidance. I just completed a whitepaper on this topic in fact and would probably be a good read for you.


I am very interested in reading this whitepaper! Can you provide me a link or email it to me?

Our architecture basically consists of individually written and owned applications, which happen to be presented to our clients as a single portal. This is our own home-grown portal, which is using the term "portal" very loosely!

Our portal is basically an elaborate menuing system, with integration techniques to make it appear as though these individual applications are a part of the portal. All of the user administration is managed at the portal level, and access to the applications are granted at the portal level as well.

For instance... We have:
- A reporting application, which accesses it's own database
- A document viewing application, which accesses it's own and separate database
- A job management application, which also accesses it's own and separate database

These three applications have been developed using some integration techniques, which enable them to be presented in our common portal interface as follows:
- Each application calls a Portal JavaScript method to include a common header/footer/CSS
- Each application calls a Portal Web Service to ensure a user is authenticated
- Each application implements a method to keep a portal session alive

As users are added to the Portal, they are granted access to one or more of the applications described above. When the user logs in, they are presented with a menu of applications and cabilities they are allowed to access (assume this is through https://mycompanyportal.com). As the select applications/capabilities, the users browser is redirected (via HTTP POST) to the application they have selected (assume http://applicationA.com). The Portal passes some information to the application that it will in turn use to validate the user and authorize to it's own application functions. The first thing the application does is call a Portal Web Service to ensure that the user is a valid user and in fact has an active Portal session. The application also calls some Portal Javascript methods to:
- Get a Header and Footer
- Include it's own header menu items
- Include some navigational breadcrumbs
- Keep the Portal session alive

To the end-user, it appears as though they are in a single application, although the URL would suggest differently. Header menu items, such as "Home" would navigate you back and forth between the Portal and the application, seamlessly.

Hopefully, this give you a good idea of our current state? Our target state is to implement an overall Portal strategy that implements standards such as JSR-168 and JSR-286, and enables much more flexibility to the end-user as far as the presentation goes.

Rather than having each application write to our proprietary portal framework, we would rather have them write to a Portlet specification, and be able to be included in one or more portals as appropriate. The key is that these applications will not be "physically installed" on the Portal server where the portlet is to be presented, as there may be one-to-many Portals choosing to allow access to the portlet, and this would be a maintenance nightmare. Instead, we would rather access the portlets remotely, allowing the team that owns that portlet to be responsible for hosting and maintaining it. Essentially, it is web services for portlets (or WSRP... LOL)

How, as an enterprise, would we go about architecting a Portal strategy that would enable application development teams to develop, implement and support their own portlets, to be used in Portals supported by entirely different organizations? I want to recommend the strategy and standards for doing so, yet am stuck with the limitations and feasibility of the technologies that would appear to get me there.

I'm happy to continue posting here, for the benefit of others, but feel free to email or call me, if you need more details. Meesa has my contact information, as do you, I believe.

Thanks and best regards,
Todd