heroku login failing on Mac
Just getting started with Heroku, I installed toolbelt on my Mac with the installer. When I run heroku login, I get the following: $ heroku login /usr/local/heroku/lib/heroku/updater.rb:33: warning: parenthesize argument(s) for future version /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:79:in `readto': undefined local variable or method `count' for []:Array (NameError) from /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:85:in `parse' from /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:20:in `read' from /usr/local/heroku/lib/heroku/auth.rb:92:in `netrc' from /usr/local/heroku/lib/heroku/auth.rb:66:in `delete_credentials' from /usr/local/heroku/lib/heroku/auth.rb:21:in `login' from /usr/local/heroku/lib/heroku/command/auth.rb:12:in `login' from /usr/local/heroku/lib/heroku/command.rb:148:in `send' from /usr/local/heroku/lib/heroku/command.rb:148:in `run' from /usr/local/heroku/lib/heroku/cli.rb:9:in `start' from /usr/bin/heroku:28 $ Any hints about what I need to do? Thanks. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
worker.js example
okay a total noob here. I have a webserver running on nodejs. It itnt finished yet but at the moment I would like to add a worker process to update the database, send out http requests etc. Is there documentation/example available how to do this in nodejs/javascript? I cant find any examples please help -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Heroku API authentication using email and password
According to the Heroku API docs https://api-docs.heroku.com/, authentication is done using the User's API Key as password, and a blank username, through HTTP Basic authentication. However, i found that authentication works even if I use the account email and password. I just wanted to check whether this is 'allowed'. The command-line tool useshttps://devcenter.heroku.com/articles/authenticationthis method, but I want to use it in an iOS app i'm developing. Using the email and password for login would be preferred, as it is much easier to input than the API key. Thanks, Arvindh -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/r7q3XH-5gOwJ. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
set process.env.PORT
I have a server that listens with socket.io on process.env.port , but the port changes every time, so how can I get the client to connect to it? Is there a way to pin the server port to an unchanging number? I tried heroku config:add PORT=12345 but that doesn't seem to have any effect. TIA -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/K8Fh_clPAO8J. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Install of toolbelt on Unbuntu 10.04 Lucid fails
Following the steps at https://toolbelt.herokuapp.com/linux I get the following after running wget -qO- https://toolbelt.heroku.com/install.sh | sh W: Failed to fetch http://toolbelt.herokuapp.com/ubuntu/./Packages.bz2 Hash Sum mismatch W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages.bz2 Hash Sum mismatch When I try downloading it directly, I get the same error. Was there a change to the package recently where the MD5 sum was not updated? ++Greg -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Progstr and Logentries addons
Hi Michel, On 04/15/2012 09:57 PM, Michel Pigassou wrote: Hi. Does anyone use the Progstr addon? All log timestamp do not match the Heroku logs (whereas the ones from Logentries do). What solution between the two are you using? I wasn't aware of the timestamp mismatch problems with the Progstr add-on, but I think I just fixed them. Thanks for your report! If you have other problems with the add-on, you can always reach us at supp...@progstr.com. -- Hristo Deshev Developer, Progstr.com -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: heroku question
I answered your question on StackOverflow: http://stackoverflow.com/questions/10169419/heroku-sample-application-error/10172856#10172856 On 04/16/2012 02:48 AM, srinivas aithagani wrote: I am doing the sample application here https://github.com/heroku/devcenter-embedded-tomcat I have run the application using 'mvn package' and the build is success..but when am running the script using sh target/bin/webapp then am getting the below error.Sir please help..thanks C:\Documents and Settings\srinivasa\Documents\workspace-sts-2.9.0.RELEASE\sriniv assh target/bin/webapp Exception in thread main java.lang.NoClassDefFoundError: launch/Main Caused by: java.lang.ClassNotFoundException: launch.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: launch.Main. Program will exit. -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/PH1ldUM7Su4J. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Can't find DATABASE_URL using Spring context
That is very odd. Can you file a support request? -James On 04/15/2012 06:04 AM, Andrew Clifford wrote: Sorry, the app starts automatically at the end of git push heroku master. At runtime, I am showing the env.* variables available to my app. I added a spring bean that logs env variables on Spring context init. On Apr 14, 11:24 pm, James Wardj...@heroku.com wrote: Right now your env vars are not available at build time (on git push). They are only available at runtime. Why do you need the DATABASE_URL at build time? -James -Original Message- From: Andrew Cliffordbashb...@gmail.com Sender: heroku@googlegroups.com Date: Sat, 14 Apr 2012 08:15:16 To: Herokuheroku@googlegroups.com Reply-To: heroku@googlegroups.com Subject: Can't find DATABASE_URL using Spring context Trying to follow the Java/Spring/Hibernate example. Can't access the system environment variable DATABASE_URL using Spring properties as Java/Spring sample suggests. The 5mb Postgres db was created by default but I dropped and added it back to see if that would help - nothing. It shows up in heroku config but not through JVM's System.getenv() or Spring's #{systemEnvironment['DATABASE_URL']} or Spring's ${DATABASE_URL}. My Spring applicationContext.xml has: context:property-placeholder location=classpath*:META-INF/spring/ *.properties / context:spring-configured / context:annotation-config / bean class=java.net.URI id=dbUrl constructor-arg value=#{systemEnvironment['DATABASE_URL']} / /bean heroku config shows: DATABASE_URL= postgres://shtkg:@ec2-23-21-###-###.compute-1.amazonaws.com/ JAVA_OPTS = -Xmx384m -Xss512k -XX:+UseCompressedOops MAVEN_OPTS = -Xmx384m -Xss512k -XX:+UseCompressedOops PATH= /usr/local/bin:/usr/bin:/bin SHARED_DATABASE_URL = postgres://shtkg:@ec2-23-21-###-###.compute-1.amazonaws.com/ heroku info shows: Addons:Shared Database 5MB Database Size: 192k Git URL: g...@heroku.com:###-###-###.git Owner: ###@##.com Repo Size: 162M Slug Size: 90M Stack: cedar Web URL: http://###-###-###.herokuapp.com/ heroku addons shows: shared-database:5mb On git push, I am dumping to log the System.getenv() (no DATABASE_URL here!) : env.OLDPWD : /tmp/build_### env.SHELL : /bin/bash env.SHLVL : 2 env.GIT_DIR : . env.JAVA_HOME : /usr/lib/jvm/java-6-openjdk env.MAVEN_OPTS : -Xmx512m env.PATH : :/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/ sbin:/sbin env.SSH_CLIENT : 10.93.##.### 362## 110## env.MAIL : /var/mail/u# env.USER : u# env.LOG_TOKEN : ###.. env.PWD : /tmp/build_### env.HOME : /app/ env.LOGNAME : u# env._ : /app/tmp/repo.git/.cache/.maven/bin/mvn env.SSH_CONNECTION : 10.93.##.### 36### 10.92.##.## 11### env.LD_LIBRARY_PATH : /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/ server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6- openjdk/jre/../lib/amd64 git push heroku master shows: ... 2012-04-14 14:19:24,031 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbUrl' defined in file [/tmp/build_###/target/ myapp-1.0-SNAPSHOT/WEB-INF/classes/META-INF/spring/ applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.net.URI]: Constructor threw exception; nested exception is java.lang.NullPointerException ... Discovering process types Procfile declares types - web - Compiled slug size is 90.4MB - Launching... done, v13 http://###-###-###.herokuapp.com deployed to Heroku Should I add a -D param to the Procfile which the sample does not have? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Progstr and Logentries addons
It's great news, thanks for your reactivity! By the way your support site seems to be down. On Monday, April 16, 2012 11:24:52 AM UTC+2, Hristo Deshev wrote: Hi Michel, On 04/15/2012 09:57 PM, Michel Pigassou wrote: Hi. Does anyone use the Progstr addon? All log timestamp do not match the Heroku logs (whereas the ones from Logentries do). What solution between the two are you using? I wasn't aware of the timestamp mismatch problems with the Progstr add-on, but I think I just fixed them. Thanks for your report! If you have other problems with the add-on, you can always reach us at supp...@progstr.com. -- Hristo Deshev Developer, Progstr.com -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/a8s8IKgZ_B8J. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: set process.env.PORT
There are some limitations with socket communication check out this article https://devcenter.heroku.com/articles/realtime-polyglot-app-node-ruby-mongodb-socketio#pushing_messages_to_the_browser_with_socketio -- Richard Schneeman On Monday, April 16, 2012 at 5:17 AM, Yusuf X wrote: I have a server that listens with socket.io (http://socket.io) on process.env.port , but the port changes every time, so how can I get the client to connect to it? Is there a way to pin the server port to an unchanging number? I tried heroku config:add PORT=12345 but that doesn't seem to have any effect. TIA -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/K8Fh_clPAO8J. To post to this group, send email to heroku@googlegroups.com (mailto:heroku@googlegroups.com). To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com (mailto:heroku+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Heroku API authentication using email and password
Hi Arvindh, Currently we take both the user API key and password for any API calls, but that might change in the future. The best approach for now is to use the Auth API with the username and password, store the API key from the response and use it for subsequent API calls. The API looks like this: POST https://api.heroku.com/login Params: username, password Response: JSON { api_key: abc123 } Thanks, Pedro On Sun, Apr 15, 2012 at 11:39 PM, Arvindh Sukumar arvsuku...@gmail.com wrote: According to the Heroku API docs, authentication is done using the User's API Key as password, and a blank username, through HTTP Basic authentication. However, i found that authentication works even if I use the account email and password. I just wanted to check whether this is 'allowed'. The command-line tool uses this method, but I want to use it in an iOS app i'm developing. Using the email and password for login would be preferred, as it is much easier to input than the API key. Thanks, Arvindh -- You received this message because you are subscribed to the Google Groups Heroku group. To view this discussion on the web visit https://groups.google.com/d/msg/heroku/-/r7q3XH-5gOwJ. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: heroku login failing on Mac
FWIW, I may have figured out what's going on. This is probably somewhat obvious to Ruby people, but I'm intending to use Heroku with Java so it wasn't obvious to me. OS X has Ruby 1.8.7 - I had to upgrade to 1.9.2. rvm didn't work for me, but installing 1.9.2 via rbenv and ruby-build worked. On Apr 15, 8:44 pm, nojo nojono...@gmail.com wrote: Just getting started with Heroku, I installed toolbelt on my Mac with the installer. When I run heroku login, I get the following: $ heroku login /usr/local/heroku/lib/heroku/updater.rb:33: warning: parenthesize argument(s) for future version /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:79:in `readto': undefined local variable or method `count' for []:Array (NameError) from /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:85:in `parse' from /usr/local/heroku/vendor/gems/netrc-0.7.1/lib/netrc.rb:20:in `read' from /usr/local/heroku/lib/heroku/auth.rb:92:in `netrc' from /usr/local/heroku/lib/heroku/auth.rb:66:in `delete_credentials' from /usr/local/heroku/lib/heroku/auth.rb:21:in `login' from /usr/local/heroku/lib/heroku/command/auth.rb:12:in `login' from /usr/local/heroku/lib/heroku/command.rb:148:in `send' from /usr/local/heroku/lib/heroku/command.rb:148:in `run' from /usr/local/heroku/lib/heroku/cli.rb:9:in `start' from /usr/bin/heroku:28 $ Any hints about what I need to do? Thanks. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
UTF-8 encoding problems
Hey guys, I'm having problemas with UTF-8 on Heroku. In one of my controllers, I'm passing an email as a parameter (with an @), and the server is returning an error: 2012-04-16T19:02:41+00:00 app[web.1]: ArgumentError (invalid byte sequence in UTF-8): 2012-04-16T19:02:41+00:00 app[web.1]: app/controllers/ emails_controller.rb:6:in `plano' The line, is exactly where the param with the @ is used. Here's my heroku configuration (the important ones): RACK_ENV = staging RAILS_ENV = staging LANG = en_US.UTF-8 STACK = bamboo-mri-1.9.2 I don't know what else to do. I've set all the headers to # encoding: UTF-8 and my application.rb is already with the config.encoding = utf-8 Any help would be great, thanks! -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: UTF-8 encoding problems
Matias Can you post line 6 of emails_controller? On Mon, Apr 16, 2012 at 2:18 PM, Matias Leidemer matiasleide...@gmail.comwrote: Hey guys, I'm having problemas with UTF-8 on Heroku. In one of my controllers, I'm passing an email as a parameter (with an @), and the server is returning an error: 2012-04-16T19:02:41+00:00 app[web.1]: ArgumentError (invalid byte sequence in UTF-8): 2012-04-16T19:02:41+00:00 app[web.1]: app/controllers/ emails_controller.rb:6:in `plano' The line, is exactly where the param with the @ is used. Here's my heroku configuration (the important ones): RACK_ENV = staging RAILS_ENV = staging LANG = en_US.UTF-8 STACK = bamboo-mri-1.9.2 I don't know what else to do. I've set all the headers to # encoding: UTF-8 and my application.rb is already with the config.encoding = utf-8 Any help would be great, thanks! -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: UTF-8 encoding problems
Sure, it's something really simple: https://gist.github.com/2401076 On Mon, Apr 16, 2012 at 4:46 PM, Jeff Schmitz jeffrey.j.schm...@gmail.comwrote: Matias Can you post line 6 of emails_controller? On Mon, Apr 16, 2012 at 2:18 PM, Matias Leidemer matiasleide...@gmail.com wrote: Hey guys, I'm having problemas with UTF-8 on Heroku. In one of my controllers, I'm passing an email as a parameter (with an @), and the server is returning an error: 2012-04-16T19:02:41+00:00 app[web.1]: ArgumentError (invalid byte sequence in UTF-8): 2012-04-16T19:02:41+00:00 app[web.1]: app/controllers/ emails_controller.rb:6:in `plano' The line, is exactly where the param with the @ is used. Here's my heroku configuration (the important ones): RACK_ENV = staging RAILS_ENV = staging LANG = en_US.UTF-8 STACK = bamboo-mri-1.9.2 I don't know what else to do. I've set all the headers to # encoding: UTF-8 and my application.rb is already with the config.encoding = utf-8 Any help would be great, thanks! -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- Matias -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: UTF-8 encoding problems
BTW, the plano action is a post one so I'm testing it with cURL. First I thought it was something with encoding params of the cURL itself. But when I run the same cURL command pointing directly to my dev machine, it works fine. On Mon, Apr 16, 2012 at 4:55 PM, Matias Leidemer matiasleide...@gmail.comwrote: Sure, it's something really simple: https://gist.github.com/2401076 On Mon, Apr 16, 2012 at 4:46 PM, Jeff Schmitz jeffrey.j.schm...@gmail.com wrote: Matias Can you post line 6 of emails_controller? On Mon, Apr 16, 2012 at 2:18 PM, Matias Leidemer matiasleide...@gmail.com wrote: Hey guys, I'm having problemas with UTF-8 on Heroku. In one of my controllers, I'm passing an email as a parameter (with an @), and the server is returning an error: 2012-04-16T19:02:41+00:00 app[web.1]: ArgumentError (invalid byte sequence in UTF-8): 2012-04-16T19:02:41+00:00 app[web.1]: app/controllers/ emails_controller.rb:6:in `plano' The line, is exactly where the param with the @ is used. Here's my heroku configuration (the important ones): RACK_ENV = staging RAILS_ENV = staging LANG = en_US.UTF-8 STACK = bamboo-mri-1.9.2 I don't know what else to do. I've set all the headers to # encoding: UTF-8 and my application.rb is already with the config.encoding = utf-8 Any help would be great, thanks! -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- Matias -- Matias -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Spring RabbitMQ configuration / running issue
I don't have an example that uses Spring Config for this, but I have a plain Java one: https://github.com/jamesward/javasample-rabbitmq The connection setup is here: https://github.com/jamesward/javasample-rabbitmq/blob/master/src/main/java/org/example/RabbitFactoryUtil.java Let me know if that helps. -James On 04/16/2012 11:46 AM, Romin Irani wrote: I am trying to configure Spring MVC RabbitMQ in Java. I have the following Configuration File (servlet-context.xml). ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:mvc=http://www.springframework.org/schema/mvc; xmlns:context=http://www.springframework.org/schema/context; xmlns:rabbit=http://www.springframework.org/schema/rabbit; xsi:schemaLocation=http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd; default-autowire=byName context:component-scan base-package=com.appirio.messaginghub/ mvc:annotation-driven/ mvc:resources location=file:./src/main/resources/static/,classpath:/ static/ mapping=static/**/ context:property-placeholder/ bean id=rabbitConnectionFactory class=org.springframework.amqp.rabbit.connection.CachingConnectionFactory !-- This constructor arg utilizes the RabbitFactoryUtil class shown in the java example above -- constructor- argvalue#{ T(com.appirio.messaginghub.RabbitFactoryUtil).getConnectionFactory()} /value/constructor-arg /bean bean id=mylistener class=com.appirio.messaginghub.MyMessageListener/ rabbit:queue id=sample-queue/ rabbit:fanout-exchange name=sample-exchange rabbit:bindings rabbit:binding queue=sample-queue/ /rabbit:bindings /rabbit:fanout-exchange rabbit:admin connection-factory=rabbitConnectionFactory/ rabbit:listener-container rabbit:listener queues=sample-queue ref=mylistener/ /rabbit:listener-container bean id=template class=org.springframework.amqp.rabbit.core.RabbitTemplate property name=connectionFactory ref=rabbitConnectionFactory/ property name=exchange value=sample-exchange/ property name=queue value=sample-queue/ property name=routingKey value=sample-key/ /bean /beans I am able to post a message successfully to RabbitMQ in my controller via this code: ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(**/servlet-context.xml); RabbitTemplate rabbitTemplate = ctx.getBean(RabbitTemplate.class); rabbitTemplate.send(new Message(sample message.getBytes(UTF-8), new MessageProperties())); I have written a listener class as shown below: package com.appirio.messaginghub; import org.apache.log4j.Logger; import org.springframework.amqp.core.Message; import org.springframework.amqp.core.MessageListener; public class MyMessageListener implements MessageListener { @Override public void onMessage(Message message) { Logger barlogger = Logger.getLogger(someclass); barlogger.info(onMessage is invoked); } } And this class is referenced correctly in the servlet-context.xml Spring configuration file. ISSUE : The Listener is never getting called. Any hints on what I might be doing wrong. I see the following error log via heroku logs: 2012-04-16T17:44:23+00:00 app[web.1]: org.springframework.amqp.rabbit.listener.F atalListenerStartupException: Cannot prepare queue for listener. Either the queu e doesn't exist or the broker will not allow us to use it. 2012-04-16T17:44:23+00:00 app[web.1]: Caused by: java.io.IOException 2012-04-16T17:44:23+00:00 app[web.1]: at com.rabbitmq.client.impl.AMQChannel.w rap(AMQChannel.java:102) 2012-04-16T17:44:23+00:00 app[web.1]: at com.rabbitmq.client.impl.AMQChannel.e xnWrappingRpc(AMQChannel.java:126) 2012-04-16T17:44:23+00:00 app[web.1]: at com.rabbitmq.client.impl.ChannelN.que ueDeclarePassive(ChannelN.java:717) 2012-04-16T17:44:23+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl. invoke0(Native Method) 2012-04-16T17:44:23+00:00 app[web.1]: at java.lang.reflect.Method.invoke(Metho d.java:616) 2012-04-16T17:44:23+00:00 app[web.1]: at org.springframework.amqp.rabbit.conne ction.CachingConnectionFactory $CachedChannelInvocationHandler.invoke(CachingConn ectionFactory.java:298) 2012-04-16T17:44:23+00:00 app[web.1]: at org.springframework.amqp.rabbit.liste ner.BlockingQueueConsumer.start(BlockingQueueConsumer.java:188)