Jmeter2.9 with IBM MQ Not Connecting - jmeter

I am trying to use JMeter to work with IBM MQ.
As per the article I created the JNDI Bindings.
Now I am trying to connect JMeter using the JNDI Bindings. I give the QCF (Queue Connection Factory), but it is throwing an error
"Response message: java.lang.IllegalStateException: QueueConnectionFactory expected, but got javax.naming.Reference"
I searched around a lot, but didnt find anything. I looked at source code for Sampler and it looks like it is not able to find the Connection Factory from the JNDI.
Any idea what could i be missing? I Didnt know if the Configuration details would help, if it would i can provide that.
Thanks in Advance!

I was able to resolve this by copying all the MQ Jars (that comes with a complete Websphere MQ installation) and placing them into JMeter/Lib.
Now it works fine.
Thanks for anyone who viewed this. Hope my answer may provide some light to others who may encounter the same problem.

Related

Websphere Liberty Support for Work Manager

I am migrating application from WebSphere to liberty. It uses WebSphere work managers.
What is the use of work manager? Is this supported in liberty. What is the alternative in liberty
I would refer to the JavaDoc for details regarding work manager, but in short
The WorkManager is the abstraction for dispatching and monitoring asynchronous work and is a factory for asynchronous beans.
WorkManager is not part of WebSphere Liberty, but you can largely recreate the functionality in Liberty by configuring a concurrencyPolicy for its managed executors. You can find more information on that here
I would also recommend looking into the WebSphere Application Server Migration Toolkit as it might help you with the migration process. You can check out an example here.
The detailed help for the migration toolkit WorkManager rule recommends the concurrency utilities and gives several links to information including the one provided above. I am wondering if you are not seeing the detailed help when you use the tool? If you are using the Eclipse tool, open the help view (Window > Show view > Help), select the analysis result, and then click on Detailed help. If you are using the binary scanner, you can view the help directly from the HTML report. When I looked at the help file, I see that one of the links is broke, and I will open an issue for this. This article gives lots of examples on how to migrate to the concurrency utilities.

spring-boot fronted with Apache and AJP

There are a lot of documents out there explaining that you should use various other things (including simple proxying) but AJP is flexible and fast, and it really helps me integrate our SAML2 SSO without any of the webapps having to worry about any of that.
I am now trying to get a spring-boot application working the same way and having a really terrible time of it. The main symptom is "Bad Gateway" with error messages like:
[error] ajp_get_reply::jk_ajp_common.c (2126): (boot_worker_1) Tomcat
is down or refused connection. No response has been sent to the client
(yet)
[info] ajp_service::jk_ajp_common.c (2623): (boot_worker_1) sending
request to tomcat failed (recoverable), because of protocol error
(attempt=1)
[error] ajp_connection_tcp_get_message::jk_ajp_common.c (1289): wrong
message format 0x4854 from 127.0.0.1:8092
The last one seemed like a clue but I have not been able to find it.
The spring boot manual seems to suggest that if you only have a single connection you can set it up in application.properties - this is what I would ideally like to do, but I haven't been able to find any examples of this. From a distribution point of view, though, this seems ideal - publish a jar, give the user a documented properties file.
Since that didn't work, I tried doing it programmatically like this:
#Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
Connector ajpConnector = new Connector();
ajpConnector.setProtocol("AJP/1.3");
ajpConnector.setPort(8092);
ajpConnector.setSecure(false);
ajpConnector.setAllowTrace(false);
ajpConnector.setScheme("http");
tomcat.addAdditionalTomcatConnectors(ajpConnector);
return tomcat;
}
(I'd really rather not get into having to configure SSL for a localhost connection because it just complicates things, and once you spend time in the unsecured worlds of zookeeper, kafka, etc. you kind of give up after a while and figure your ESB is RFC1918 and firewalled anyway).
My questions are:
1) Can this all really be done with the properties file, and how?
2) With the above hard-coded configuration, I can telnet to port 8092 and issue GET requests ... I'm not sure why I can do this, because these GETs are http and I have configured the protocol to AJP/1.3 so I don't THINK it should work. But is that the problem Apache is having? I can't find any explanation of "wrong message format 0x4854" or error "-11."
--Chris
i had the same problem and resolve it by adding the connector implementation.
for example :
Connector ajpConnector = new Connector("org.apache.coyote.ajp.AjpNioProtocol");
list of available implementations :
https://tomcat.apache.org/tomcat-8.0-doc/config/ajp.html#Common_Attributes
(protocol)
or simply specify the protocol (AJP instead of HTTP):
Connector ajpConnector = new Connector("AJP/1.3");
For complete example to dynamically read values from properties file please see https://blog.swdev.ed.ac.uk/2015/06/24/adding-embedded-tomcat-ajp-support-to-a-spring-boot-application/

Connect to JMS from JSP

I am trying to connect to ActiveMQ using JSP. However, when i run the program, it gives me an exception of the type:
NoClassDefFoundError: javax/jms/Destination .
I am not sure why this is happening. I have included the activeMQ jar file in the build path.
Any help on this is appreciated.
Thank you.
Edit: Do I have to include anything in web.xml for the libraries to work? The error is actually from a class in the jar file and not from something i have coded. So I am really confused. I tried changing the jar file and included a newly downloaded one. But that didn't help.
If you have dependencies to ActiveMQ installed - you simply need the JMS interface.
Add the geronimo jms specs, that should solve your problem.

BIRT Integration - ODA Exception

My team is using BIRT to handle our clients business logic. Every so often we get an exception in our our logs:
18-Dec-2012 11:25:39.163 INFO
org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getDriverJndiPropertyFile
getDriverJndiPropertyFile() java.io.IOException: Unable to locate the installation path of
the ODA extension (org.eclipse.birt.runtime). The ODA consumer application must specify a
ResourceIdentifiers in the appContext to resolve the path.
We're not sure what causes this error and it seems to be working fine. We have a jdbc connection so we're not sure what would cause this. Any tips or info that we could use to help troubleshoot this issue would be greatly appreciated.
Copy
mysql-connector-java-5.0.8-bin.jar
to
WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_INSTALLED_VERSION\drivers
folder.

JMS message not getting added

I am facing a strange situation while using HornetQ.
My application architecture -
JMS provider : HornetQ (Standalone server, not used for anything else. I've created 2 queues on this server, say Q1 and Q2).
Producer : A web application deployed on a separate machine. This application creates instances of "ObjectMessage", passing a "Job" class instance as argument to the "ObjectMessage.setObject()" method and adds the message to Q1. Uses Spring JMS.
I also set a string property named "AGENT" in the message before adding it to the queue.
What's peculiar is that if I call ObjectMessage.setStringProperty("AGENT", null) or if I do not add the property to the message itself, the message does not get added to Q1. However, this does not happen on Q2, and I'm able to see the message in HornetQ's JMX console.
Is there some queue specific configuration that I should be looking out for?
Apologies for the loose wording - My team and I have been facing a tough time trying to fix this issue.
Thanks.
How are you creating the Producer? and How are you sending it?
It seems you're not committing on a transactional session?
I'm assuming you are using JMS, but I would need to see some code to help you in a better fashion. Usually the JBoss Forum is a better suitable place for discussions like this, since the SOF is not really a discussion forum.
I think the best would be you open a forum on JBoss (since it will be followed by a discussion) and provide the link here.

Resources