I'm trying do setup the ActiveMQ on Wildfly 17.0.1.Final to use Postgresql as journal.
I have the datasource configured, and I'm using it in the application. However, when I configure ActiveMQ Artemis to use the Postgres datasource as a journal I'm having the problem described. Is there something missing in the setup?
Versions:
Wildfly 17.0.1.Final
Openjdk version "1.8.0_212"
PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit
If I use ExampleDS as a datasource journal my application starts, but for the Postgresql datasource I'm having the error.
The datasource subsystem:
<subsystem xmlns="urn:jboss:domain:datasources:5.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/PostgreDS" pool-name="PostgreDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:postgresql://localhost:5432/test</connection-url>
<driver>postgresql</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<flush-strategy>IdleConnections</flush-strategy>
</pool>
<security>
<user-name>test</user-name>
<password>test</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<background-validation>true</background-validation>
<background-validation-millis>60000</background-validation-millis>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
</validation>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
The activemq subsystem:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:7.0">
<server name="default">
<cluster password="${jboss.messaging.cluster.password:changeme}"/>
<journal datasource="PostgreDS" />
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/>
<discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="queueTESTE" entries="java:/jms/queue/queueTESTE"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
</server>
</subsystem>
10:02:58,137 WARN [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver] (ServerService Thread Pool -- 88)
SQL STATEMENTS:
CREATE TABLE large_messages (ID BIGSERIAL, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA OID, PRIMARY KEY(ID))
SQL EXCEPTIONS:
SQLState: 00000 ErrorCode: 0 Message: CREATE TABLE will create implicit sequence "large_messages_id_seq" for serial column "large_messages.id"
SQLState: 00000 ErrorCode: 0 Message: CREATE TABLE / PRIMARY KEY will create implicit index "large_messages_pkey" for table "large_messages"
10:02:58,257 WARN [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver] (ServerService Thread Pool -- 88)
SQL STATEMENTS:
CREATE TABLE page_store (ID BIGSERIAL, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA OID, PRIMARY KEY(ID))
SQL EXCEPTIONS:
SQLState: 00000 ErrorCode: 0 Message: CREATE TABLE will create implicit sequence "page_store_id_seq" for serial column "page_store.id"
SQLState: 00000 ErrorCode: 0 Message: CREATE TABLE / PRIMARY KEY will create implicit index "page_store_pkey" for table "page_store"
10:02:58,321 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 88) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
10:02:58,321 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 88) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
10:02:58,321 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 88) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
10:02:58,322 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 88) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
10:02:59,890 ERROR [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 88) AMQ224097: Failed to start server: java.lang.NoClassDefFoundError: org/postgresql/PGConnection
at org.apache.activemq.artemis.jdbc.store.file.PostgresSequentialSequentialFileDriver.createFile(PostgresSequentialSequentialFileDriver.java:71)
at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.openFile(JDBCSequentialFileFactoryDriver.java:114)
at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.load(JDBCSequentialFile.java:110)
at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.open(JDBCSequentialFile.java:104)
at org.apache.activemq.artemis.core.paging.impl.PagingStoreFactoryDatabase.reloadStores(PagingStoreFactoryDatabase.java:223)
at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.reloadStores(PagingManagerImpl.java:300)
at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.start(PagingManagerImpl.java:404)
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2757)
at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:64)
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:595)
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:522)
at org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:373)
at org.wildfly.extension.messaging.activemq.jms.JMSService.doStart(JMSService.java:206)
at org.wildfly.extension.messaging.activemq.jms.JMSService.access$000(JMSService.java:65)
at org.wildfly.extension.messaging.activemq.jms.JMSService$1.run(JMSService.java:100)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.ClassNotFoundException: org.postgresql.PGConnection from [Module "org.apache.activemq.artemis" version 2.8.1 from local module loader #10e92f8f (finder: local module finder #7ce3cb8e (roots: /home/rafael/dev/server/wildfly-17.0.1.Final/modules,/home/rafael/dev/server/wildfly-17.0.1.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 24 more
I can check that 4 tables were created in the public schema when I started Wildfly, but after that the error occurs.
I also added the postgres module to the Artemis module, and now the error is:
Caused by: java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8 cannot be cast to org.postgresql.PGConnection
I then added the <module name="org.jboss.ironjacamar.jdbcadapters" /> too, but the same error occurs.
Did you already try to use the regular (non XA) driver:
<driver name="postgresql" module="org.postgresql">
<driver-class>org.postgresql.Driver</driver-class>
</driver>
Related
I've been working with OpenMQ to ActiveMQ Artemis migration, and I'm having a bit of a problem getting my head around the JMS bridge concept. In OpenMQ JBoss's configuration we had JMS bridges but while migrating to ActiveMQ Artemis and re-making the standalone configuration I came to a problem where I can't get the JMS bridges working. Maybe there is a chance that someone could give me an example of how they are written properly or just do it for my configuration so I have a good example?
(Don't mind only 1 ip, I've changed everything since I can't share ip's etc.)
Broker is a remote Artemis cluster which has 2 queues - sync.Trigger.gg and dlq.sync.Trigger.gg. I want a JMS bridge on JBoss to consume the message from the remote ActiveMQ Artemis (which in configuration is 1.0.0.1:61616) and send that message in the local queue named SyncTriggerQueue, and if the consumption fails by my deployed App then another bridge should send it back to dlq.sync.Trigger.gg. I know that I need 2 bridges for this (i.e. 1 in bridge for reading and writing to inbuilt queue and 1 out bridge for sending it to the DLQ).
I have 2 bridges in the configuration, and I've put "??" in the values where I don't know what to put inside. Could someone maybe fill it with the values it has to have from the story I've told? I would really appreciate help from someone who works with/knows these configurations.
P.S.
I've achieved a working configuration without the JMS bridges, but our Architect wants to keep it the way it was - with the bridges, so that's why I'm fighting with this.
P.S.S.
I have no idea if the in-built ActiveMQ queues are written properly, so feel free to re-make them.
Since I can't find how to add files here (probably not possible) then I'll just add my whole configuration as a code block, with some deleted parts that seem unnecessary.
<subsystem xmlns="urn:jboss:domain:messaging-activemq:13.0">
<server name="default">
<cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<jgroups-broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/>
<jgroups-discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="SyncTriggerQueue" entries="java:jboss/exported/SyncTriggerQueue" durable="false"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
<connection-factory name="SyncTriggerConnectionFactory" entries="java:jboss/exported/jms/TriggerRes" connectors="http-connector" client-id="TriggerMDB1" scheduled-thread-pool-max-size="8" thread-pool-max-size="32" factory-type="XA_GENERIC"/>
</server>
<jms-bridge name="SyncTriggerInBridge"
module="org.apache.activemq.artemis"
add-messageID-in-header="true"
max-batch-time="500"
max-batch-size="10"
max-retries="-1"
failure-retry-interval="30000"
quality-of-service="ONCE_AND_ONLY_ONCE">
<source destination="??"
connection-factory="??"
user="appusertest"
password="appusertest">
<source-context>
<property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="??"/>
</source-context>
</source>
<target destination="??"
connection-factory="??">
</target>
</jms-bridge>
<jms-bridge name="SyncTriggerOutBridge"
module="org.apache.activemq.artemis"
add-messageID-in-header="true"
max-batch-time="500"
max-batch-size="10"
max-retries="-1"
failure-retry-interval="30000"
quality-of-service="ONCE_AND_ONLY_ONCE">
<source destination="??"
connection-factory="??">
</source>
<target destination="??"
connection-factory="??"
user="appusertest"
password="appusertest">
<target-context>
<property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="??"/>
</target-context>
</target>
</jms-bridge>
</subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:6.0">
<resource-adapters>
<resource-adapter id="artemis-ra.rar">
<module slot="main" id="gg.go.artemis.rar" />
<transaction-support>XATransaction</transaction-support>
<config-property name="CallFailoverTimeout">30000</config-property>
<config-property name="CallTimeout">30000</config-property>
<config-property name="ClientFailureCheckPeriod">30000</config-property>
<config-property name="ConnectionLoadBalancingPolicyClassName">gg.go.artemis.loadbalancing.OrderedConnectionLoadBalancingPolicyLoggingImpl</config-property>
<config-property name="ConnectionParameters">host=1.0.0.1;port=61616</config-property>
<config-property name="ConnectorClassName">org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory</config-property>
<config-property name="ConsumerMaxRate">1</config-property>
<config-property name="HA">true</config-property>
<config-property name="InitialConnectAttempts">9</config-property>
<config-property name="MinLargeMessageSize">5120000</config-property>
<config-property name="Password">admin</config-property>
<config-property name="ReconnectAttempts">-1</config-property>
<config-property name="RetryInterval">-1</config-property>
<config-property name="ThreadPoolMaxSize">10</config-property>
<config-property name="UserName">admin</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory" jndi-name="java:jboss/DefaultArtemisConnectionFactory" enabled="true" connectable="true" pool-name="DefaultArtemisConnectionFactory" use-java-context="true" use-ccm="true" />
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
jms-bridge TRACE logs
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$SourceReceiver#6c989ca received message ActiveMQMessage[null]:PERSISTENT/ClientMessageImpl[messageID=2145, durable=true, address=rekku.SyncTrigger.virre,userID=null,properties=TypedProperties[_AMQ_ROUTING_TYPE=1]]
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$SourceReceiver#6c989ca rescheduled batchExpiryTime to 1660722704869
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 woke up
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 waited enough
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 waiting for 500
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 woke up
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 waited enough
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#62859582 waiting for 500
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#57e98840 woke up
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#57e98840 waited enough
TRACE ... org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker#57e98840 got some messages so sending batch
TRACE ... Sending batch of 1 messages
TRACE ... Adding old message id in Message header
TRACE ... Sending message ActiveMQMessage[null]:PERSISTENT/ClientMessageImpl[messageID=2145, durable=true, address=sync.Trigger.gg,userID=null,properties=TypedProperties[_AMQ_ROUTING_TYPE=1,AMQ_BRIDGE_MSG_ID_LIST=NULL-value,JMSXDeliveryCount=1]]
TRACE ... Sent message ActiveMQMessage[ID:70bf4ffb-1e01-11ed-a09e-00059a3c7a00]:PERSISTENT/ClientMessageImpl[messageID=2145, durable=true, address=jms.queue.SyncTriggerQueue,userID=70bf4ffb-1e01-11ed-a09e-00059a3c7a00,properties=TypedProperties[__AMQ_CID=54a01028-1e01-11ed-a09e-00059a3c7a00,_AMQ_ROUTING_TYPE=1,AMQ_BRIDGE_MSG_ID_LIST=NULL-value,JMSXDeliveryCount=1]]
TRACE ... Delisting resources from tx
TRACE ... Delisted resources from tx
TRACE ... Committing JTA transaction
TRACE ... Committed JTA transaction
TRACE ... Starting JTA transaction
TRACE ... Enlisted resources in tx
TRACE ... Enlisting resources in tx
TRACE ... Started JTA transaction
Couple of things:
The bridge shouldn't use the ActiveMQ Artemis JCA RA so all the <resource-adapter> configuration is irrelevant. Therefore, I will not include it in my example.
There must be another local queue which the bridge can use to send the message back to the remote dlq.sync.Trigger.gg. This is the queue your application should use as a DLQ. I'll call this queue DlqSyncTriggerQueue. If you want the broker to handle sending failed messages to DlqSyncTriggerQueue then you should create a new address setting, e.g.:
<address-setting name="jms.queue.SyncTriggerQueue" dead-letter-address="jms.queue.DlqSyncTriggerQueue"/>
This assumes your application will be consuming messages from SyncTriggerQueue.
Here's the rest of the relevant configuration:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:13.0">
<server name="default">
<cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<jgroups-broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/>
<jgroups-discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="SyncTriggerQueue" entries="java:/SyncTriggerQueue" durable="false"/>
<jms-queue name="DlqSyncTriggerQueue" entries="java:/DlqSyncTriggerQueue" durable="false"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
</server>
<jms-bridge name="SyncTriggerInBridge"
module="org.apache.activemq.artemis"
add-messageID-in-header="true"
max-batch-time="500"
max-batch-size="10"
max-retries="-1"
failure-retry-interval="30000"
quality-of-service="ONCE_AND_ONLY_ONCE">
<source destination="sync.Trigger.gg"
connection-factory="ConnectionFactory"
user="appusertest"
password="appusertest">
<source-context>
<property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="tcp://1.0.0.1:61616"/>
<property name="queue.sync.Trigger.gg" value="sync.Trigger.gg"/>
</source-context>
</source>
<target destination="SyncTriggerQueue"
connection-factory="java:/ConnectionFactory">
</target>
</jms-bridge>
<jms-bridge name="SyncTriggerOutBridge"
module="org.apache.activemq.artemis"
add-messageID-in-header="true"
max-batch-time="500"
max-batch-size="10"
max-retries="-1"
failure-retry-interval="30000"
quality-of-service="ONCE_AND_ONLY_ONCE">
<source destination="DlqSyncTriggerQueue"
connection-factory="java:/ConnectionFactory">
</source>
<target destination="dlq.sync.Trigger.gg"
connection-factory="ConnectionFactory"
user="appusertest"
password="appusertest">
<target-context>
<property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="tcp://1.0.0.1:61616"/>
<property name="queue.dlq.sync.Trigger.gg" value="dlq.sync.Trigger.gg"/>
</target-context>
</target>
</jms-bridge>
</subsystem>
On the remote ActiveMQ Artemis cluster you may need to add anycastPrefix=jms.queue.;multicastPrefix=jms.topic. to the configuration of your acceptor which is listening on 61616.
I'm trying to set up a MySQL connection using Jboss. For this I take the JTA approach. I have adjusted everything so far, but always get an error when deploying:
My standalone.xml looks like this:
<datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:mysql://localhost:3306/jpa?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC</connection-url>
<driver-class>com.mysql.cj.jdbc.Driver</driver-class>
<driver>mysql</driver>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
<background-validation>true</background-validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
</validation>
</datasource>
The persistence.xml has the following structure:
<persistence-unit name="TestJPA" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/MySqlDS</jta-data-source>
<class>de.jpa.test.Kunden</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="hibernate.show_sql" value="false"></property>
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true" />
<property name="hibernate.cache.use_minimal_puts" value="true"/>
</properties>
</persistence-unit>
And here the resulting error:
09:11:56,124 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "TestJPA.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.MySqlDS"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.persistenceunit.\"TestJPA.war#TestJPA\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.MySqlDS]",
"jboss.persistenceunit.\"TestJPA.war#TestJPA\" is missing [jboss.naming.context.java.jboss.datasources.MySqlDS]"
]
}
EDIT
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql">
<driver-class>com.mysql.cj.jdbc.Driver</driver-class>
<xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
I tried to configure keycloak server with my postgresql db. After many tries with a lot of configs I decided to ask the question.
I have the next configurations:
module.xml which is located in keycloak/modules/org/postgresql/main
Also in that directory I put jdbc-driver with name 'postgresql-42.2.16.jar'
<?xml version="1.0" ?>
<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
<resources>
<resource-root path="postgresql-42.2.16.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
standalone.xml which is located in keycloak/standalone/configuration
In that xml I configured
drivers:
<drivers>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
datasources:
<datasources>
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
<connection-url>jdbc:postgres://192.168.99.100:5432/keycloak</connection-url>
<driver>postgresql</driver>
<pool>
<max-pool-size>20</max-pool-size>
</pool>
<security>
<user-name>keycloak</user-name>
<password>password</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
...
</datasources>
keycloak server config:
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
<spi name="connectionsJpa">
<provider name="default" enabled="true">
<properties>
<property name="dataSource" value="java:jboss/datasources/KeycloakDS"/>
<property name="initializeEmpty" value="false"/>
<property name="migrationStrategy" value="manual"/>
<property name="migrationExport" value="${jboss.home.dir}/keycloak-database-update.sql"/>
</properties>
</provider>
</spi>
</subsystem>
And when I'm trying to start my keycloak server I got the exception:
17:56:19,859 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread)
WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "KeycloakDS")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.postgresql"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/KeycloakDS is missing [jboss.jdbc-
driver.postgresql]",
"org.wildfly.data-source.KeycloakDS is missing [jboss.jdbc-driver.postgresql]"
]
}
17:56:19,860 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread)
WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "KeycloakDS")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.jdbc-driver.postgresql",
"jboss.jdbc-driver.postgresql"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/KeycloakDS is missing [jboss.jdbc-
driver.postgresql]",
"org.wildfly.data-source.KeycloakDS is missing [jboss.jdbc-driver.postgresql]",
"org.wildfly.data-source.KeycloakDS is missing [jboss.jdbc-driver.postgresql]"
]
}
It's looks like I configured my datasource in wrong way, but I can't find the error. I checked this check list and it doesn't resolve my issue.
Could you please retry with the following connection string:
jdbc:postgresql://192.168.99.100:5432/keycloak
instead of
jdbc:postgres://192.168.99.100:5432/keycloak
Also, consider letting the SPI/connectionsJpa block at defaults (I believe in particular that initializeEmpty should be true) and I don't remember that I had to add/modify this block, so please double-check.
You may also disable or comment the ExampleDS (h2) dataSource.
I cannot configure Wildfly 14.0.1.Final to connect to the remote Artemis server. Here is my standalone.xml:
<server name="default">
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<remote-connector name="remote-artemis" socket-binding="remote-artemis"/>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA" connectors="in-vm" transaction="xa"/>
<pooled-connection-factory name="remote-artemis" entries="java:/jms/remoteCF" connectors="remote-artemis" user="admin" password="admin"/>
</server>
And here is my MDB:
#ResourceAdapter("remote-artemis")
#MessageDriven(name = "ExampleMdb", activationConfig = {
#ActivationConfigProperty(propertyName = "destination", propertyValue = "DMSQueue"),
#ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
#ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
#ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
public class ExampleMdb implements MessageListener {}
I have DMSQueue in DMSQueue address on Artemis server.
This is what I get in Wildfly console: AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter#9382da9c destination=queues/DMSQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=admin password=**** maxSession=15)
and
AMQ151004: Instantiating javax.jms.Queue "DMSQueue" directly since UseJNDI=false.
What I can see in Artemis web console is that there are two connections and one session from Wildfly and one registered producer, but no consumers. I also tried configuring this with Thorntail but got the same results.
I'm looking at the documentation here: https://docs.wildfly.org/14/Admin_Guide.html#Messaging_Connect_a_pooled-connection-factory_to_a_Remote_Artemis_Server
Assuming you have the remote-artemis socket binding defined (you don't show that), it seems you have to configure the MDB to use the specific resource adapter by annotating it with #org.jboss.ejb3.annotation.ResourceAdapter("remote-artemis").
If the MDB isn't configured to use a specific resource adapter, either by this annotation or by some other means, the default resource adapter configured in the ejb3 subsystem will be used.
The rest of your configuration looks good (according to the docs, I'm no expert on messaging :-) ).
I am trying to start JBOSS from eclipse. After some time eclipse crashes without showing any error. JBOSS server.log file has following contents:
22:01:29,880 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 25) JBAS016200: Activating ConfigAdmin Subsystem
22:01:30,073 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 37) JBAS011940: Activating OSGi Subsystem
22:01:30,088 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension
22:01:30,114 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013101: Activating Security Subsystem
22:01:30,117 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 46) JBAS014612: Operation ("add") failed - address: ([("subsystem" => "webservices")]): java.lang.NoSuchMethodError: org.jboss.as.controller.OperationContext.readResourceFromRoot(Lorg/jboss/as/controller/PathAddress;)Lorg/jboss/as/controller/registry/Resource;
at org.jboss.as.webservices.dmr.WSSubsystemAdd.performBoottime(WSSubsystemAdd.java:132)
at org.jboss.as.controller.AbstractBoottimeAddStepHandler.performRuntime(AbstractBoottimeAddStepHandler.java:57) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:311) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_30]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_30]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
22:01:30,140 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activating Infinispan subsystem.
22:01:30,143 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
22:01:30,453 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.7.Final)
22:01:30,609 INFO [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
22:01:30,610 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.6.final
22:01:30,649 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]
22:01:30,712 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.0.Final
22:01:30,991 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
JBOSS boot.log file has following contents:
22:10:52,324 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
22:10:52,544 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
22:10:52,619 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final "Thunder" starting
22:10:52,621 DEBUG [org.jboss.as.config] Configured system properties:
awt.toolkit = sun.awt.windows.WToolkit
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.headless = true
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = D:\jboss-as-7.1.0.Final\jboss-modules.jar
java.class.version = 50.0
java.endorsed.dirs = C:\Program Files\Java\jre6\lib\endorsed
java.ext.dirs = C:\Program Files\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home = C:\Program Files\Java\jre6
java.io.tmpdir = C:\Users\176893\AppData\Local\Temp\
java.library.path = C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;native;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\RSA SecurID Token Common;D:\app\localadmin\product\11.1.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Imaging\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_32\bin;D:\apache-ant-1.8.4\bin;D:\eclipse;;.
java.net.preferIPv4Stack = true
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.6.0_30-b12
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.6
java.util.logging.manager = org.jboss.logmanager.LogManager
java.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.6.0_30
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 20.5-b03
javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory
jboss.bind.address = localhost
jboss.home.dir = D:\jboss-as-7.1.0.Final
jboss.host.name = lt005487
jboss.modules.dir = D:\jboss-as-7.1.0.Final\modules
jboss.modules.system.pkgs = org.jboss.byteman
jboss.node.name = lt005487
jboss.qualified.host.name = lt005487
jboss.server.base.dir = D:\jboss-as-7.1.0.Final\standalone
jboss.server.config.dir = D:\jboss-as-7.1.0.Final\standalone\configuration
jboss.server.data.dir = D:\jboss-as-7.1.0.Final\standalone\data
jboss.server.deploy.dir = D:\jboss-as-7.1.0.Final\standalone\data\content
jboss.server.log.dir = D:\jboss-as-7.1.0.Final\standalone\log
jboss.server.name = lt005487
jboss.server.temp.dir = D:\jboss-as-7.1.0.Final\standalone\tmp
line.separator =
logging.configuration = file:/D:/jboss-as-7.1.0.Final/standalone/configuration/logging.properties
module.path = D:/jboss-as-7.1.0.Final/modules
org.jboss.boot.log.file = D:/jboss-as-7.1.0.Final/standalone/log/boot.log
org.jboss.resolver.warning = true
org.xml.sax.driver = __redirected.__XMLReaderFactory
os.arch = x86
os.name = Windows 7
os.version = 6.1
path.separator = ;
sun.arch.data.model = 32
sun.boot.class.path = C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes
sun.boot.library.path = C:\Program Files\Java\jre6\bin
sun.cpu.endian = little
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = org.jboss.modules.Main -mp D:/jboss-as-7.1.0.Final/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost --server-config=standalone.xml
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = Cp1252
sun.management.compiler = HotSpot Client Compiler
sun.os.patch.level = Service Pack 1
sun.rmi.dgc.client.gcInterval = 3600000
sun.rmi.dgc.server.gcInterval = 3600000
user.country = US
user.dir = D:\jboss-as-7.1.0.Final\bin
user.home = C:\Users\176893
user.language = en
user.name = 176893
user.timezone = Europe/Berlin
user.variant =
22:10:52,700 DEBUG [org.jboss.as.config] VM Arguments: -Xms64m -Xmx1024m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=D:/jboss-as-7.1.0.Final/standalone/log/boot.log -Dlogging.configuration=file:/D:/jboss-as-7.1.0.Final/standalone/configuration/logging.properties -Djboss.home.dir=D:/jboss-as-7.1.0.Final -Dfile.encoding=Cp1252
22:10:53,828 INFO [org.xnio] XNIO Version 3.0.3.GA
22:10:53,828 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
22:10:53,841 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
22:10:53,850 INFO [org.jboss.remoting] JBoss Remoting version 3.2.2.GA
22:10:53,878 INFO [org.jboss.as.configadmin] JBAS016200: Activating ConfigAdmin Subsystem
22:10:53,887 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
::::: Edit Start ::::
standalone.xml file has following contents:
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.configadmin"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jdr"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
<extension module="org.jboss.as.mail"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.osgi"/>
<extension module="org.jboss.as.pojo"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.sar"/>
<extension module="org.jboss.as.security"/>
<extension module="org.jboss.as.threads"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.web"/>
<extension module="org.jboss.as.webservices"/>
<extension module="org.jboss.as.weld"/>
</extensions>
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
<properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
<security-realm name="ApplicationRealm">
<authentication>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
</security-realms>
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket-binding native="management-native"/>
</native-interface>
<http-interface security-realm="ManagementRealm">
<socket-binding http="management-http"/>
</http-interface>
</management-interfaces>
</management>
<profile>
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
<subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
<!--<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>-->
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:1.0"/>
<subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
</caches>
<passivation-stores>
<file-passivation-store name="file"/>
</passivation-stores>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default">
<data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
</timer-service>
<remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
<thread-pool name="default">
<max-threads count="10"/>
<keepalive-time time="100" unit="milliseconds"/>
</thread-pool>
</thread-pools>
</subsystem>
<subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">
<cache-container name="hibernate" default-cache="local-query">
<local-cache name="entity">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="local-query">
<transaction mode="NONE"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="timestamps">
<transaction mode="NONE"/>
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="false"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
<subsystem xmlns="urn:jboss:domain:jmx:1.1">
<show-model value="true"/>
<remoting-connector/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:mail:1.0">
<mail-session jndi-name="java:jboss/mail/Default">
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.1"/>
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
<properties>
<!-- Specifies the beginning start level of the framework -->
<property name="org.osgi.framework.startlevel.beginning">1</property>
</properties>
<capabilities>
<!-- modules registered with the OSGi layer on startup -->
<capability name="javax.servlet.api:v25"/>
<capability name="javax.transaction.api"/>
<!-- bundles started in startlevel 1 -->
<capability name="org.apache.felix.log" startlevel="1"/>
<capability name="org.jboss.osgi.logging" startlevel="1"/>
<capability name="org.apache.felix.configadmin" startlevel="1"/>
<capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
</capabilities>
</subsystem>
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
<subsystem xmlns="urn:jboss:domain:security:1.1">
<security-domains>
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="RealmUsersRoles" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
<module-option name="realm" value="ApplicationRealm"/>
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
</authentication>
</security-domain>
<security-domain name="jboss-web-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
<security-domain name="jboss-ejb-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:threads:1.1"/>
<subsystem xmlns="urn:jboss:domain:transactions:1.1">
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="300"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
<subsystem xmlns="urn:jboss:domain:webservices:1.1">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<endpoint-config name="Standard-Endpoint-Config"/>
<endpoint-config name="Recording-Endpoint-Config">
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
</pre-handler-chain>
</endpoint-config>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
:::: Edit End ::::
I am using Eclipse Juno. OS is windows 7. JDK is 1.6.032. JBOSS is jboss-as-7.1.0.Final. JBOSS is plased at location "D:\jboss-as-7.1.0.Final".
Please let me know, what is wrong here.
::::::::::::: EDIT 4 Sept 2013 :::::::::::::::::
What I observed was JBOSS crashes only after APACHE CXF is installed on my JBOSS APP. Without APACHE CXF, JBOSS starts from eclipse. To install APACHE CXF, I modified ant.properties file for CXF with following two properties:
jboss712.home=D:\\jboss-as-7.1.0.Final
jbossws.integration.target=jboss712
And I executed ANT target:
ant -Dspring=true deploy-jboss712
Could it be the problem that I have JBOSS 7.1.0 and I am telling APACHE CXF that its JBOSS 7.1.2?
Version of APACHE CFX is jbossws-cxf-4.2.0.Final. Please let me know if you require more information.