5 Replies Latest reply on Apr 23, 2004 5:10 AM by Adrian Brock

    java.net.SocketException: Connection reset

    grobert Newbie

      Hello,

      When running MDB following error occurs:

      06:33:17,937 WARN [OILServerILService] Connection failure (1).
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2313)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2452)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2601)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:206)
      at java.lang.Thread.run(Thread.java:534)
      -----------------------------------------------------------------------------

      Bean code is:

      /**
      * @author Administrator
      *
      * @ejb.bean name = "MdExample"
      * destination-type = "javax.jms.Topic"
      *
      * @jboss.destination-jndi-name name = "topic/TestTopic"
      *
      */
      public class MdExampleBean implements MessageDrivenBean, MessageListener {

      protected MessageDrivenContext ctx;

      /**
      *
      * @return
      * @throws javax.ejb.CreateException
      *
      * @ejb.create-method
      */
      public void ejbCreate() {
      System.out.println("C> ejbCreate()");
      }//F:end

      public void ejbRemove() throws EJBException {
      System.out.println("E> ejbRemove()");
      }//F:end

      public void setMessageDrivenContext(MessageDrivenContext ctx)
      throws EJBException {
      System.out.println("E> setMessageDrivenContext(MessageDrivenContext ctx)");
      this.ctx = ctx;
      }//F:end

      public void onMessage(Message msg) {
      System.out.println("E> onMessage(Message msg)");
      if (msg instanceof TextMessage ) {
      TextMessage tm = (TextMessage) msg;
      try {
      String text = tm.getText();
      System.out.println("A> " + text);
      } catch (JMSException e) {}
      }
      }//F:end
      }

      ---------------------------------------------------------------------
      I searched the web but found nothing about this error.
      JBoss version is 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445). Jboss is running on MySQL server.

      Regards
      Robert

        • 1. Re: java.net.SocketException: Connection reset
          Adrian Brock Master

          If you'd search this forum, you would know that I get very annoyed when
          people post this error message.

          I even added a section to the FAQ

          java.net.* == network problem NOT jms problem

          java.net.SocketException is a network error
          Connection reset means the other end of the connection died suddenly.

          Sadly you are far from the first to ask this question and you won't be last to waste my time
          by not using search.

          I'm of a mind to convert all java.net messages into
          "Your network is broken or the client/server died" just to avoid this question.
          But this would make it harder for those people who know what the errors mean.

          • 2. Re: java.net.SocketException: Connection reset
            grobert Newbie

            Hello Adrian,

            95% of my problems I was able tu solve using different search engines (and believe me it was not elementary for me as I`m new to EJB and JBoss) just because I know how unpleasant is answer to basic questions and just because I know about your psychic problems. We will make an agreement. I will buy some books on JBoss and you will take some sessions at psychoterapist. I have problems to solve and my problem is not an overworked developer who is assuming that everybody is here to waste his time and is not able to use searchengines.


            and now to te topic.
            Your faq simple did not helped me. Not nervous developer told me what connection factory to call, to not to recieve those exeption. Your aproach in FAQ is useless and your FAQ is wasting my time. So the problem was conserning to JMS. Everybody makes mistakes. So do you adrian.

            • 3. Re: java.net.SocketException: Connection reset
              Adrian Brock Master

              Yawn.

              To quote from ESR:

              "Remember: When that hacker tells you that you've screwed up, and (no matter how gruffly) tells you not to do it again, he's acting out of concern for (1) you and (2) his community. It would be much easier for him to ignore you and filter you out of his life. If you can't manage to be grateful, at least have a little dignity, don't whine, and don't expect to be treated like a fragile doll just because you're a newcomer with a theatrically hypersensitive soul and delusions of entitlement."

              • 4. Re: java.net.SocketException: Connection reset
                Adrian Brock Master

                When I did search, there are 60 posts about
                "Connection AND reset" in this forum

                • 5. Re: java.net.SocketException: Connection reset
                  Adrian Brock Master

                  Yes, I/we make lots of mistakes.

                  Just look at the change notes for 3.2.4 JMS
                  http://jboss.org/index.html?module=bb&op=viewtopic&t=48419

                  Of course I can't claim them all :-)