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
Related
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.
I have application running in Websphere Liberty and uses DB2 in Z/oS. I have set the db2 driver proerties in DB2JCCConfiguration.properties .How can make sure that the server has picked up properties I have set .I am not sure how to verify the trace to see if the properties are applied to server
To configure a datasource (for any backend DB) with Liberty, you can add configuration like this to your server.xml:
<featureManager>
<feature>jdbc-4.2</feature>
</featureManager>
<library id="driver-library">
<fileset dir="/path/to/driver/dir" includes="*.jar"/>
</library>
<dataSource id="DefaultDataSource" jndiName="jdbc/myDB">
<jdbcDriver libraryRef="driver-library"/>
<properties.db2.jcc serverName="example.db.hostname.com" portNumber="50000"
databaseName="myDB"
user="exampleUser"
password="examplePassword"
currentSchema="xyz"
fullyMaterializeInputStreams="true"/>
</dataSource>
To test if your configuration is correct and that your Liberty server can connect to your DB2 database, add the following configuration:
<featureManager>
<feature>appSecurity-3.0</feature>
<feature>restConnector-2.0</feature>
<feature>jdbc-4.2</feature>
</featureManager>
<!-- Any security mechanism can be used, <quickStartSecurity> is the simplest -->
<quickStartSecurity userName="admin" userPassword="admin"/>
And then go to: https://localhost:9443/ibm/api/validation/dataSource/DefaultDataSource
(this assumes your <dataSource> id is DefaultDataSource)
For more info, see this cheat sheet: https://aguibert.github.io/openliberty-cheat-sheet/#_ibm_db2
I can't find informations if it's possible and if so then how to expose configured executor as JNDI resource.
this is my configuration inside standalone.xml
<subsystem xmlns="urn:jboss:domain:threads:1.1">
<thread-factory name="spring-async-factory" group-name="spring-thread-pool" thread-name-pattern="spring-async-%t" priority="1"/>
<blocking-bounded-queue-thread-pool name="spring-async-tp">
<core-threads count="5"/>
<queue-length count="100"/>
<max-threads count="10"/>
<keepalive-time time="20" unit="seconds"/>
<thread-factory name="spring-async-factory"/>
</blocking-bounded-queue-thread-pool>
</subsystem>
I've tried it to access with java:global/threads/spring-async-tp, java:comp/threads/spring-async-tp but that wasn't found. So if it's possible how can I found it via JNDI?
The threads subsystem is deprecated and has been removed in JBoss EAP 7.0. There is also not a way to expose the factory via JNDI. It was the intention of the subsystem to be a reference point for other subsystems to point to a thread factory. It was never the intention that these factories get used in deployments.
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.
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.