How to download APR Connector (Native) in JBoss 7

I want to use Atmosphere XMPP, but I need to download my own APR connector. I am not very familiar with JBoss 7, so I was wondering if anyone knows how to do this? WIndows x64 or Linux x64. Irrelevant. Thanks

+2
source share
2 answers

Suppose here is Linux x64. I am using Ubuntu 11.04 x64.

  • Download the JBoss7 distribution package and unzip it to a suitable directory (from here I assume that you have it in the folder "/ home / myname / tools / jboss701 /".
  • Run it using / jboss 701 / bin / standalone.sh and make sure it is running correctly (check localhost: 8080 url). Close jboss for now.

  • Download the native libraries here http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html . I downloaded this jboss-native-2.0.9-linux2-x64-ssl.tar.gz

  • Unzip it to the '/ home / myname / tools / jboss701 /' folder. You should see the contents of the archive in the folder "/ home / myname / tools / jboss701 / bin". Also, make sure you have a "native" folder in the "/ home / myname / tools / jboss701 / bin" section

  • IMPORTANT: unfortunately, it does not work out of the box. You must make the following changes: add

JAVA_OPTS = "$ JAVA_OPTS -Djava.library.path = / home / MyName / tools / jboss701 / bin / native: $ PATH"

to the file `standalone.conf '.

Launch JBoss using the 'standalone.sh' script. Make sure that the following line appears on the console when starting JBoss: "org.apache.coyote.http11.Http11AprProtocol" If you see "org.apache.coyote.http11.Http11AprProtocol" instead of "org.apache.coyote.http11.Http11Protocol" then everything works as expected.

+4
source

Thanks, I earned it. I see these lines in my startup script. `15: 13: 09,687 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC 1-7 service flow). An older version 1.1.20 of Apache Tomcat Native li brary is installed, while Tomcat recommends a version greater than 1.1.21

15: 13: 11,110 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC 1-3 service flow) Running Coyote HTTP / 1.1 on http-127.0.0.1-8080 "The atmosphere, fortunately, still throws the same error .

java.lang.IllegalStateException: JBoss failed to detect this is a Comet application because the APR Connector is not enabled. Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and there is no context.xml under WEB-INF org.atmosphere.container.JBossWebCometSupport.<clinit>(JBossWebCometSupport.java:66) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.atmosphere.cpr.DefaultCometSupportResolver.newCometSupport(DefaultCometSupportResolver.java:178) org.atmosphere.cpr.DefaultCometSupportResolver.resolveWebSocket(DefaultCometSupportResolver.java:223) org.atmosphere.cpr.DefaultCometSupportResolver.resolve(DefaultCometSupportResolver.java:217) org.atmosphere.cpr.AtmosphereServlet.autoDetectContainer(AtmosphereServlet.java:900) org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:530) org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662)

I installed everything as in a demo. also

+1
source

All Articles