0 Replies Latest reply on Apr 22, 2013 1:53 AM by verystrongjoe

    what is the error, "HQ119046: Cannot call receive(...) - a MessageHandler is set"?

    verystrongjoe Newbie

      I am using HornetQ, 2.3.0 Beta3 and tried to run the example, hornetq-jms-multiple-failover-example that is similar to what I want to implement.

      but the error is ouccured and couldn't see the success return message;

       

       

      I think that this error is occured when the consumer use both receive function and message listener.

      Is that right? but many of examples show this error .. please help me.

      the error is like the following.  thanks in advance.

       

      javax.jms.IllegalStateException: HQ119046: Cannot call receive(...) - a MessageHandler is set

                at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:200)

                at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:389)

                at org.hornetq.jms.client.HornetQMessageConsumer.getMessage(HornetQMessageConsumer.java:220)

                at org.hornetq.jms.client.HornetQMessageConsumer.receive(HornetQMessageConsumer.java:129)

                at org.hornetq.jms.example.MultipleFailoverExample.runExample(MultipleFailoverExample.java:125)

                at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:69)

                at org.hornetq.jms.example.MultipleFailoverExample.main(MultipleFailoverExample.java:55)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:601)

                at org.hornetq.maven.HornetQClientPlugin.execute(HornetQClientPlugin.java:64)

                at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

                at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

                at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)

                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

                at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

                at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

                at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:601)

                at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

                at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

                at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

                at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

      Caused by: HornetQException[errorType=ILLEGAL_STATE message=HQ119046: Cannot call receive(...) - a MessageHandler is set]

                ... 33 more

       

       

      #####################

      ###    FAILURE!   ###

      #####################