3 Replies Latest reply on Sep 3, 2013 1:42 AM by valsaraj007

    Error: libapr-1.dll was not found starting JBossAS in JBoss

    hmr_mueller

      When starting the JBossAS 4.2.2GA with JBoss Web native configured from within a JBoss Server configured with the Eclipse IDE (JBoss Tools), I'm getting the error '... libapr-1.dll was not found ..' as a popup. After closing the popup for 3 times the server starts, but does so with errors when starting the Tomcat https connector. When running the run.bat script from the command line everything works fine.
      Tomcat is configured to used the AprLifecycleListener and a https connector for APR (OpenSSL style configuration).
      The server launch configuration in eclipse contains the $JBOSS_HOME\bin\native directory in the -Djava.library.path variable

      The problem seems to be that the libtcnative-1.dll is loading the libapr-1.dll dynamically but since the Path environment variable does not contain the $JBOSS_HOME\bin\native directory the library is not found (setting this is done by the run.bat script).
      If I put the native directory in the Path variable, the server starts up correctly, so just defining the java.library.path in the launch configuration does not suffice.
      The problem can be fixed I think, if instead of setting the java.library.path the launch configuration extends the environment (Tab Environment) to contain the native directory in the Path environment variable and changing the class

      org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractJBossLaunchConfigType

      to add this to the
      VMRunnerConfiguration
      in the
      actualLaunch
      method.

      Environment: JBoss Tools 2.1.2GA
      Eclipse: 3.3.1.1
      OS: Windows

      A fix in the next release would be great.