Thursday, July 9, 2009

Web-Form-Portlet for Liferay (5.2.3) deployed in WebSphere 6.1

To deploy the external "offical" plugin "web-form-portlet" several steps need to be done first.

1. Create a web-form-portlet.war
1.1 Extract the web-form-portlet content (jars, jsps,...) from a tomcat-bundle of liferay (located in: "Liferay-Root\tomcat-6.0.18\webapps\web-form-portlet)
1.2 Create a new Dynamic Web Project in Eclipse and add the extraced content to it (tutorial here).
1.3. Create the folder /WEB-INF/classes/META-INF and add the ext-spring.xml.
1.4 Add the ibm binding files ibm-web-bnd.xmi and ibm-web-ext.xmi to /WEB-INF/
1.5 Extract the portlet-container.jar from your liferay-installation (/lib/ext) and add it to /WEB-INF/lib.
1.6 Edit the /WEB-INF/web.xml and add
<context-param>
<param-name>com.ibm.websphere.portletcontainer.PortletDeploymentEnabled</param-name>
<param-value>false</param-value>
</context-param>

below the </display-name>-Tags.
1.7 Export the web-form-portlet-application as a war-file

2. Deploy the web-form-portlet
2.1 go to the administrative console of websphere and navigate to "Applications > Enterprise Applications"
2.2 Deploy the web-form-portlet as an normal web-applicaton or as a module of your liferay-application (tutorial included in this post). Use the context-root web-form-portlet.
2.3 Start the web-form-portlet-application
2.4 Wait for liferay to detect the portlet (sometimes a restart is needed)

3. Add the web-form-portlet with the "Add application"-menu.


Hints:
1. Download a working web-form-portlet.war here (working on my installation :-).

2. If there are any problems, you can try to
2.1 Upload the war-file into the plugin installer portlet (control panel)
2.2 Get the generated WAR-File (generated from plugin installer portlet/hot deployment routine) and try the deployment again.

3. My /"WebSphere-System-Root"/lib/ext
contains
xml-apis.jar 194.205 19.05.2009 21:00 -a--
xalan.jar 3.078.601 19.05.2009 21:00 -a--
postgresql.jar 448.141 19.05.2009 21:00 -a--
portal-service.jar 1.786.637 19.05.2009 20:58 -a--
portal-kernel.jar 525.263 19.05.2009 20:58 -a--
mysql-connector-java-5.1.6-bin.jar 703.265 05.03.2008 17:27 -a--
mysql.jar 536.609 19.05.2009 21:00 -a--
mail.jar 356.519 19.05.2009 21:00 -a--
liferay-icu4j.jar 5.671.439 19.05.2009 20:18 -a--
jutf7.jar 12.299 19.05.2009 21:00 -a--
jtds.jar 294.726 19.05.2009 21:00 -a--
jta.jar 13.236 19.05.2009 21:00 -a--
jms.jar 25.998 19.05.2009 21:00 -a--
hsql.jar 643.806 19.05.2009 21:00 -a--
container.jar 98.372 19.05.2009 21:00 -a--
activation.jar 55.932 19.05.2009 21:00 -a--

4. My /"WebSphere-System-Root"/java/jre/lib/ext contains
portlet.jar 48.725 19.05.2009 21:00 -a--
PD.jar 1.148.187 29.06.2009 11:44 -a--
jdmpview.jar 251.574 29.06.2009 11:53 -a--
JawBridge.jar 15.661 29.06.2009 11:53 -a--
jaccess.jar 50.129 26.06.2009 14:46 -a--
iwsorbutil.jar 8.289 29.06.2009 11:53 -a--
indicim.jar 65.709 29.06.2009 11:53 -a--
ibmspnego.jar 41.146 26.06.2009 14:46 -a--
ibmsaslprovider.jar 64.506 26.06.2009 14:46 -a--
ibmpkcs11impl.jar 261.848 29.06.2009 11:53 -a--
ibmpkcs11.jar 83.819 29.06.2009 11:53 -a--
IBMKeyManagementServer.jar 475.560 29.06.2009 11:53 -a--
ibmkeycert.jar 232.590 29.06.2009 11:53 -a--
ibmjceprovider.jar 903.078 29.06.2009 11:53 -a--
ibmjcefips.jar 240.130 29.06.2009 11:53 -a--
ibmcmsprovider.jar 206.636 29.06.2009 11:53 -a--
healthcenter.jar 18.812 29.06.2009 11:53 -a--
gskikm.jar 1.110.163 29.06.2009 11:53 -a--
dtfj-interface.jar 16.696 29.06.2009 11:53 -a--
dtfj.jar 347.872 29.06.2009 11:53 -a--
CmpCrmf.jar 183.719 26.06.2009 14:46 -a--


4 Kommentare:

JMaX said...

Hello!
I need to migrate a JBoss aplication to WebSphere.
Do you know any tutorial??

JMaX said...

The JBoss Aplication have JSF and EJB3

eichelgartenweg said...

if the jboss app is a j2ee app you could simply extract the app files and generate a ear-file with eclipse
see:
http://eichelgartenweg2.blogspot.com/2008/06/rebuilding-ear-file.html


after that create the data source (if needed) and deploy the ear.

Josele said...

Hello,

I try to explain better how the J2EE app is implemented.

The J2EE App is a EAR file. Inside there are tree WAR files, three EJB3 JAR's, and several utilities JARs.

When we try to install in WAS 6.1.0.21 with EJB3 feature pack, the administration console say that some JAR isn`t a EJB3 JAR.

Other problem is the J2EE uses Hibernate 3 for persistence, WAS, by default, uses OpenJPA for persistence. When we get to install de EJB3 JAR's, the persistence doesn´t work.

Also JBOSS will call the EJB's (JNDI name) the different way thar WAS. The J2EE App doesn't use ejb-jar.xml to deploy them. The J2EE App was developed to use the way that JBOSS name or deploy the EJB's.

By another way, this J2EE only run in JBOSS 4.0.5 with EJB3. It was developed for this version.

How you can read, it's a simple J2EE app.

Thanks.