Using Tomcat APR (Apache Native Runtime) on Mac

I had to document some steps using the Apache Portable Runtime (APR) and TLS configuration and for that needed APR on my Mac. I couldn’t really make it work at first but after fiddling a bit I figured it out. There are the steps in bullet form:

Download APR and compile

  • Download APR from Apache (http://apr.apache.org/). I downloaded v. 1.5.2.
  • Compile in Terminal.
    • CFLAGS=’-arch x86_64′ ./configure
    • make
    • make test
    • make install

Install OpenSSL with headers

The OpenSSL on Mac doesn’t come with the header files so you cannot compile the Tomcat native library by default. To fix that use Homebrew to install a new version of OpenSSL first.

  • Install Homebrew per instructions on the website
  • brew install openssl

Compile Tomcat native library

The Tomcat native library is supplied with the Tomcat download. My Tomcat was v. 8.0.17. Steps as below:

  • cd Tomcat8.0.17/bin
  • gunzip tomcat-native.tar.gz
  • tar xf tomcat-native.tar
  • cd tomcat-native-1.1.32-src/jni/native
  • CFLAGS=’-arch x86_64′ ./configure –with-apr=/usr/local/apr –with-ssl=/usr/local/opt/openssl
  • make
  • make install

Configure Tomcat to use APR

This step is basically just to make sure that the Tomcat native library is on the Java Library path. Do as follows:

  • cd Tomcat8.0.17/bin
  • vi setenv.sh
  • Add text: JAVA_OPTS=”-Djava.library.path=/usr/local/apr/lib”

Now when you run Tomcat using catalina.sh you should see a line like below stating what version of the native library was loaded.

15-May-2016 18:14:01.106 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
     Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.2.

Further reading:

Fixing IBM Connections help for IE users

At a customer site they were actually using the IBM Connections help documents (a first I know) but it didn’t work for the users in Internet Explorer. After some research it turned out to be due to a missing compatability statement in the generated HTML documents (this statement is present in HTML generated for other features). I’ve previously reported this issue to IBM but it still hasn’t been fixed in version 4.0 CR3 so I took it upon me to find a solution. The solution turned out to be simpel using a “sledgehammer approach”. I simply used one of the cool modules in IHS (Apache) to add a compatability header to force all document into IE7 mode.

Below are the steps – YMMV.

  1. Open your httpd.conf file for edit
  2. Uncomment the mod_headers module near the top by removing the hash-character at the beginning so the line simply reads “LoadModule headers_module modules/mod_headers.so”
  3. At the end of the file simply paste in the following command
    Header set X-UA-Compatible IE=7
  4. Save and close the file
  5. Restart the IHS

Apache Directory Studio

I’m currently on a Lotus Connections project and needed a LDAP browser to test authentication and searching. Previously I have been using a Java LDAP browser with a UI that really was lacking. Today I discovered Apache Directory Studio which is built on the Eclipse platform. The application is free and a really good LDAP browser. It also contains a LDIF editor.

The application is a full fletched LDAP browser and is made up of a couple of Eclipse features. You can download the application as a standalone RCP (rich client platform) application, as features for your existing Eclipse IDE but should actually just as well be able to use the LDAP browser directly from Notes 8 Standard. The LDAP browser ships with a perspective so it should be doable.

If it ran inside of Notes 8 it would be a killer admin. tool and easily distributable inside your organization.

I tried to install the perspective in Notes 8 but it isn’t possible since the features depend on the org.eclipse.search feature which isn’t shipped with Notes 8. org.eclipse.search is however supplied with the standard Eclipse 3.2.1 which is the same version as Expeditor 6.1.1 builds upon so it should be possible to download the Directory Studio source code and repackage the perspective to do a perspective which is installable in Notes 8.

For now however I have to run the application in Eclipse or as standalone.