Enable JBoss Web Native (APR) on JBoss AS 6 - jboss
I am trying to enable APR to improve performance of the AJP connector we use between apache and jboss.
I have downloaded the correct .tar file from http://jbossweb.jboss.org/downloads/jboss-native-2-0-10 and extracted the files in accordance with the wiki instructions here : https://developer.jboss.org/wiki/HowToAddAprToJBoss
Putting the .so files in the {jboss}/bin/native/lib64/ directory
The server already has the startup parameter:
-Djava.library.path=/opt/jboss/bin/native/lib64
But whenever I start the server I get the line:
[AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jboss/bin/native/lib64
Can anyone offer any advice? I know there are many questions regarding AS7 (and EAP 6) but I cannot see ANY documentation for AS 6
I have tried for both our development (OS/X) and staging (Debian) servers using the corresponding .tar files but no luck with either
As requested, here is result of ls -l on /{jboss}/bin/native/lib64
drwxr-xr-x 2 jboss jbossgroup 4096 Nov 9 14:29 engines
-rw-r--r-- 1 jboss jbossgroup 53584 Aug 17 2010 libHornetQAIO64.so
lrwxrwxrwx 1 jboss jbossgroup 18 Nov 9 14:29 libapr-1.so -> libapr-1.so.0.3.12
lrwxrwxrwx 1 jboss jbossgroup 18 Nov 9 14:29 libapr-1.so.0 -> libapr-1.so.0.3.12
-rwxr-xr-x 1 jboss jbossgroup 760761 Nov 9 14:29 libapr-1.so.0.3.12
lrwxrwxrwx 1 jboss jbossgroup 18 Nov 9 14:29 libcrypto.so -> libcrypto.so.0.9.8
lrwxrwxrwx 1 jboss jbossgroup 18 Nov 9 14:29 libcrypto.so.0 -> libcrypto.so.0.9.8
-r-xr-xr-x 1 jboss jbossgroup 2461453 Nov 9 14:29 libcrypto.so.0.9.8
lrwxrwxrwx 1 jboss jbossgroup 15 Nov 9 14:29 libssl.so -> libssl.so.0.9.8
lrwxrwxrwx 1 jboss jbossgroup 15 Nov 9 14:29 libssl.so.0 -> libssl.so.0.9.8
-r-xr-xr-x 1 jboss jbossgroup 606710 Nov 9 14:29 libssl.so.0.9.8
lrwxrwxrwx 1 jboss jbossgroup 23 Nov 9 14:29 libtcnative-1.so -> libtcnative-1.so.0.1.22
lrwxrwxrwx 1 jboss jbossgroup 23 Nov 9 14:29 libtcnative-1.so.0 -> libtcnative-1.so.0.1.22
-rwxr-xr-x 1 jboss jbossgroup 972435 Nov 9 14:29 libtcnative-1.so.0.1.22
And after enabling DEBUG level logging on org.apache.catalina.core I get the following boot.log output:
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss
JAVA: java
JAVA_OPTS: -server -d64 -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Xverify:none -Dapp.mode=staging -Djava.rmi.server.hostname=ec2-11-11-111-111.eu-west-1.compute.amazonaws.com -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.library.path=/opt/jboss/bin/native/lib64
CLASSPATH: :/opt/jboss-6.0.0.Final/lib/jboss-logmanager.jar:/opt/jboss/bin/run.jar
=========================================================================
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future
23:12:22,466 INFO [AbstractJBossASServerBase] Server Configuration:
JBOSS_HOME URL: file:/opt/jboss-6.0.0.Final/
Bootstrap: $JBOSS_HOME/server/default/conf/bootstrap.xml
Common Base: $JBOSS_HOME/common/
Common Library: $JBOSS_HOME/common/lib/
Server Name: default
Server Base: $JBOSS_HOME/server/
Server Library: $JBOSS_HOME/server/default/lib/
Server Config: $JBOSS_HOME/server/default/conf/
Server Home: $JBOSS_HOME/server/default/
Server Data: $JBOSS_HOME/server/default/data/
Server Log: $JBOSS_HOME/server/default/log/
Server Temp: $JBOSS_HOME/server/default/tmp/
23:12:22,501 INFO [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"]
23:12:26,130 INFO [ServerInfo] Java version: 1.6.0_22,Sun Microsystems Inc.
23:12:26,138 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
23:12:26,139 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 17.1-b03,Sun Microsystems Inc.
23:12:26,139 INFO [ServerInfo] OS-System: Linux 3.2.0-4-amd64,amd64
23:12:26,139 INFO [ServerInfo] VM arguments: -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Xverify:none -Dapp.mode=staging -Djava.rmi.server.hostname=ec2-11-11-111-111.eu-west-1.compute.amazonaws.com -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.library.path=/opt/jboss/bin/native/lib64 -Djava.endorsed.dirs=/opt/jboss/lib/endorsed
23:12:26,256 INFO [JMXKernel] Legacy JMX core initialized
23:12:38,901 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA
23:12:40,353 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
23:12:56,530 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
23:13:16,702 INFO [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb
23:13:17,121 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#1944676091{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/SwimtagActions.jar/}
23:13:17,122 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#1944676091{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/SwimtagActions.jar/}
23:13:17,122 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#1617437744{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/SwimtagEntities.jar/}
23:13:17,122 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#1617437744{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/SwimtagEntities.jar/}
23:13:17,123 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#655052855{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/jboss-seam.jar/}
23:13:17,135 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#655052855{vfs:///opt/jboss-6.0.0.Final/server/default/deploy/Swimtag.ear/jboss-seam.jar/}
23:13:21,055 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
23:13:21,451 INFO [JMXConnector] starting JMXConnector on host 0.0.0.0:1090
23:13:21,718 INFO [MailService] Mail Service bound to java:/Mail
23:13:24,038 INFO [HornetQServerImpl] live server is starting..
23:13:24,211 INFO [JournalStorageManager] Using NIO Journal
23:13:25,638 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.1.Final-r2319 0.0.0.0:5445 for CORE protocol
23:13:25,655 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.1.Final-r2319 0.0.0.0:5455 for CORE protocol
23:13:25,680 INFO [HornetQServerImpl] HornetQ Server version 2.1.2.Final (Colmeia, 120) started
23:13:25,878 INFO [WebService] Using RMI server codebase: http://ec2-11-11-111-111.eu-west-1.compute.amazonaws.com:8083/
23:13:26,402 INFO [jbossatx] ARJUNA-32010 JBossTS Recovery Service (tag: JBOSSTS_4_14_0_Final) - JBoss Inc.
23:13:26,406 INFO [arjuna] ARJUNA-12324 Start RecoveryActivators
23:13:26,491 INFO [arjuna] ARJUNA-12296 ExpiredEntryMonitor running at Wed, 12 Nov 2014 23:13:26
23:13:26,681 INFO [arjuna] ARJUNA-12310 Recovery manager listening on endpoint 0.0.0.0:4712
23:13:26,682 INFO [arjuna] ARJUNA-12344 RecoveryManagerImple is ready on port 4712
23:13:26,682 INFO [jbossatx] ARJUNA-32013 Starting transaction recovery manager
23:13:26,712 INFO [arjuna] ARJUNA-12163 Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 4713
23:13:26,761 INFO [arjuna] ARJUNA-12337 TransactionStatusManagerItem host: 0.0.0.0 port: 4713
23:13:26,777 INFO [arjuna] ARJUNA-12170 TransactionStatusManager started on port 4713 and host 0.0.0.0 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
23:13:26,830 INFO [jbossatx] ARJUNA-32017 JBossTS Transaction Service (JTA version - tag: JBOSSTS_4_14_0_Final) - JBoss Inc.
23:13:26,892 INFO [arjuna] ARJUNA-12202 registering bean jboss.jta:type=ObjectStore.
23:13:27,372 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jboss/bin/native/lib64
23:13:27,794 INFO [ModClusterService] Initializing mod_cluster 1.1.0.Final
23:13:27,816 INFO [TomcatDeployment] deploy, ctxPath=/invoker
23:13:28,657 INFO [RARDeployment] Required license terms exist, view vfs:/opt/jboss-6.0.0.Final/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
23:13:28,689 INFO [RARDeployment] Required license terms exist, view vfs:/opt/jboss-6.0.0.Final/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
23:13:28,696 INFO [RARDeployment] Required license terms exist, view vfs:/opt/jboss-6.0.0.Final/server/default/deploy/jms-ra.rar/META-INF/ra.xml
23:13:28,730 INFO [HornetQResourceAdapter] HornetQ resource adaptor started
23:13:28,787 INFO [RARDeployment] Required license terms exist, view vfs:/opt/jboss-6.0.0.Final/server/default/deploy/mail-ra.rar/META-INF/ra.xml
23:13:28,804 INFO [RARDeployment] Required license terms exist, view vfs:/opt/jboss-6.0.0.Final/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
23:13:28,912 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: Thread-2
23:13:28,949 INFO [SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
23:13:28,949 INFO [QuartzScheduler] Quartz Scheduler v.1.8.3 created.
23:13:28,951 INFO [RAMJobStore] RAMJobStore initialized.
23:13:28,952 INFO [QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v1.8.3) 'JBossQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
Using the following in jboss-logging.xml
<logger category="org.apache.catalina.core">
<level name="DEBUG"/>
</logger>
Jboss AS 6.x in run.sh script try set value of java.library.path
If you look in the run.sh file:
# Setup JBoss Native library path
#
if [ -d "$JBOSS_HOME/../native/lib" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/../native" && pwd`
elif [ -d "$JBOSS_HOME/native/lib" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/native" && pwd`
elif [ -d "$JBOSS_HOME/../native/lib64" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/../native" && pwd`
elif [ -d "$JBOSS_HOME/native/lib64" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/native" && pwd`
elif [ -d "$JBOSS_HOME/native/bin" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/native" && pwd`
elif [ -d "$JBOSS_HOME/bin/native" ]; then
JBOSS_NATIVE_DIR=`cd "$JBOSS_HOME/bin/native" && pwd`
fi
if [ -d "$JBOSS_NATIVE_DIR" ]; then
if $cygwin; then
JBOSS_NATIVE_DIR="$JBOSS_NATIVE_DIR/bin"
export PATH="$JBOSS_NATIVE_DIR:$PATH"
JBOSS_NATIVE_LIBPATH=`cygpath --path --windows "$JBOSS_NATIVE_DIR"`
else
IS_64_BIT_JVM=`"$JAVA" $JVM_OPTVERSION 2>&1 | $GREP -i 64-bit`
if [ "x$IS_64_BIT_JVM" != "x" ]; then
JBOSS_NATIVE_DIR="$JBOSS_NATIVE_DIR/lib64"
else
JBOSS_NATIVE_DIR="$JBOSS_NATIVE_DIR/lib"
fi
LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH
JBOSS_NATIVE_LIBPATH=$LD_LIBRARY_PATH
fi
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSS_NATIVE_LIBPATH"
fi
This overwrites the value in startup, you must install the native components in bin/native or comment this line.
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSS_NATIVE_LIBPATH"
Related
WildFly10 installation - cannot create user
I have a problem with installing WildFly10. In youtube tutorial here at 8:39 I cannot see "Terminate batch job Y/N?". If I go to http://localhost:8080/ I can see that my server is running. My cmd: C:\wildfly-10.1.0.Final\bin>standalone Calling "C:\wildfly-10.1.0.Final\bin\standalone.conf.bat" Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_121\bin\java" =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: "C:\wildfly-10.1.0.Final" JAVA: "C:\Program Files\Java\jdk1.8.0_121\bin\java" JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman" =============================================================================== 10:28:47,503 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final 10:28:47,692 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final * * a lot of text * * 10:28:49,980 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 2758ms - Started 331 of 577 services (393 services are lazy, passive or on-demand) So, what should I do to finish tutorial?
As said in youtube link, you need to press Ctrl+c to shutdown server. This will ask you "Terminate batch job Y/N?". However you can add user without shutting down server.
How to monitor ActiveMQ Artemis on WildFly with Hawt.io
I have ActiveMQ Artemis embedded to WildFly10 (as it comes) and want to monitor it via Hawt.io. What I did: ActiveMQ Artemis is configured and running I dropped hawtio.war to deployment directory. I dropped builded by maven artemis-plugin with name chanaged just to artemis-plugin.war I even dropped jolokia.war I tried with the standalone jar - made a plugin directory and put artemis-plugin.war there. when I connect to jolokia I get CPU usage (and stuff like that) for WildFly, I can see, via JMX the queue, but still, to success with Artemis. hawtio doesnot recognize the pluginhawtio doesnot recognize the plugin however it got loaded: [main] INFO org.eclipse.jetty.webapp.WebAppContext - An Artemis plugin at http://0.0.0.0:8081/artemis-plugin [main] INFO jetty - Added 3rd party plugin with context-path: /artemis-plugin Added 3rd party plugin with context-path: /artemis-plugin I donot have 'Artemis' tab. , going to http://0.0.0.0:8081/artemis-plugin shows me the dir: Directory: /artemis-plugin/ META-INF/ 4096 bytes Aug 4, 2016 10:41:10 AM WEB-INF/ 4096 bytes Aug 4, 2016 10:41:10 AM log4j.properties 215 bytes Aug 3, 2016 3:39:10 PM plugin/ 4096 bytes Aug 4, 2016 10:41:09 AM Any ideas?
jmx managment has to be switched on: <management jmx-enabled="true"/> source
jboss-as-7.1.1.Final : localhost:8080 not working
I downloaded the jboss-as-7.1.1.Final from : http://jbossas.jboss.org/downloads I extract it to : C:\Program Files\jboss-as-7.1.1.Final I create JBOSS_HOME = C:\Program Files\jboss-as-7.1.1.Final I run cmd as administrator and execute the standalone command : C:\Program Files\jboss-as-7.1.1.Final\bin>standalone.bat -b 0.0.0.0 Calling "C:\Program Files\jboss-as-7.1.1.Final\bin\standalone.conf.bat" =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\Program Files\jboss-as-7.1.1.Final JAVA: C:\Program Files\Java\jdk1.8.0_05\bin\java JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51 2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml =============================================================================== Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 11:20:47,560 INFOS [org.jboss.modules] JBoss Modules version 1.1.1.GA 11:20:48,163 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA 11:20:48,285 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting When i go to the following URL: http://localhost:8080 => it doesn't work. Have I missed something? thank you in advance
Try using 127.0.0.1 instead of localhost. If that solves the problem, you can edit your hosts file to add the localhost mapping. See What is the difference between 127.0.0.1 and localhost Otherwise, try a telnet localhost 8080 from command line. It may be that your browser is trying to go through a proxy. On telnet, https://www.lifewire.com/what-is-telnet-2626026. Or any other option, read more here: https://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet Still not working? please check that the log includes a line saying that the server is started and running, look for "listening" in the logs.
404 Error while deploying simple web-app in JBoss AS 6 and JBoss AS 7?
I followed this blog for injecting EJB in REST layer. Here is the code that I tried deploying in JBOSS AS 6 and 7 using Eclipse: REST: package com.example.rest; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.ws.rs.GET; import javax.ws.rs.Path; #Stateless #Path("current") public class ServiceFacade { #EJB ServiceImpl service; #GET public String getDate(){ return service.getCurrentDate().toString(); } } EJB: import java.util.Date; import javax.ejb.Stateless; #Stateless public class ServiceImpl { public Date getCurrentDate(){ return new Date(); } } #ApplicationPath("rest") public class RestApplication extends Application { } pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.sample.rest</groupId> <artifactId>restejb</artifactId> <version>0.0.1-SNAPSHOT</version> <description>simplet project to test ejb injection in rest</description> <dependencies> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>1.0.0.Final</version> <packaging>war</packaging> <type>pom</type> <scope>provided</scope> </dependency> </dependencies> </project> when I access http://localhost:8080/restejb/rest/current, I get 404 page NOT found error. Here is the log from deployment to JBOSS AS 6: 11:19:23,701 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/ Bootstrap: $JBOSS_HOME/server/default/conf/bootstrap.xml Common Base: $JBOSS_HOME/common/ Common Library: $JBOSS_HOME/common/lib/ Server Name: default Server Base: $JBOSS_HOME/server/ Server Library: $JBOSS_HOME/server/default/lib/ Server Config: $JBOSS_HOME/server/default/conf/ Server Home: $JBOSS_HOME/server/default/ Server Data: $JBOSS_HOME/server/default/data/ Server Log: $JBOSS_HOME/server/default/log/ Server Temp: $JBOSS_HOME/server/default/tmp/ 11:19:23,706 INFO [AbstractServer] Starting: JBossAS [6.1.0.Final "Neo"] 11:19:27,412 INFO [ServerInfo] Java version: 1.7.0_71,Oracle Corporation 11:19:27,412 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.7.0_71-b14) 11:19:27,413 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 24.71-b01,Oracle Corporation 11:19:27,413 INFO [ServerInfo] OS-System: Mac OS X 10.9.5,x86_64 11:19:27,414 INFO [ServerInfo] VM arguments: -Dprogram.name=JBossTools: JBoss AS 6.x -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/lib/endorsed -Djava.library.path=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/bin/native -Dlogging.configuration=file:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/bin/logging.properties -Dfile.encoding=UTF-8 11:19:27,483 INFO [JMXKernel] Legacy JMX core initialized 11:19:35,849 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA 11:19:36,679 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0] 11:19:47,865 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal 11:19:48,389 INFO [JMXConnector] starting JMXConnector on host localhost:1090 11:19:48,609 INFO [MailService] Mail Service bound to java:/Mail 11:19:49,990 INFO [HornetQServerImpl] live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/data/hornetq/journal,bindingsDirectory=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/data/hornetq/bindings,largeMessagesDirectory=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/data/hornetq/largemessages,pagingDirectory=/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/data/hornetq/paging) 11:19:49,992 INFO [HornetQServerImpl] Waiting to obtain live lock 11:19:50,105 INFO [JournalStorageManager] Using NIO Journal 11:19:50,140 WARNING [HornetQServerImpl] Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this. 11:19:50,468 INFO [FileLockNodeManager] Waiting to obtain live lock 11:19:50,469 INFO [FileLockNodeManager] Live Server Obtained live lock 11:19:51,283 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5445 for CORE protocol 11:19:51,287 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5455 for CORE protocol 11:19:51,290 INFO [HornetQServerImpl] Server is now live 11:19:51,291 INFO [HornetQServerImpl] HornetQ Server version 2.2.5.Final (HQ_2_2_5_FINAL_AS7, 121) [251821f6-c6bb-11e4-9df3-60334b2115c1] started 11:19:51,386 INFO [WebService] Using RMI server codebase: http://localhost:8083/ 11:19:51,699 INFO [jbossatx] ARJUNA-32010 JBossTS Recovery Service (tag: JBOSSTS_4_14_0_Final) - JBoss Inc. 11:19:51,711 INFO [arjuna] ARJUNA-12324 Start RecoveryActivators 11:19:51,745 INFO [arjuna] ARJUNA-12296 ExpiredEntryMonitor running at Tue, 10 Mar 2015 11:19:51 11:19:51,903 INFO [arjuna] ARJUNA-12310 Recovery manager listening on endpoint 127.0.0.1:4712 11:19:51,904 INFO [arjuna] ARJUNA-12344 RecoveryManagerImple is ready on port 4712 11:19:51,905 INFO [jbossatx] ARJUNA-32013 Starting transaction recovery manager 11:19:51,933 INFO [arjuna] ARJUNA-12163 Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 4713 11:19:51,934 INFO [arjuna] ARJUNA-12337 TransactionStatusManagerItem host: 127.0.0.1 port: 4713 11:19:51,937 INFO [arjuna] ARJUNA-12170 TransactionStatusManager started on port 4713 and host 127.0.0.1 with service com.arjuna.ats.arjuna.recovery.ActionStatusService 11:19:52,007 INFO [jbossatx] ARJUNA-32017 JBossTS Transaction Service (JTA version - tag: JBOSSTS_4_14_0_Final) - JBoss Inc. 11:19:52,103 INFO [arjuna] ARJUNA-12202 registering bean jboss.jta:type=ObjectStore. 11:19:52,481 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/bin/native 11:19:52,764 INFO [TomcatDeployment] deploy, ctxPath=/invoker 11:19:53,207 INFO [ModClusterService] Initializing mod_cluster 1.1.0.Final 11:19:53,286 INFO [RARDeployment] Required license terms exist, view vfs:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml 11:19:53,308 INFO [RARDeployment] Required license terms exist, view vfs:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml 11:19:53,322 INFO [RARDeployment] Required license terms exist, view vfs:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/deploy/jms-ra.rar/META-INF/ra.xml 11:19:53,347 INFO [HornetQResourceAdapter] HornetQ resource adaptor started 11:19:53,359 INFO [RARDeployment] Required license terms exist, view vfs:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/deploy/mail-ra.rar/META-INF/ra.xml 11:19:53,382 INFO [RARDeployment] Required license terms exist, view vfs:/Users/sridhar1982AQ/Documents/EE7_servers/jboss-6.1.0.Final/server/default/deploy/quartz-ra.rar/META-INF/ra.xml 11:19:53,522 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: Thread-2 11:19:53,574 INFO [SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl 11:19:53,575 INFO [QuartzScheduler] Quartz Scheduler v.1.8.3 created. 11:19:53,579 INFO [RAMJobStore] RAMJobStore initialized. 11:19:53,583 INFO [QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v1.8.3) 'JBossQuartzScheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads. Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered. 11:19:53,583 INFO [StdSchedulerFactory] Quartz scheduler 'JBossQuartzScheduler' initialized from an externally opened InputStream. 11:19:53,583 INFO [StdSchedulerFactory] Quartz scheduler version: 1.8.3 11:19:53,584 INFO [QuartzScheduler] Scheduler JBossQuartzScheduler_$_NON_CLUSTERED started. 11:19:54,133 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS' 11:19:54,533 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA' 11:19:54,715 INFO [xnio] XNIO Version 2.1.0.CR2 11:19:54,733 INFO [nio] XNIO NIO Implementation Version 2.1.0.CR2 11:19:55,100 INFO [remoting] JBoss Remoting version 3.1.0.Beta2 11:19:55,279 INFO [TomcatDeployment] deploy, ctxPath=/ 11:19:55,417 INFO [HornetQServerImpl] trying to deploy queue jms.queue.ExpiryQueue 11:19:55,462 INFO [HornetQServerImpl] trying to deploy queue jms.queue.DLQ 11:19:55,508 INFO [service] Removing bootstrap log handlers 11:19:55,616 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080 11:19:55,624 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009 11:19:55,625 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.Final "Neo"] Started in 31s:909ms 11:19:56,100 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/restejb
I am checking one of my projects using rest and in the annotation I use a slash / before the resource name both in #ApplicationPath("/rest") as in the rest service `#Path("/current"), so your EJB seems like must be something like: #Stateless #Path("/current") public class ServiceImpl { #GET public Date getCurrentDate(){ return new Date(); } } And your activator class something like: #ApplicationPath("/rest") public class RestApplication extends Application { }
Tomcat configuration using embedded ActiveMQ JMS
I have Tomcat 7.0.42 and ActiveMQ 5.10 and have added the following resources to my context.xml file: <Resource auth="Container" brokerName="MyActiveMQBrokerXML" description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory" name="jms/ConnectionFactory" type="org.apache.activemq.ActiveMQConnectionFactory" useEmbeddedBroker="true" brokerURL="vm://localhost?brokerConfig=xbean:activemq.xml" /> When starting Tomcat via is built-in startup script I get the following in the console out-put. 2015-01-27 09:49:24,064 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.plist.PListStoreImpl- PListStore:[C:\tomcat\apache-tomcat-7.0.57\bin\acti vemq-data\MyActiveMQBroker\tmp_storage] started 2015-01-27 09:49:24,068 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Using Persistence Adapter: KahaDBPersistenceAdapter[C:\tomcat\ap ache-tomcat-7.0.57\bin\activemq-data\MyActiveMQBroker\KahaDB] 2015-01-27 09:49:24,471 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- KahaDB is version 5 2015-01-27 09:49:24,491 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- Recovering from the journal ... 2015-01-27 09:49:24,492 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- Recovery replayed 3 operations from the journal in 0.01 seconds. 2015-01-27 09:49:24,663 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Apache ActiveMQ 5.10.0 (MyActiveMQBroker, ID:Jacob-PC-55865-1422 373764525-0:1) is starting 2015-01-27 09:49:24,707 [localhost-startStop-1] INFO org.apache.activemq.broker.TransportConnector- Connector vm://localhost?brokerConfig=xbean:activemq.xml st arted 2015-01-27 09:49:24,707 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Apache ActiveMQ 5.10.0 (MyActiveMQBroker, ID:Jacob-PC-55865-1422 373764525-0:1) started 2015-01-27 09:49:24,708 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- For help or more information please see: http://activemq.apache. org 2015-01-27 09:49:24,711 [localhost-startStop-1] ERROR org.apache.activemq.broker.BrokerService- Memory Usage for the Broker (1024 mb) is more than the maximum a vailable for the JVM: 247 mb - resetting to 70% of maximum available: 173 mb 2015-01-27 09:49:24,728 [localhost-startStop-1] WARN org.apache.activemq.broker.BrokerRegistry- Broker localhost not started so using MyActiveMQBroker instead Jan 27, 2015 9:49:24 AM org.apache.catalina.startup.HostConfig deployDirectory It appears to me that tomcat is not looking for the activemq.xml file or is at least not using it. This exact configuration works if I start tomcat through eclipse, but that is not a viable option for a production system.
I found that if deploying into production you have to use the absolute path to the file to get Tomcat to find the activemq.xml file. Although using the relative path is supposed to work, I could never get it to. brokerURL="vm://localhost?brokerConfig=xbean:activemq.xml" Supposedly only works if you've added to 'activemq.xml' to the class path. Note the presence of 'file' in 'xbean:file:/some/path/activemq.xml'. <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter"> BrokerXmlConfig = xbean:file:/usr/share/apache-tomee-plus-8.0.0-M1/conf/activemq.xml ServerUrl = tcp://localhost:61616 </Resource>