cpiotr / blog

Source code for blog entries
Apache License 2.0
7 stars 12 forks source link

connectionFactory bean can not be instantiated #4

Closed hormelspammer closed 7 years ago

hormelspammer commented 7 years ago

Piotr,

I read your page "Connecting to IBM MQ with Spring Boot and JMS" and liked how it was configured and so I implemented mine the same way. But I'm getting a error that the connectionFactory bean can not be instantiated. When doing 'factory = new MQConnectionFactory()', it keeps coming back as null.

Any ideas as to what I'm missing?

Thanks in advance!

cpiotr commented 7 years ago

@hormelspammer: If calling a constructor factory = new MQConnectionFactory() comes back as null, it seems that there's an exception thrown somewhere, which is probably ignored. Are you sure you have MQ jars on your classpath? Have you tried debugging your code?

hormelspammer commented 7 years ago

@cpiotr: I forgot to update this once I figured out what was going on. I had included some of the MQ jars to resolve the 'classdefnotfound' errors but was still getting the null. Once I included all the MQ jars, it worked fine. So apparently it referenced something in the other jars but didn't throw a 'classdefnotfound' error or it was ignored like you mentioned.

Thanks for your response!