2 Replies Latest reply on Mar 14, 2008 3:39 AM by edykory

    JBoss 4.2.2 and APR overrides java.library.path

    edykory

      Hello there,
      We are developing a project which will use, among others, JBoss 4.2.2, and IBM CM (based on DB2). The IBM CM uses the JDBC 2 version of DB2 drivers, which needs some DLL loaded.
      By default, everything works OK, but when I try to also add the Apache Portable Runtime, the JDBC driver fails with a message of "Cannot find the appropriate driver".
      After some "trial and error" process, I isolated the behavior to the run.sh file from JBoss's bin folder. In it, when JBoss finds the native folder inside JBOSS_HOME/bin, it overrides the java.library.path with JBOSS_HOME/bin/native and this in turn stops the JDBC driver from finding its DLLs (my assumption). If I comment the line overriding the java.library.path then everything works ok, but I don't know the implications.
      More, this happens only on Linux (SLES 9.3 in our case) and not on Windows.

      Any ideas about how I could avoid this problem, or any comments on side-effects of commenting that line in run.sh?

      Thanx a lot

        • 1. Re: JBoss 4.2.2 and APR overrides java.library.path
          peterj

          I assume that is there is a bin/native directory that you have installed JBoss Native and would like to use it. In which case, if you comment out that line you will not longer be using JBoss Native. I would change the line to set java.library.path to $LD_LIBRARY_PATH. (Why it is being set to bin/native I have no idea.)

          • 2. Re: JBoss 4.2.2 and APR overrides java.library.path
            edykory

            Ok, I will try that. Well, I was also wondering why do they set it up as bin/native on linux only (on windows, run.bat sets the java.library.path to bin/native;%PATH%, which makes more sense, but on linux that doesn't do the trick either).
            On the other hand, with that line commented, I don't get the "APR libraries not found" warning from JBoss, so it might work with the lines commented. Anyway, I'll give it a try and set it to LD_LIBRARY_PATH.

            Thanx a lot for the support.
            Eduard