| Author |
Errors upon trying to use ActiveMQ
|
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Hey,
I'm trying to use ActiveMQ in our application.
I installed JMS plugin and ActiveMQ is running.
activemq-all.jar is under lib dir.
Here is resources.groovy:
I defined this service:
And the unit test:
But upon running the test, I got:
Cannot invoke method sendMessage() on null object
java.lang.NullPointerException: Cannot invoke method sendMessage() on null object
It looks that the service isn't get injected, right?
What is going wrong?
Platform:
JDK 6
Grails 1.2.1
ActiveMQ 5.3
JMS plugin 0.5
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
If it is a true Unit Test (not integration test) then you're not going to get services and jms stuff wired in. You'll either need to mock it or write an integration test.
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Indeed, thanks for help Gregg.
But what is really annoying to me:
1. Lack of good documentations.
In resources.groovy, jmsConnectionFactory should be defined but the http://www.grails.org/JMS+Plugin defined connectionFactory which isn't working.
2. Grails is about 70% available.
So slow to run, slow to run tests, slow to get plugins list.
Rails and Django really beat Grails hard in this aspect.
Any way, thanks for help and time.
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
One more thing :p
I defined this consumer:
But I got this exception:
javax.jms.InvalidDestinationException: Cannot determine response destination: Request message does not contain reply-to destination, and no default response destination set
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
Questions about plugins are often times better asked on the grails mailing list. That's where all the plugin devs typically hang out. I'd post this question to them. I personally can't help with this. I've only used the JMS plugin one time and as a test. Sorry.
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
John Todd wrote:Indeed, thanks for help Gregg.
But what is really annoying to me:
1. Lack of good documentations.
In resources.groovy, jmsConnectionFactory should be defined but the http://www.grails.org/JMS+Plugin defined connectionFactory which isn't working.
2. Grails is about 70% available.
So slow to run, slow to run tests, slow to get plugins list.
Rails and Django really beat Grails hard in this aspect.
Any way, thanks for help and time.
I doubt anyone is forcing you to use grails. If you like Rails and django better, well, use them.
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
No, no one is forcing me to use Grails.
I just wishing if Grails team overcome these issues (IMO).
Thanks again.
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
I contacted the plugin author and he helped me.
http://alkemist.github.com/grails-jms/manual/guide/5.%20Receiving%20Messages.html#5.1%20Service%20Listeners
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Thanks for posting a link to the solution.
|
 |
 |
|
|
subject: Errors upon trying to use ActiveMQ
|
|
|