1 Reply Latest reply on Oct 30, 2009 11:42 AM by Peter Johnson

    when I publish large message  ,but show error "Could not get

    kevnlin kevnlin Newbie

      when I publish large message ,but show error "Could not get text message: javax.jms.JMSException: Illegal property name: JMS_JBM_InputStream"



      public void publish(java.io.File inf) throws JMSException {
      try{
      System.out.println("1-1");

      BytesMessage message = topicSession.createBytesMessage();

      System.out.println("1-2");
      FileInputStream fileInputStream = new FileInputStream(inf);
      System.out.println("1-3");
      BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);

      message.setObjectProperty("JMS_JBM_InputStream", bufferedInput);
      //message.setObjectProperty("JMS_JBM_InputStream", bufferedInput);
      System.out.println("1-5");
      System.out.println("1");
      topicPublisher.publish(topic,message);
      System.out.println("2");

      //TextMessage message = topicSession.c
      //message=topicSession.
      //
      //System.out.println("send");
      //System.out.println(msg);
      //topicPublisher.publish(topic, message );

      }
      catch(IOException ex1) {


      }

      catch(JMSException ex) {

      System.err.println("Could not get text message: " + ex);

      ex.printStackTrace();}
      }




      Debug error -->
      2-1
      2-2
      Could not get text message: javax.jms.JMSException: Illegal property name: JMS_JBM_InputStream
      2-3
      javax.jms.JMSException: Illegal property name: JMS_JBM_InputStream
      1-1
      at org.jboss.mq.SpyMessage.checkProperty(SpyMessage.java:996)
      1-2
      at org.jboss.mq.SpyMessage.setObjectProperty(SpyMessage.java:758)
      1-3
      at test2.HelloPublisher.publish(HelloPublisher.java:107)
      at test2.Main$7.lambda(Main.fx:624)
      at test2.Main$7.lambda(Main.fx:624)
      at test2.Main$7.invoke(Main.fx:613)
      at test2.Main$7.invoke(Main.fx:613)
      at test2.Main$7.invoke(Main.fx:613)
      at test2.Main$7.invoke(Main.fx:613)
      at javafx.scene.control.Button.fire(Button.fx:50)
      at com.sun.javafx.scene.control.ButtonBaseBehavior.mouseRelease(ButtonBaseBehavior.fx:78)
      at com.sun.javafx.scene.control.caspian.AbstractButtonSkin$4.lambda(AbstractButtonSkin.fx:68)
      at com.sun.javafx.scene.control.caspian.AbstractButtonSkin$4.invoke(AbstractButtonSkin.fx:68)
      at com.sun.javafx.scene.control.caspian.AbstractButtonSkin$4.invoke(AbstractButtonSkin.fx:68)
      at javafx.scene.Node.impl_processMouseEvent(Node.fx:1682)
      at javafx.scene.Node.preprocessMouseEvent(Node.fx:1708)
      at javafx.scene.Scene$MouseHandler.process(Scene.fx:688)
      at javafx.scene.Scene$MouseHandler.process(Scene.fx:573)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.fx:391)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.fx:519)
      at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doMouseEvent(SwingScene.java:388)
      at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.mouseReleased(SwingScene.java:412)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      2-4
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)