Unexpected element when editing Standalone.xml - jboss

I'm trying ton configure a JMS MQueue on JBoss but
when I add an admin-object to the standalone.xml file :
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
<resource-adapters>
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>
...
<admin-objects>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/resources/jms/MyQueueName" use-java-context="true" pool-name="MyQueuePool">
<config-property name="baseQueueManagerName">
AAAA
</config-property>
<config-property name="baseQueueName">
BBBB
</config-property>
</admin-object>
</admin-objects>
I'm getting the following error :
Message: JBAS014789: Unexpected element '{urn:jboss:domain:resource-adapters:1.1}config-property' encountered
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[587,74]
Important points :
There are other admin-object already existing.
The XML is formatted correctly.
I'm getting this error when trying to start my server.
I'm using JBoss Entreprise Application Platform 6.3.3.GA
[587,74] references the admin-object I'm trying to add.

See Procedure 24.8. Deploy the Resource Adapter Manually:
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html/Administration_and_Configuration_Guide/Deploy_the_WebSphere_MQ_Resource_Adapter.html

I had the same "Unexpected element" problem by duplicating a "<connection-definition" block.
The issue was duplicate pool-name attribute in several blocks.
By changing one of the pool name it solves the problem.

Related

Jboss EAP 7.1, standalone.xml, using IBM MQ, no outbound / outgoing message: can urn:jboss:domain:resource-adapters-section be empty?

Jboss EAP 7.1, standalone.xml, using IBM MQ, no outbound / no outgoing message
Is it right that standalone.xml / urn:jboss:domain:resource-adapters-section can be empty, if my application has no outgoing messages (only reads messages from MQ) ?
Is it right that standalone.xml / urn:jboss:domain:resource-adapters-section can be empty, if my application has no outgoing messages (only reads messages from MQ) ?
-> No, wmq.jmsra.rar has to be configured:
<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
<resource-adapters>
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>LocalTransaction</transaction-support>
<connection-definitions>
</connection-definitions>
<admin-objects>
</admin-objects>
</resource-adapter>
</resource-adapters>
</subsystem>
Please try using the standalone-full.xml. The standalone.xml configuration does not include JMS messaging. The embedded JMS broker in JBoss can be disabled (if desired) by providing an empty configuration for ActiveMQ.

PostgreSQL as datasource for WSO2 EI and APIM+IS

I faced with problem when I've set up PostegreSQL as master datasource for clusterization.
Sometimes I see hanged sessions from WSO2 components which lock objects in database. Because of this arise inactive scheduled tasks, problems with auth, etc.
Could you help me please with configuration of PostgreSQL? I guess I have to specify some session timeout property or something other parameter.
Below part of configuration for connection to PostgreSQL:
<configuration>
<url>jdbc:postgresql://xxx.xxx.xxx.xxx:xxxx/yyyy_db</url>
<username>username</username>
<password>password</password>
<driverClassName>org.postgresql.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>true</defaultAutoCommit>
</configuration>
Kind Regards,
Kirill Levitskiy
I found the solution.
There should be changed 'testOnBorrow' to false. It is nessesary, because I've removed ValidationQuery and InitValidation options before, but forgot about testOnBorrow.
Database configuration should look like this:
<configuration>
<url>jdbc:postgresql://xxx.xxx.xxx.xxx:xxxx/yyyy_db</url>
<username>username</username>
<password>password</password>
<driverClassName>org.postgresql.Driver</driverClassName>
<maxWait>60000</maxWait>
<testOnBorrow>false</testOnBorrow>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>true</defaultAutoCommit>
</configuration>

Arquillian - Wildfly cannot deploy test.war (Could not connect to http-remoting://127.0.0.1:9990. The connection failed)

I am trying to run a simple JPA test (persist, read, JSON serialize) with Arquillian and Wildfly (8.1.0.Final and 8.2.0.Final tested) container, but until now I was not able to deploy test.war to the embedded server. The test runs with Jboss 7.1.1.Final container.
I have used arquillian-tutorial package given on Arquillian Getting Started Guide and Arquillian Example Project (google: github arquillian tutorial)
I have used Arquillian - Wildfly configuration given here
You can find a downloadable project package on google drive. You can see Maven and Arquillian configurations in that package. I have tried with or without Management realm credentials. On profile wildfy81-embedded-credentials (which is the default in the package), the build first unpacks wildfly package and then overwrites mgmt-users.properties and mgmt-groups.properties where admin user credentials and role is defined.
The exception is
INFO [org.jboss.ws.common.management] JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
INFO [org.jboss.as] JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
INFO [org.jboss.as] JBAS015951: Admin console listening on http://127.0.0.1:9990
INFO [org.jboss.as] JBAS015874: WildFly 8.1.0.Final "Kenny" started in 3401ms - Started 184 of 233 services (81 services are lazy, passive or on-demand)
INFO [org.xnio] XNIO version 3.2.0.Beta4
INFO [org.xnio.nio] XNIO NIO Implementation Version 3.2.0.Beta4
INFO [org.jboss.remoting] JBoss Remoting version 4.0.3.Final
ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 0a93e136 to /127.0.0.1:9990
ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 084cf5d6 to /127.0.0.1:9990
ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
WARN [org.jboss.as.arquillian.container.ArchiveDeployer] Cannot undeploy: test.war: org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper$ServerDeploymentException: java.lang.RuntimeException: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:109) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.arquillian.container.ArchiveDeployer.undeploy(ArchiveDeployer.java:55) [wildfly-arquillian-common-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.arquillian.container.CommonDeployableContainer.undeploy(CommonDeployableContainer.java:152) [wildfly-arquillian-common-8.1.0.Final.jar:8.1.0.Final]
Caused by: java.lang.RuntimeException: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:103) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:50) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:106) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
... 82 more
Caused by: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:117) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
Could you please help me to find the issue here?
Thanks in advance.
Edit 1
From arquillian.xml
<container qualifier="wildfly-embedded-credentials">
<configuration>
<property name="jbossHome">target/wildfly-8.1.0.Final</property>
<property name="modulePath">target/wildfly-8.1.0.Final/modules</property>
<property name="managementAddress">127.0.0.1</property>
<property name="managementPort">9990</property>
<property name="username">admin</property>
<property name="password">admin</property>
<property name="outputToConsole">true</property>
</configuration>
</container>
Deployment code:
#Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackage(MyBean.class.getPackage())
.addAsLibraries(new File("target/test-libs/commons-collections.jar"),
new File("target/test-libs/flexjson.jar"))
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsWebInfResource("jboss-ds.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
I wonder if this is because of URL
INFO Http management interface listening on http://127.0.0.1:9990/management
Edit 2
In the attached project (google drive link above), you will see there is another profile wildfy81-embedded in pom.xml with different arquillian configuration where I do not supply management address or username and password, only jbossHome and modulePath folders are defined. I get same exception (same port as well, 9990).
<container qualifier="wildfly-embedded">
<configuration>
<property name="jbossHome">target/wildfly-8.1.0.Final</property>
<property name="modulePath">target/wildfly-8.1.0.Final/modules</property>
<property name="outputToConsole">true</property>
</configuration>
</container>
On my last test, I have noticed one more exception cause (maybe because of java version or eclipse version that I am using at home). This was the exception at the bottom of other exception lines Could not connect to http-remoting://127.0.0.1:9990. The connection failed
Caused by: java.io.IOException: Invalid response
at org.xnio.http.HttpUpgradeParser.parseVersion(HttpUpgradeParser.java:150) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.http.HttpUpgradeParser.parse(HttpUpgradeParser.java:53) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:299) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:279) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:531) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:339) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:78) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:109) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
... 95 more
I have encountered this exception (invalid response part) a few times because of Nvidia drivers on windows platform. NVIDIA Network Service is using the same port WildFly/JBoss AS is using. If you are using windows with nvidia, then please go to local services and stop this service, then check if the tests work :).
A few comments:
I have tried jboss/wildfly embedded a million times and never gotten it to work. It seems to merge the classpath with your maven or IDE environment with Wildfly. As a result I always have to revert to -managed deployment. Your example project works for me in this sense when I change it to managed.
I would recommend upgrading Arquillian to the latest version: 1.1.9.Final. A lot of bug fixes happen between releases
Your DeploymentFactory is referring to jar files in the /target/ directory but those don't exist under a normal maven run. (maybe your IDE is putting them there?). A better way to get the jar files you need is to use the shrinkwrap maven resolver.
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<version>2.1.0</version>
<scope>test</scope>
<type>pom</type>
</dependency>
ConfigurableMavenResolverSystem mvnResolver = Maven.configureResolver();
PomEquippedResolveStage pers = mvnResolver.loadPomFromFile("pom.xml");
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackage(MyBean.class.getPackage())
.addAsLibraries(pers.resolve("commons-collections:commons-collections").withTransitivity().asFile())
.addAsLibraries(pers.resolve("net.sf.flexjson:flexjson").withTransitivity().asFile())
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsWebInfResource("jboss-ds.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
Changing management port in Wildfly worked for me:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<forkCount>1</forkCount>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<jboss.home>${project.basedir}/container/wildfly-8.1.0.Final</jboss.home>
<module.path>${project.basedir}/container/wildfly-8.1.0.Final/modules</module.path>
<jboss.http.port>8181</jboss.http.port>
<jboss.management.http.port>9090</jboss.management.http.port>
</systemPropertyVariables>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Remember to configure management port for Arquillian in arquillian.xml:
<container qualifier="wildfly-embedded" default="true">
<configuration>
<property name="managementPort">9090</property>
</configuration>
</container>

How to install WebSphere MQ resource adapter (wmq.jmsra.rar) in JBoss 6.2 EAP?

Design: I have a queue manager (EXAMPLE.QM) with Server-connection channel (EXAMPLE.CHANNEL), request queue (EXAMPLE.TEST.QUEUE), and reply queue (EXAMPLE.TEST.REPLY). My application will be using a message driven bean (MDB) to listen on EXAMPLE.TEST.QUEUE. When message arrives an instance of MDB is created and business logic is done which includes quering databases and then the reply is put on the EXAMPLE.TEST.REPLY queue. This is one transaction. In the event of crashes or any failure the exception will be caught and everything will be rolled back. I wanted to do the connection pooling for both MQ and Databases on the server side.
Setup: WebSphere MQ 7.0.1, JBoss 6.2 EAP, Java 1.7.0_21, IBM DB2 9.7
I obtained the wmq.jmsra.rar from the MQ_INSTALLATION_PATH\java\lib\jca
and I also got the com.ibm.mqetclient.jar
As per Redhat installation guide in order to support XATransactions I repackaged the wmq.jmsra.rar to include com.ibm.mqetclient.jar using command jar -uf wmq.jmsra.rar com.ibm.mqetclient.jar
You can skip the next paragraph and look at the xml snippet provided below for same information.
After doing so instead manually dropping the wmq.jmsra.rar into JBoss deployment directory I used the management console. I then went ahead and added in profile view under Resource adapters. I set Archive to wmq.jmsra.rar and TX to XATransaction. I then set the properties to the following: logWriterEnabled - true, maxConnections - 10, reconnectionRetryCount - 5, traceLevel - 6, traceEnabled - true, reconnectionRetryInterval - 300000, and connectionConcurrency - 5. After doing so I added a connection definition. I named it WMQ_ConnectionFactory, JNDI - java:jboss/WMQ_ConnectionFactory, and Connection Class - com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl. I set the properties as follow: port - 1414, hostName - localhost, channel - EXAMPLE.CHANNEL, transportType - BINDINGS_THEN_CLIENT, failIfQuiesce - true, and queueManager - EXAMPLE.QM. I then went on to add 2 Admin Objects. 1st I named EXAMPLE_REQ_Queue, JNDI - java:jboss/EXAMPLE_REQ_Queue, and Class name - com.ibm.mq.connector.outbound.MQQueueProxy. I have it the following properties: useJNDI - true, readAheadClosePolicy - ALL, startTimeout - 10000, destination - EXAMPLE.TEST.REQUEST, and destinationType - javax.jms.Queue. The 2nd admin object I named EXAMPLE_REP_Queue, JNDI - java:jboss/EXAMPLE_REP-Queue, and class name - com.ibm.mq.connector.outbound.MQQueueProxy. I gave it the following properties: failifQuiesce - true, baseQueueManagerName - EXAMPLE.QM, persistence - HIGH, encoding - NNN, baseQueueName - EXAMPLE.TEST.REPLY, targetClient - MQ, and expiry 300000.
Here is a snippet from the standalone.xml file
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
<resource-adapters>
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="logWriterEnabled">
true
</config-property>
<config-property name="maxConnections">
10
</config-property>
<config-property name="traceEnabled">
true
</config-property>
<config-property name="traceLevel">
6
</config-property>
<config-property name="reconnectionRetryCount">
5
</config-property>
<config-property name="reconnectionRetryInterval">
300000
</config-property>
<config-property name="connectionConcurrency">
5
</config-property>
<connection-definitions>
<connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:jboss/WMQ_ConnectionFacotry" enabled="true" pool-name="WMQ_ConnectionFactory">
<config-property name="port">
1414
</config-property>
<config-property name="hostName">
localhost
</config-property>
<config-property name="channel">
EXAMPLE.CHANNEL
</config-property>
<config-property name="failIfQuiesce">
true
</config-property>
<config-property name="transportType">
BINDINGS_THEN_CLIENT
</config-property>
<config-property name="queueManager">
EXAMPLE.QM
</config-property>
<security>
<application/>
</security>
<validation>
<background-validation>false</background-validation>
</validation>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/EXAMPLE_REQ_Queue" enabled="true" use-java-context="false" pool-name="EXAMPLE_REQ_Queue">
<config-property name="useJNDI">
true
</config-property>
<config-property name="startTimeout">
10000
</config-property>
<config-property name="destination">
EXAMPLE.TEST.REQUEST
</config-property>
<config-property name="readAheadClosePolicy">
ALL
</config-property>
</admin-object>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/EXAMPLE_REP_Queue" enabled="true" use-java-context="false" pool-name="EXAMPLE_REP_Queue">
<config-property name="failIfQuiesce">
true
</config-property>
<config-property name="baseQueueManagerName">
EXAMPLE.QM
</config-property>
<config-property name="persistence">
HIGH
</config-property>
<config-property name="encoding">
NNN
</config-property>
<config-property name="baseQueueName">
EXAMPLE.TEST.REPLY
</config-property>
<config-property name="targetClient">
MQ
</config-property>
<config-property name="expiry">
300000
</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
</subsystem>
The problem:
I get the following exception:
15:54:53,325 ERROR [org.jboss.msc.service.fail] (ResourceAdapterDeploymentService Thread Pool -- 1) MSC000001: Failed to start service jboss.ra.deployment."wmq.jmsra.rar": org.jboss.msc.service.StartException in service jboss.ra.deployment."wmq.jmsra.rar": JBAS010446: Failed to start RA deployment [wmq.jmsra]
at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$1.run(AbstractResourceAdapterDeploymentService.java:279) [jboss-as-connector-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final-redhat-1.jar:2.1.1.Final-redhat-1]
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.ibm.mq.connector.outbound.MQQueueProxy property: destination value: EXAMPLE.TEST.REQUEST
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.initAdminObject(AbstractResourceAdapterDeployer.java:907) [ironjacamar-deployers-common-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2382) [ironjacamar-deployers-common-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:185) [jboss-as-connector-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:106) [jboss-as-connector-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
15:54:53,343 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "wmq.jmsra.rar" (runtime-name : "wmq.jmsra.rar")
15:54:53,344 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.ra.deployment."wmq.jmsra.rar": org.jboss.msc.service.StartException in service jboss.ra.deployment."wmq.jmsra.rar": JBAS010446: Failed to start RA deployment [wmq.jmsra]
I guess the main part is Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.ibm.mq.connector.outbound.MQQueueProxy property: destination value: EXAMPLE.TEST.REQUEST Prior to this I had the same error and instead it said destinationType value: javax.jms.Queue. I then went ahead and removed that property and tried again and now I got this error. I am not certain what to do next.
Tutorials I have been following:
IBM - The WebSphere MQ resource adapter, Redhat Jboss Documentation - JCA Architecture Chapter, and Oracle - Message Driven Beans Java EE6 tutorial
My rep only allows me to post 2 links so the last two tutorials are not linked. Any help will be greatly appreciated.
I had slightly different issues deploying the MQ RAR to JBoss, but the solution and procedure outlined here should work for you. The specific files to look at are here. The files are iron-jacamar (the jboss as JCA provider) descriptors.
ra.xml: The WMQ RAR descriptor
ironjacamar.xml: Defines the WMQ connection parameters and admin objects.
I eventually ended up removing all the properties that were causing the exception to pop up. The properties I was trying to set were for inbound communication and it turns out this wasn't really the appropriate place to set them. Instead these should be set in the deployment descriptor of the Message Drive Bean (MDB). The file is called ejb-jar.xml. The content are as follow:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0"
>
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<ejb-class>com.foo.MyMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>
destinationType
</activation-config-property-name>
<activation-config-property-value>
javax.jms.Queue
</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>
destination
</activation-config-property-name>
<activation-config-property-value>
EXAMPLE.TEST.REQUEST
</activation-config-property-value>
</activation-config-property>
<!--SET OTHER PROPERTIES-->
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>
Hope this helps.

How do I configure IBM IMS connector in JBoss

I have the IMS Connector RAR file. Placed it inside JBOSS_INSTALL/server/default/deploy directory. Created a ims-ds.xml file and also placed in the same location. It appears as if it is deploying with this message:
21:40:02,800 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/ims225Connector.rar/
But then it gives the following error:
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.web.deployment:war=MHAccountDetailsAXIS.war,id=258164183
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: resource-ref: eis/IMSCZ has no valid JNDI binding. Check the jboss-web/resource-ref.)
ObjectName: jboss.jca:service=RARDeployment,name=IMS Connector for Java
State: NOTYETINSTALLED
Depends On Me:
jboss.jca:service=NoTxDS,name=eis/IMSCZ
Added jboss-web.xml that provides a mapping between JNDI and resource-ref name and finally got it going.
Was able to proceed further after correcting the IMS-ds.xml file. Next I got:
Unable to invoke setter method 'public void com.ibm.connector2.ims.ico.IMSManagedConnectionFactory.setMFSXMIRepositoryID(java.lang.String)' on object 'com.ibm.connector2.ims.ico.IMSManagedConnectionFactory#0'; - nested throwable: (java.lang.NoClassDefFoundError: org.eclipse.emf.ecore.resource.ResourceSet)
Next I download the eclipse jar files:org.eclipse.emf.common_2.4.0.v200808251517.jar and
org.eclipse.emf.ecore_2.4.1.v200808251517.jar and place in the same location as the IMS RAR and get past that error.
I see the JNDI being established:
12:02:28,082 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=eis/IMSCZ' to JNDI name 'java:eis/IMSCZ'
But then I get this error:
12:02:28,941 WARN [ServiceController] Problem starting service jboss.web.deployment:war=MHAccountDetailsAXIS.war,id=1972990498
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: resource-ref: eis/IMSCZ has no valid JNDI binding. Check the jboss-web/resource-ref.)
What else should I define to get this going?
I am able to configure IBM IMS TM Resource adapter on JBOSS. You can use one of the method in installation.
a. Using command prompt
b. Use web console
localhost:9990/console
c. Changing standalone.xml configuration file.
I used 3rd approach for other approach refer link
Configuring IMS TM resource adapter
Here are the steps to configure
Sptep 1: Download IMS TM RA using below link (You first need to register with IBM to be able to download adapter)
IMS TM Resource Adapter
Step 2: Extract the ico1322.zip (which you downloaded from step 1) in below folder.
jboss-as-7.1.1.Final\modules
Note: Some of the IMS adapter are already part of JBOSS installation, So please cross check whether the adapter is already available by default.
Step 3: Edit jboss-as-7.1.1.Final\standalone\configuration\standalone.xml file.
Edit below section and add following XML
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
Replace the place holders ${XXXXXXXXX}
<resource-adapters>
<resource-adapter id="ims1322.rar">
<archive>ims1321.rar</archive>
<!-- <module slot="main" id="com.ibm.connector2"/>-->
<transaction-support>LocalTransaction</transaction-support>
<config-property name="threadContextPropagationRequired">
false
</config-property>
<config-property name="adapterID">
IMSTM
</config-property>
<config-property name="enableHASupport">
true
</config-property>
<connection-definitions>
<connection-definition class-name="com.ibm.connector2.ims.ico.IMSManagedConnectionFactory" jndi-name="java:jboss/ims/DAS_IMS_CONNECTION_FACTORY" enabled="true" use-java-context="false" pool-name="java:jboss/ims/DAS_IMS_CONNECTION_FACTORY">
<config-property name="CM0Dedicated">
FALSE
</config-property>
<config-property name="SSLEnabled">
FALSE
</config-property>
<config-property name="SSLEncryptionType">
Weak
</config-property>
<config-property name="DataStoreName">
${XXXXXXXXX}
</config-property>
<config-property name="Password">
${XXXXXXXXX}
</config-property>
<config-property name="UserName">
${XXXXXXXXX}
</config-property>
<config-property name="PortNumber">
${XXXXXXXXX}
</config-property>
<config-property name="TraceLevel">
1
</config-property>
<config-property name="HostName">
${XXXXXXXXX}
</config-property>
<pool>
<min-pool-size>0</min-pool-size>
<max-pool-size>10</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<application/>
</security>
<validation>
<background-validation>false</background-validation>
</validation>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
Step 4:
<resource-adapter id="ims1322.rar">
The above tag should have the same rar(If you unzip the ims1322.zip file, you will find ims1322.rar file) which we had downloaded in step 1
Step 5: Start the server in standalone mode.
jboss-as-7.1.1.Final\bin>standalone.bat
Step 6: Check console whether the adapter is installed in profile --> Resource adapter link
localhost:9990/console