如何在 JBoss 7 中加载 APR 连接器(本机)
我想使用 Atmosphere XMPP,但我需要加载本机连接器 APR。我还不太熟悉 JBoss 7 所以我想知道是否有人知道如何做到这一点? WIndows x64 或 Linux x64 环境。没关系。谢谢
I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里假设 Linux x64。我使用的是 Ubuntu 11.04 x64。
使用 /jboss701/bin/standalone.sh 启动它并验证它是否正确启动(暂时检查 localhost:8080 url)。
从此处下载本机库 。 org/jbossweb/downloads/jboss-native-2-0-9.html" rel="nofollow">http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html 我已经下载了这个 jboss-native-2.0.9-linux2 。 -x64-ssl.tar.gz
将其解压到“/home/myname/tools/jboss701/”文件夹。您应该在“/home/myname/tools/jboss701/bin”文件夹中看到存档的内容。另外,验证“/home/myname/tools/jboss701/bin”下是否有“native”文件夹
重要:不幸的是,它不能开箱即用。您必须进行以下更改:添加
字符串添加到您的 'standalone.conf' 文件中。
使用 'standalone.sh' 脚本启动 JBoss。验证您是否具有以下内容JBoss 启动期间控制台中的行:“org.apache.coyote.http11.Http11AprProtocol”如果您看到。 'org.apache.coyote.http11.Http11AprProtocol' 而不是 'org.apache.coyote.http11.Http11Protocol' 那么一切都按预期工作。
Assuming Linux x64 here. I am using Ubuntu 11.04 x64.
Start it using /jboss701/bin/standalone.sh and verify that it started properly ( check localhost:8080 url). Close the jboss for now.
Download the native libraries from here http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html . I have downloaded this one jboss-native-2.0.9-linux2-x64-ssl.tar.gz
Unpack it to the '/home/myname/tools/jboss701/' folder. You should see the contents of the archive in '/home/myname/tools/jboss701/bin' folder. Also, verify that you have 'native' folder under the '/home/myname/tools/jboss701/bin'
IMPORTANT: unfortunately, it doesn't work out of the box. You must make the following change: add the
string to your 'standalone.conf' file.
Start JBoss with the 'standalone.sh' script. Verify that you have the following line in the console during the JBoss startup: 'org.apache.coyote.http11.Http11AprProtocol'. If you see 'org.apache.coyote.http11.Http11AprProtocol' instead of 'org.apache.coyote.http11.Http11Protocol' then everything is working as expected.
谢谢伙计,我已经成功了。我现在确实在启动脚本中看到了这些行。 `15:13:09,687 INFO [org.apache.catalina.core.AprLifecycleListener](MSC 服务线程 1-7)Apache Tomcat Native li 的旧版本 1.1.20
brary 已安装,而 Tomcat 建议版本大于 1.1.21
15:13:11,110 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC 服务线程 1-3) 在 http--127.0.0.1 上启动 Coyote HTTP/1.1 -8080` 不幸的是,气氛仍然抛出相同的错误。
java.lang.IllegalStateException:JBoss 无法检测到这是 Comet 应用程序,因为未启用 APR 连接器。(JBossWebCometSupport.java:66)
确保atmosphere-compat-jboss.jar 不在您的WEB-INF/lib 下并且
WEB-INF下没有context.xml
org.atmosphere.container.JBossWebCometSupport.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)
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)
我已经按照演示中的方式设置了所有内容。也
Thanks man, i got it working. I do see these lines now in my startup script. `15:13:09,687 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-7) An older version 1.1.20 of the Apache Tomcat Native li
brary is installed, while Tomcat recommends version greater then 1.1.21
15:13:11,110 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080` Atmosphere unforunately, is still throwing 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've set everything up as in the demos. too