PDA

View Full Version : liferay deployment



Karl.Klinge
05-13-2006, 10:17 PM
Hello,

I have integrated the pentaho portlet into the liferay portal.

But when I click on a report field, nearly every second time I get this error:

12:54:50,718 ERROR [[ViewAction]] Servlet.service() for servlet ViewAction threw exception
java.lang.NullPointerException
at com.liferay.portlet.PortletSessionImpl.getAttribute(PortletSessionImpl.java:148)
at org.pentaho.ui.portlet.PentahoPortletSession.getAttribute(PentahoPortletSession.java:54)
at org.pentaho.core.system.PentahoSystem.getSolutionEngineInstance(PentahoSystem.java:482)
at org.pentaho.core.services.BaseRequestHandler.handleActionRequest(BaseRequestHandler.java:123)
at org.pentaho.ui.servlet.ViewAction.doGet(ViewAction.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
12:54:55,875 WARN [JasperReportsComponent] ad36bb83-e27f-11da-9c5c-a97583ad2c32:COMPONENT:context-17099275-1147524895578:jasper-reports-test-1.xaction No output was specified, using default output stream. This usage will not be supported in the future. Please modify this action sequence


I think it may be due to the scope of the attributes but I do not know how to change this.

Thank you for any hint!

Best regards,

Karl

alex_h
07-21-2006, 06:33 AM
Karl - Were you able to resolve this error? Would you be willing to share what steps you took to integrate the pentaho portlet into the liferay portal?

Was anyone else able to get liferay and the pentaho engine integrated?

Does anyone know if it is possible to just download both pre-configured installs and then host them on their seperate servers on different domains, for example, localhost1 (liferay) and localhost2 (pentaho), then do the BI work in the pentaho envioronment and create portlets for them in the liferay environment that would point to the pentaho engine/servers? Is that even possible in theory?

Thanks to everyone for their help,
Alex

alex_h
07-21-2006, 07:42 AM
ok, maybe i don't need seperate domains... i can just host, for example, liferay on port 8080 and pentaho on port 58080. Does that sound like it would work?

Karl.Klinge
07-21-2006, 09:14 AM
I did the follwing:

- Extracted the pentaho.war from the PCI
- Removed all portlets but not one (e.g. Reporting-examples)
- I added the liferay-display.xml in the WEB-INF
- I added the liferay-portlet.xml in the WEB-INF
- then I used a script file from liferay to adapt and copy the pentaho portlet to the liferay installation

Issues:
- This only works in RC2, not in the final: I do not find the portlet in 4.0.0 final - I does not register (the 4.0.0 prtlet script is missing)
- If I change the reports, this does not hot deploy the changes

Let's share our experiences to get this work!

Karl

alex_h
07-21-2006, 07:51 PM
STATUS UPDATE

Ok, so I've finally got the Pentaho BI Platform server booted on the JBoss AS that came with the liferay environment. Here is what I did:

1. Download and extracted the Liferay-JBoss-Tomcat bundle
2. Downloaded the Pentaho BI Platform server J2EE deployment
3. Followed the instructions for deploying the J2EE version for JBoss 4.0.3 in the Pentaho Advanced Install Guide

After booting the Liferay bundle, I deployed the Pentaho BI Platform server by dropping the EAR that I built in step 3. So, I can do a few things on the BI Platform, but there are a few errors that I am still having...

1. There was an error initializing the JFreeReports service during Pentaho's boot sequence:

03:04:00,609 ERROR [Logger] misc-org.pentaho.core.system.PentahoSystem: Error wh
ile trying to execute startup sequence for {0}org.pentaho.plugin.jfreereport.JFr
eeReportSystemListener
java.lang.NoSuchMethodError: org.jfree.base.BasicProjectInfo.addOptionalLibrary(
Ljava/lang/String;)V
at org.jfree.report.JFreeReportInfo.<init>(JFreeReportInfo.java:98)
at org.jfree.report.JFreeReportBoot.<init>(JFreeReportBoot.java:221)
at org.jfree.report.JFreeReportBoot.getInstance(JFreeReportBoot.java:235
)
at org.pentaho.plugin.jfreereport.JFreeReportSystemListener.startup(JFre
eReportSystemListener.java:28)
at org.pentaho.core.system.PentahoSystem.init(PentahoSystem.java:173)



2. I can not run the "Analysis" pivot tables, or pivot tables at all for that matter. I get the following error:

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

3. As indicated by the error above, Jasper Reports isn't running so that whole part of the BI platform is broken.

I will do more research tonight to see if I can't fix these errors. If anyone else knows how these errors can be resolved, please feel free to chime in.

Cheers,
Alex

alex_h
07-21-2006, 10:31 PM
Another update...

After hours of googling and failed repair attempts, I think the errors are related to this:

1. JFreeReports - there may be an older / newer version of JFreeReports & JFreeCharts that shipped with the Liferay-JBoss-Tomcat bundle that is causing a conflict, and therefore causing JFreeReport to fail during boot.

2. JSTL - The JSTL taglib can't be found... caused by a JSTL reference Pivot.jsp. It looks like the web.xml may need to be modified in pentaho-webapp\\WEB-INF to include a taglib pointer to a TLD the JSTL tags.

Note: The item mentioned in #3 above is not really an error.

Does anyone know if this sounds right?

alex_h
07-21-2006, 10:54 PM
I HAVE RESOLVED THE JSTL ERROR!!!!!!!!

As I was saying before, after hours of googling, I decided that the Pentaho J2EE distro would need to be modified to include the JSTL tag library and reference. So, I grabbed the JSTL tag library, c.tld and dropped it into the folder pentaho-webapp\\WEB-INF\\tld and modified the web.xml file in pentaho-webapp\\WEB-INF to include also a reference to resolve the "c" namespace:

<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

You will then need to rebuild the ear via ant and redeploy.

So, the URI can now be resolved and I can see / play with the pivot tables.

Now for the JFreeReport issue and then getting the portlets actually integrated into Liferay...

Cheers,
Alex

Post edited by: alex_h, at: 07/22/2006 02:59

alex_h
07-21-2006, 11:43 PM
I am 2 for 2!!! The JFreeReports boot error has been resolved!

It seems that the Liferay-JBoss-Tomcat bundle ships with a version of JFreeChart. The jars associated with this are JFreeChart and JCommon. JCommon, I learned, is actually used by both JFreeChart and JFreeReport. Having superceded versions of either one of these jars can cause boot failures and will produce the error I mentioned a few posts back.

So, to resolve the case of old jars:
(Shutdown server)
1. Go to C:\\liferay-jboss-tomcat\\server\\default\\deploy\\ext.ear\\lib where Liferay-JBoss-Tomcat is the root directory of the install and delete Jcommon.jar
2. Copy jcommon-1.0.5.jar from C:\\pentaho-j2ee-distro\\pentaho-third-party and paste it into C:\\liferay-jboss-tomcat\\server\\default\\deploy\\ext.ear\\lib.
3. Rename jcommon-1.0.5.jar that you just pasted to jcommon.jar
(Boot server)

Alessio A.
07-26-2006, 08:13 AM
Hi ahang,
your solution is only for have pentaho on the same application server in which run also liferay not for have pentaho portlets directly in the liferay portal, it's right??
Did you have integrate also pentaho portlets into liferay portals? If so could you post the steps.....thank you very much.

Best regards
Alessio A.

P.s.: i'm using Liferay 4.0.0 on JBoss 4.0.3 application server

alex_h
07-27-2006, 01:08 PM
Ciao Alessio,

Here is where I am thus far with my attempt to integrate Pentaho and Liferay:

1. I have Liferay and Pentaho running on the same application server. Each is using its preconfigured hypersonic database.

2. I have a MySQL database integrated into the environment for my own data. I have built portlets that draw from the MySQL database and deployed them into Liferay.

3. I have Pentaho xactions embedded into some of the Liferay pages, using the "Embedded URL" page type when creating a new page in Liferay. This essentially creates just a wrapper around the actual Pentaho xaction JSP. In particular, I created an xaction to create a Pivot table, which probably wouldn't work very well in a portlet anyway, and created a page of type "Embedded URL" and just added the ViewAction (and solution, directory, xaction parameters). It works really well.

I don't know that I'll be trying to write portlets with the Pentaho classes embedded into them at the moment. One thing I might try would be to include the jboss-web.xml in the web-inf folder of the portlet to create the data source mappings for the JBoss AS. Once you start trying to integrate the portlets, if you are getting exceptions, post some of the exceptions from the server log here so we can all see what might be causing problems.

Hope I have helped.

Ci vediamo,
Alex

Alessio A.
07-27-2006, 11:59 PM
Ciao Alex,
so you're italian....;)
Anyway these are the step i made till now:

1) create the pentaho.war file following the Pentaho Advanced Install Guide for JBoss 4.0.3 AS.

2) solved JSTL and JFreeReport errors following your tips...really thanks ;)

3) modified pentaho.war putting under web-inf directory the liferay-portlet.xml and liferay-dispaly.xml (Liferay Portal own files for portlet registration)

4) put this pentaho.war under the deploy directory I defined in the Liferay portal-ext.properties

5) Start the AS and during the pentaho.war deploying i receive this error:



ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/pentaho]] Exception sending context initialized event to listener instance of class com.liferay.portal.shared.servlet.PortletContextListener
java.lang.NoClassDefFoundError: org/jboss/portlet/JBossPortlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

[...]


If you have any idea how solve this problem i'm very happy to know it:-DDD.
But can also speak by e-mail (so we can speak in italian that for me is more comfortable and then if we solve the problem post the solution)?

Ciao, a presto
Alessio

alex_h
07-28-2006, 03:32 AM
Ciao Alessio,

Let's talk on the forum to make sure people can follow along and contribute if they want to help or learn from us :-)

I am not sure that steps 3 & 4 make sense to me yet, it doesn't seem like it will work becuase I think the pentaho.war is built to be used differently.

If you want to put the pentaho portlets into Liferay, I think you will have to create WARs for each individual portlet. I might be wrong on this one becuase I am not an expert at portlet development or portal servers.

Supporting my theory is the what I remember of the Pentaho portal...I believe they created an entirely new portal for the JBoss Portal Server, which had a collection of portlets inside of the portal. Thus deploying their portal on the Liferay portal server probably won't work as planned.

I may try to do a pentaho portlet deployment this weekend...

-Alex

Alessio A.
07-28-2006, 04:19 AM
Hi Alex, Update my situation....
I decide to procede by elimination so now i use only this portlets:


<portlet>
<portlet-name>Reporting-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Getting-Started-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Rules-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Printing-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Bursting-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Secure-Examples</portlet-name>
</portlet>
<portlet>
<portlet-name>Advanced-Examples</portlet-name>
</portlet>


all refers to the portlet class org.pentaho.ui.portlet.NavigationPortlet and now i have these registerd on liferay and i can see it (even if after i use it once it stop to work)....anyway at the moment i'm not analize this error but i proced to add more portlet until i will find the portlet give me the error posted before. If i discover something surely i will tell you;-) ....
Obviousy I hope in this w.e. you will more capable than me and solve the problem;-)))).....

A presto
Alessio

P.s.: Me too not expert in portlet development but for what i saw exist a simply file (portlet.xml) were i map the portlet name with portlet class so i don't see where could be the problem to do a war with several portlets....it should be like have a war file with multiple servlets, nothing more....i think:)

alex_h
07-28-2006, 05:56 AM
Alessio,

I think there may be other discussion about this in the other forums... I have read elsewhere that all the portlets are JSR-168 compliant and can be easily tweaked for other portal servers. So, I have been wondering the same thing for a while:

How do you isolate one of the pentaho portlets and create a .war for it?

I believe the answer to this lies in figuring out how to build a portlet from scratch, which I don't know how to do. I know how to program in Java, but JSP is a bit of a mystery to me. I'm sure it's not hard, but I don't feel like taking the time to learn it right now. Thus far, I have been using Sun's Studio Creator to create portlets.

This is my experiment for this weekend:
1. Create a xaction that I want to test in the portlet, like a data table
2. Create a directory do hold the portlet and required files, lets say DataTablePortlet
3. Create a JSP that will be the front page of the portlet and then redirect the proper parameters to Pentaho's ViewAction jsp for the xaction that I created in step 1
4. Add necessary XML files and jars for portlet
5. Deploy

I don't know if this will work, and it may be completely wrong. I am going to spend a few hours with my friend Google before I test it out. I will let you know if I learn anything new.

-Alex

Karl.Klinge
07-28-2006, 07:17 AM
Dear Alessio and Alex,

as I said in my previous post I made it to integrate pentaho to liferay with the issues I wrote, but only in 4.0.0 RC.

Integration then works in a way, that I only included one of the portlets (e.g. the ReportExamples) in the web.xml.
This does not mean, that a portlet has to be integrated each time as a .war. The pentaho-solutions file is scanned that is lying right next to the jboss main installation directory.
I dropped all other portlets from the web.xml and only left ReportExamples. Then I added the liferay-specific .xml files for this portlet.

There is a script that transforms everything to fit to the liferay environment and copies everything to the application server directory of your choice. This is not accessible on the liferay website any longer - and the RC-version does not seem to do the right modifications, because in 4.0.0 the pentaho portlets are no longer registered.

Best Regards, Karl

Alessio A.
07-30-2006, 11:52 PM
Hi Karl,
as wrote in a previous post i also proced by elimination and till now i have integrate in lifery not only ReportExample portlet but other portlets as well.
The problem is that some portlets throws an exception when i try to integrate and i was not able to solve the error yet.
Anyway i didn't found problem to use the last Liferay 4.0.0 stable version....which is the problem you found? I can try to help you....

Best regards
Alessio

Alessio A.
07-31-2006, 12:16 AM
Goodmorning Alex,
about the war file you can build it with a single pentaho portlet in this way:
1 - Open the portlet.xml and choose the portlet you want include in the war file, remove the others.
For example:


<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd /opt/SUNWps/dtd/portlet.xsd" version="1.0">

<portlet>
<portlet-name>Reporting-Examples</portlet-name>
<portlet-class>org.pentaho.ui.portlet.NavigationPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<portlet-info>
<title>%ReportingExamples</title>
</portlet-info>
<portlet-preferences>
<preference>
<name>solution</name>
<value>samples</value>
</preference>
<preference>
<name>path</name>
<value>reporting</value>
</preference>
<preference>
<name>xsl</name>
<value>portal-files.xsl</value>
</preference>
<preference>
<name>secure</name>
<value>false</value>
</preference>
</portlet-preferences>
</portlet>

<service>
<service-name>PortalObjectContainer</service-name>
<service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
<service-ref>:container=PortalObject,type=global</service-ref>
</service>

<service>
<service-name>PortalPermissionFactory</service-name>
<service-class>org.jboss.portal.security.PortalPermissionFactory</service-class>
<service-ref>:service=PortalPermissionFactory</service-ref>
</service>

</portlet-app>


2 - Under "Pentaho_J2ee_Deployments1.2RC1\\pentaho-classes\\org\\pentaho\\ui\\portlet" remove the classes that refers the potlets you take out in the portlet.xml (Obviuosly i supposing you have dowloaded and unzipped the pentaho_j2ee_deployments-1.2.RC1.341.zip)

3 - Make the war file following the step in the Pentaho Advanced Install Guide


Anyway i haven't create a my pentaho solution till now, i just try to integrate the portlets included by default in the pentaho application.
Waiting for your news;)...

Ciao, Alessio

Karl.Klinge
08-14-2006, 06:54 AM
Hello Alex,

I have a question about your procedure you described here:

3. I have Pentaho xactions embedded into some of the Liferay pages, using the "Embedded URL" page type when creating a new page in Liferay. This essentially creates just a wrapper around the actual Pentaho xaction JSP. In particular, I created an xaction to create a Pivot table, which probably wouldn't work very well in a portlet anyway, and created a page of type "Embedded URL" and just added the ViewAction (and solution, directory, xaction parameters). It works really well.

Is the "Embedded URL page type" a liferay portlet? Or what else?
Of possible (ior if needed) please send me some hints or code.
My e-Mail adress is klinge@logioffice.com

Thanks and best regards!

Karl

alex_h
08-14-2006, 08:37 AM
Hi Karl,

There are actually two ways you embed your xaction into liferay (that I know of), without having to create a whole new portlet:

1. Create a page with an embedded URL as the page type (see attached file)

or

2. Add an Iframe portlet (Go to Add Content->Test->Iframe) and configure the Iframe to open your URL.

Please let me know if you still have questions, or if I have answered the wrong question.

Hope this helps,
Alex http://forums.pentaho.org/archived_att/files/EmbeddedURL.pdf

Karl.Klinge
08-14-2006, 08:59 AM
Thanks Alex, it works very well.
You helped me a lot!
Karl

tamax
12-14-2006, 07:50 AM
Hi,
You all speak about integrated Pentaho in Liferay and that's actually what I'm told to do, so I'm very interested in this thread !! By the way, nice job, it seems it works with you !!
well, I'm just having some doubts :
In my case, I'm not using an application server, both Liferay and Pentaho are running on the same Tomcat instance, and it works fine. Now the next step is to integrate Pentaho into Liferay. Can I follow the same steps you did, or am I supposed to install an Application Server to make it work ?

mdamour
01-29-2007, 11:03 AM
Just to give an update on this thread, I have implemented the jstl tag library fix in the platform so pentaho will work as EAR/WAR deployments out of the box.

tamax
03-07-2007, 06:41 AM
So you mean that Pentaho will be Hot-deployable in Liferay out of the box !? It would be awesome !! When will this feature be available ??

gjoseval90
08-27-2007, 10:36 AM
Any update on this topic? I mean, how can I get and use the pentaho EAR/WAR deployment completely out of the box?

bugg_tb
08-29-2007, 04:57 AM
yeah this would certainly be handy