Details
-
Bug
-
Resolution: Fixed
-
Low
-
2.11.0
-
None
-
Severity 3 - Minor
-
Description
Summary
Apache Portable Runtime (APR) library is not loading on Crowd startup due to platform mismatch. The library is compiled for 32bit systems and not for 64bit
Environment
- Windows Environment 64bit
- Crowd 2.11.0
Steps to Reproduce
- Download Crowd Standalone for Windows
- Install Crowd
- Crowd will display a warning in the logs about APR not found
Feb 15, 2017 1:50:43 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: <YOUR_SYSTEM_PATH>
- Modify your PATH and add the following
<crowd-install>/apache-tomcat/bin
- Restart your system
- Start Crowd again
Expected Results
Crowd will start without any problems and the APR library will be loaded correctly.
Actual Results
Crowd will start normally without any problems, however the following error is displayed in the apache logs (catalina.out)
Feb 15, 2017 10:11:15 AM org.apache.catalina.core.AprLifecycleListener init WARNING: The APR based Apache Tomcat Native library failed to load. The error reported was [C:\atlassian\atlassian-crowd-2.11.0\apache-tomcat\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform] java.lang.UnsatisfiedLinkError: C:\atlassian\atlassian-crowd-2.11.0\apache-tomcat\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.apache.tomcat.jni.Library.<init>(Library.java:42) at org.apache.tomcat.jni.Library.initialize(Library.java:178) at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:201) at org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:131) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:394) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99) at org.apache.catalina.startup.Catalina.load(Catalina.java:642) at org.apache.catalina.startup.Catalina.load(Catalina.java:667) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Workaround
As a workaround, you can download this zip, extract its bin/tcnative-1.dll and use it to overwrite the one from the Crowd distribution. It contains the x64-compiled version of the same library.
You should only extract this bin/tcnative-1.dll and nothing else, otherwise you will corrupt Crowd binary files.