3 Replies Latest reply: Mar 8, 2013 4:40 AM by r035198x RSS

    Oracle Java Integration

    978054
      Hi All,

      I have an integration between Oracle & Java. I have created a procedure in PLSQL to call a java class which send mail. It was working fine a month ago but now when i execute the procedure it through's following exception.
      javax.mail.MessagingException: Exception reading response;
      nested exception is:
      java.net.SocketException: recv failed
      A request to send or receive data was disallowed because the socket is not
      connected and (when sending on a datagram socket using a sendto call) no address
      was supplied.
      at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java)
      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
      at javax.mail.Service.connect(Service.java:297)
      at javax.mail.Service.connect(Service.java:156)
      at javax.mail.Service.connect(Service.java:105)
      at javax.mail.Transport.send0(Transport.java:168)
      at javax.mail.Transport.send(Transport.java:98)
      at SendSMS.sendSMS(SendSMS.java:91)
      Caused by: java.net.SocketException: recv failed
      A request to send or receive data was disallowed because the socket is not
      connected and (when sending on a datagram socket using a sendto call) no address
      was supplied.
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java)
      at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)
      at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)
      at
      com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)
      at
      com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(SSLSocketImpl.java:1345)
      at
      com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:10
      3)
      at com.sun.net.ssl.internal.ssl.Handshaker.kickstart(Handshaker.java:528)
      at
      com.sun.net.ssl.internal.ssl.SSLSocketImpl.kickstartHandshake(SSLSocketImpl.java
      :1101)
      at
      com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl
      .java:1024)
      at
      com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:675
      )
      at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
      at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java)
      at java.io.BufferedInputStream.read(BufferedInputStream.java)
      at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java)
      ... 9 more

      PL/SQL procedure successfully completed.


      Please help !! it's a bit urgent ....
        • 1. Re: Oracle Java Integration
          r035198x
          If the sql and the java code have not changed then check

          1.) The networking; Did some servers get moved or new firewall/firewall rules added. Can you telnet the mail server from the java server e.t.c
          2.)The data; If the connection settings came from the database then check that the values in the database are still valid .
          • 2. Re: Oracle Java Integration
            978054
            No they have not changed,
            - there is no specific java server for this, Oracle has the jdk and am using that to send the mail with extra mail jars configured to it. I had a talk with network team and they are able to telnet the database server infact i am able to send email through DB server when i use utl_mail package of PLSQL to send email.
            Firewalls i need to get confirmed.
            - yes values in DB are still valid i am able to establish a DB connection on same DB through the java code.

            Thanks for the help i will update you on firewall.
            • 3. Re: Oracle Java Integration
              r035198x
              Also take a look at http://www.oracle.com/technetwork/java/javamail/faq/index.html#condebug to see how to debug further.