I am trying to add db2 xa datasource on JBoss.
JBoss 7.1,
Java 11.
This is part of my standalone-full-ha.xml
.
<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">
<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>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="db2jcc" module="com.ibm">
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
The directory structure is, standalone-modules-com-ibm-main
and I added jar files(db2jcc.jar, db2jcc_license_cu.jar, db2jcc_license_cisuz.jar) and module.xml in.
My module.xml is,
<?xml version="1.0" encoding="UTF-8"?>
<module name="com.ibm" xmlns="urn:jboss:module:1.1">
<resources>
<resource-root path="db2jcc.jar"/>
<resource-root path="db2jcc_license_cu.jar"/>
<resource-root path="db2jcc_license_cisuz.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
I tried,
.\\standalone.bat --server-config=standalone-full-ha.xml
, but it didn't change at all. It does not display it on Detected
tab on the console.
The log file shows,
1 INFO [org.jboss.as.server] (Thread-1) WFLYSRV0220: Server shutdown has been requested via an OS signal
2 [org.jboss.modcluster] (ServerService Thread Pool -- 35) MODCLUSTER000002: Initiating mod_cluster shutdown
3 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0010: Unbound data source [java:jboss/datasources/Ex ampleDS]
4 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0008: Undertow HTTPS listener https suspending
5 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 127.0.0.1: 8443
6 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000080: Disconnecting JGroups channel ejb
7 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000082: Stopping the RpcDispatcher for cha nnel ejb
8 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-8) ISPN000080: Disconnecting JGroups channel ejb
9 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000080: Disconnecting JGroups channel ejb
10 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-8) ISPN000082: Stopping the RpcDispatcher for cha nnel ejb
11 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000082: Stopping the RpcDispatcher for cha nnel ejb
12 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000080: Disconnecting JGroups channel ejb
13 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000082: Stopping the RpcDispatcher for cha nnel ejb
14 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0019: Host default-host stopping
15 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0004: Undertow 1.4.18.Final-redhat-2 stopping
16 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0019: Stopped Driver service with driver-name = h2
17 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment xxxxx.war (runtime-name: xxxxx.war) in 836ms
18 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: JBoss EAP 7.1.0.GA (WildFly Core 3.0.10.Final-redhat-1) stopped in 844ms
19 INFO [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final-redhat-1
20 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1
21 INFO [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final-redhat-1
22 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1
Can anyone point out what I did wrong?
First of all, check the official documenentation for this: https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/configuration_guide/datasource_management#example_ibm_db2_xa_datasource Secondly, Java 11 has been tested and supported ONLY with EAP 7.2! EAP 7.1 is supported with Java 1.8
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.