Search This Blog

Loading...

Wednesday, January 28, 2009

Liferay 5.2.0/5.2.1/5.2.2/5.2.3 on WebSphere 6.1

(Should work with WebSphere 7 too)

The new Liferay-Versions 5.2.x can be downloaded here.

But deployment in WebSphere 6.1 is still a bit tricky.

Steps:
1. Deploy the Liferay 5.2.x war-File (with dependencies)
2. Move portal-kernel.jar and container.jar to "WebSphere-System-root"/lib/ext
3. Move icu4j.jar (not needed in 5.2.2./5.2.3 - new file name: liferay-icu4j.jar) and portlet.jar to "WebSphere-System-root"/java/jre/lib/ext
4. Download the sun saw-api (saw-api.jar) or extract it from the dependencies (can be downloaded seperatly) and move it to /WEB-INF/lib
5. Setup Database-Connection either in portal-ext.properties or in ext-spring.xml
5.1 To setup the database in portal-ext.properties take a look at portal-impl.jar//portal.properties (chapter JDBC). With this setup Liferay 5.2 will use the apache common connection pool.
5.2 To use the connection pool of WebSphere you need to create a file called ext-spring.xml and place it into /WEB-INF/classes/META-INF. Download a sample ext-spring.xml file here.

########
Liferay 5.2.0 only##########

6. For Liferay 5.2.0 only: deactivate the javascript fast load option in portal-ext.properties with this value


javascript.fast.load=false

It seems the fast load option (yui compression of JS/CSS files) is NOT correctly implemented (for WebSphere).

WORKAROUND:
Put theses files into /html/js


Edit JavaScript-Settings in portal-ext.properties

##
## JavaScript
##
javascript.barebone.files=\
\
#
# Self-packed files
#
\
barebone_packed.js
#
# Specify the list of everything files (everything else not already in the
# list of barebone files).
#
javascript.everything.files=\
\
#
# Self-packed files
#
\
everything_packed.js
JavaScript files.

javascript.barebone.enabled=true

javascript.fast.load=false

javascript.log.enabled=false


###############################################################

7. Restart your server.

Hint:
Its also possible to download the dependencies seperatly and then copy them to the lib-Folders of WebSphere.
Probably a change in class loader order will have same effect (Applications > Enterprise Applications > "your app" >
Class loading and update detection)

17 comments:

kishna said...

Thanks for your article. I got it working for most part. I am having a problem with Control Panel/Settings application. There is a java script error "Liferay.Service.Portal is undefined". Do I need one more javascript file that need to be added to the js directory?

KevyKev said...

Hi...

I've installed LR 5.2.2 on WAS 6.1... In set 5, it says to move the ext-spring.xml file to my WEB-INF/classes/META-INF folder... but the meta folder is not there... should I create it.. then move the file? When I ran liferay... I get the following error... So I want to make sure I'm following the steps correctly....

[6/5/09 9:26:23:273 EDT] 00000076 WebApp E [Servlet Error]-[Filter [Session Id Filter]: com.liferay.portal.servlet.filters.sessionid.SessionIdFilter was found, but is missing another required class.
]: java.lang.NoClassDefFoundError: com.liferay.portal.util.PropsUtil (initialization failure)

eichelgartenweg said...

Hi KevyKev,
yes you should create the META-INF-Folder!.
Somehow some classes are missing (java.lang.NoClassDefFoundError).
Make sure that you moved (! - do not copy) all the necessary files to the correct directorys in the WebSphere class loader oder.

Greets Marcel

Hervê said...

Hi,

Can you explain how to deploy the liferay war file in the WAS?

I tried using the console in: Applications->New Applications. But this didnt work since it give an exception.

Thanks in Advance

KevyKev said...

Hi Herve...

I've installed LR 5.2.4 EE version on WAS 6.1.21...

I installed it through the admin console like any other WAR file... I gave it a context root of "/"... assigned a virtual host of something like vh_liferay...

I created a WAS datasource liferaydatabasesource with a JNDI name of jdbc/LiferayPool...

in the portal-ext.properties file looks like this:

# Hibernate settings from liferay for db2
hibernate.dialect=com.liferay.portal.dao.orm.hibernate.DB2Dialect
custom.sql.function.isnull=CAST(? AS VARCHAR(32672)) IS NULL
custom.sql.function.isnotnull=CAST(? AS VARCHAR(32672)) IS NOT NULL

jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
jdbc.default.jndi.name=jdbc/LiferayPool

i moved the correct files into the liferayWAR\WEB-INF\lib folder...

and that's about it..

what type of error are you getting?

Kevy Kev

Hervê said...

Hi,

I already passed that problem. I installed the liferay and when I start the Websphere no exceptions are thrown.

In addition to your steps I had to change the Class loading to "Parent Last".

However when I open the browser and open the liferay page the page show is basically a mess. I can not see some controls, some controls appears in different places.

I'm using liferay 5.2.3 and websphere 7.0.0.3.

I made all the steps that you said.

Do you have an idea what could be the problem?

Thanks in Advance
Hervê

Hervê said...

Hi,

I already solve almost all the problems.

Apparently the only steps required are the ones defined in the Liferay Administration PDF. It's not required to create any JS files. Additional to the steps defined in the PDF I change the Class Loading to Parent Last.

Currently my problem is. When I try to install a new problem via the liferay button in the "Upload File" tab when I press the button Install nothing happens.

Did you have this problem?

Hervê

KevyKev said...

Hi Herve...

Help me understand where you are... the "upload tab"... is that in the Websphere admin console or in the control panel of Liferay... like in the Document library for uploading assets?

Kev

Hervê said...

Hi,

Exactly, the one in the Control Panel of the Liferay.

Can I install Portlet applications using other way?

Hervê

KevyKev said...

We're in early stages of LR development... and I've only used EXT for portlet development on my local machine running tomcat on my mac... I'll be working on portlets in PLUGINS environment... and soon migrate the files over to websphere staging servers... So I'll let you know very soon...

Hervê said...

Hi,

I solved the problem. Basically I had to change the liferay code and remove one progress bar of the page where the updload is made.

My current problem is. How can I install portlet using WebSphere and Liferay?

Thanks
Hervê

Mawaddah said...
This comment has been removed by the author.
KevyKev said...

Hi there... We're upgrading from 5.2.4 to 5.2.5 in websphere 6.1.0.21... Do you have any advise as to which files I should back up before upgrading the application?

thanks

Kev

Boymix81 said...
This comment has been removed by the author.
Boymix81 said...

Hi,

I use Liferay 5.2.3 on WebSpere 7.0.0 and upload file to instal plugin don't work the error is:

- 'UploadProgress' not defined
Linea: 28
Carattere: 14
Codice: 0
URI: http://192.168.0.39/group/control_panel/manage?p_p_id=111&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10136&refererPlid=10139&_111_struts_action=%2Fplugin_installer%2Fview&_111_tabs2=theme-plugins&_111_backURL=%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D136%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26doAsGroupId%3D10136%26refererPlid%3D10139%26_136_struts_action%3D%252Fadmin_plugins%252Fview%26_136_tabs1%3Dplugins%26_136_tabs3%3D%26tabs2%3Dtheme-plugins&_111_moduleId=&_111_repositoryURL=&tabs1=upload-file

- 'vrzv' is null or invalid object
Linea: 27
Carattere: 1
Codice: 0
URI: http://192.168.0.39/group/control_panel/manage?p_p_id=111&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10136&refererPlid=10139&_111_struts_action=%2Fplugin_installer%2Fview&_111_tabs2=theme-plugins&_111_backURL=%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D136%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26doAsGroupId%3D10136%26refererPlid%3D10139%26_136_struts_action%3D%252Fadmin_plugins%252Fview%26_136_tabs1%3Dplugins%26_136_tabs3%3D%26tabs2%3Dtheme-plugins&_111_moduleId=&_111_repositoryURL=&tabs1=upload-file

It's liferay problem or websphere problem ?

Thanks

eichelgartenweg said...

forget about the plugins install portlet when using websphere.

you will need a lot of effort to make plugins portlet working.

try the methods i posted in my blog (add to liferay portlet containter / add to was portlet container)

nacool said...

Hi,

I'm using liferay 6.0 sp2 with WAS 7,
after successfully configuring MsSql server and deploying liferay EE 6.0 sp2 war file, when i hit http://localhost:9080/,
i get below exception in browser,Error 500: com.liferay.portal.kernel.servlet.BaseFilter.

Any suggestions?