Thoughts and Tutorials about Continuous Integration, Application Integration, SOA, IT Architecture, WebSphere and Liferay

Oct 27, 2008

Bug in Fixpack 6.1.0.19 for WebSphere Application Server

After installing the fixpack 6.1.0.19 a NullPointerException occurs in some applications.
This is a know bug (PK72336).
This Bug causes:

[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R Exception in thread "WebContainer : 3" java.lang.RuntimeException: java.lang.NullPointerException
[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:793)
[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:873)
[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1473)
[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R Caused by: java.lang.NullPointerException
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:111)
at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1473)

[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:111)
[9/17/08 16:44:05:508 CDT] 0000003a SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:195)
[9/17/08 16:44:05:524 CDT] 0000003a SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:743)
[9/17/08 16:44:05:524 CDT] 0000003a SystemErr R ... 2 more


Or:
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R Exception in thread "WebContainer : 13" java.lang.NullPointerException
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.tcp.channel.impl.NioSocketIOChannel.attemptWriteToSocketUsingNIO(NioSocketIOChannel.java:160)
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.tcp.channel.impl.SocketIOChannel.attemptWriteToSocket(SocketIOChannel.java:763)
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:628)
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)
[24.10.08 12:00:47:493 CEST] 000000b5 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)


To fix this exceptions see the link above or navigate to Application Servers > <your_app_server> > Web container > Custom properties > New

Name: com.ibm.ws.webcontainer.channelwritetype
Value: sync

Restart your app server

Oct 13, 2008

PHP portlet in Liferay 5 running on WebSphere Application Server 6.1

Liferay supports portlets with php content. The deployment of these portlets in Tomcat is quite easy.
The deployment of a PHP portlet in Liferay 5 on a WebSphere Server is a bit more difficult.

1. Download the sample_php_portletWAS.war. Its a enhanced version of Liferays original php portlet. The WAR contains all needed files.

2. Move the portal-kernal.jar from <Liferay_root>/WebINF/lib to <WebSphere-System-Root>/lib/ext (or to any other class loading position which is higher then the Liferay 's class loader order).

3. Deploy the php portlet
3.1 In administrative console go to Applications > Enterprise Applications.
3.2 Select the Liferay 5.x App and click "Update"
3.3 Select "Replace or add a single module"
3.4. Select the sample_php_portletWAS.war and specify the context root and the module path.
Also you need to select "Show me all installation options and parameters".
3.5 Click "Next" to start the deployment process
3.6. On step 2 you need to map the server to the sample_php_portlet. Choose the server where Liferay 5.x is deployed.
3.7. On step 7 its nesessary to define the context path again
3.8. Start the deployment (Click "FINISH" and "SAVE")
4. Restart the server
5. Sign in to Liferay and add the "sample_php_portlet"

More information about the deployment of Liferay portlets in WebSphere can be found here

WebSphere Application Server 7

Oct 7, 2008

Liferay 5.1.2 with WebSphere 6.1 [Temp fix]

Liferay 5.1.2 contains a new spring version. While start up of app server an error occurs.
------------------------------------------------------------------------------------------
org.springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed
java.lang.TypeNotPresentException: Type javax.annotation.Resource not present
...
java.lang.ClassNotFoundException: javax.annotation.Resource
------------------------------------------------------------------------------------------
To fix this error you need to download the geronimo-annotation_1.0_spec-1.1.1.jar of the Apache Geronimo project and copy it to /Web-INF/lib.
See this post for a complete tutorial of deploying Liferay in WebSphere.

Hint:
In Liferay 5.1.2 contains still some crazy bugs like wrong virtual hosts and lazy db connections i do not recommend it for production (with websphere)
Change log

Update: To Fix the wrong virtual host settings go to Enterprise Admin > Settings and replace "localhost" with your virtual host (appserver).

Oct 2, 2008

How to compare 2 LDAP-Directories

The comparison of the LDAP-Directories is a bit harder as it sounds.
The biggest problem is the lack of tools to do this research.
Finally i found i tool a called ldapcmp. It seems its quite old but it works under Windows XP.

How to:
1. Download the SUN LDAP C SDK (you need to register) - Platform: Windows 95 4.0 for XP
2. Extract the zip file
3. Copy the ldapcmp.exe from \tools to \lib
4. Execute the ldapcmp.exe with your parameters

The SUN LDAP C SDK also contains the useful tool ldapsearch

The available parameters can be found here