EOF on socket error

Hi,
I am trying to read from a mail box using a simple program. when i try to connect to the mailbox, it gives me this exception. The program was working until two weeks back and suddenly started giving this error.
please help. Thanks in advance.
VR
javax.mail.AuthenticationFailedException: EOF on socket
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.mail.MessagingException.<init>(MessagingException.java:42)
at javax.mail.AuthenticationFailedException.<init>(AuthenticationFailedExce
ption.java:35)
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:104)
at javax.mail.Service.connect(Service.java:234)
at javax.mail.Service.connect(Service.java:135)
at readMail.mainer(Compiled Code)
at ExecreadMail.main(Compiled Code)

I think this is probably the key to your problem
javax.mail.AuthenticationFailedException: EOF on socket
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.mail.MessagingException.<init>(MessagingException.java:42)
at javax.mail.AuthenticationFailedException.<init>(AuthenticationFailedExce
ption.java:35)
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:104)
at javax.mail.Service.connect(Service.java:234)
at javax.mail.Service.connect(Service.java:135)
at readMail.mainer(Compiled Code)
at ExecreadMail.main(Compiled Code)

Similar Messages

  • AuthenticationFailedException : EOF on socket ERROR

    Hi, there
    i'm very upset because of this error
    i'm finding out the solution
    i'm about to make program to receive mails using pop3
    my simple source can be compiled but has run-time error
    please show me the solution
    the error is like below
    Exception in thread "main" javax.mail.AuthenticationFailedExcetion : EOF on socket
    at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:118)
    at javax.mail.Service.connect(Service.java:233)
    at javax.mail.Service.connect(Service.java:134)
    at MailReciever.recieve(MailReciever.java:48)
    at MailReciever.main(MailReciever.java:344)

    Amol Karyakarte wrote:
    I am requesting, please help me to solve this problem.
    I will be very thankful for your kind help and support.
    Amol......since you asked for it:
    http://lmgtfy.com/?q=javax.mail.AuthenticationFailedException
    First hit
    Session session = Session.getDefaultInstance(props, null);Is null correct?
    Regards

  • Timeouts, connection reset, and EOF on socket type HTTP, etc.

    We've created our own HTTP client simulation tool to run multiple virtual users against Weblogic, but we're seeing lots of errors when we ramp up the number of virtual users. So I'm just trying to figure out if it's something about the way we're handling the sockets in the simulator, or some type of configuration on Weblogic. These are the types of messages I see in the log:
    Tue Apr 18 16:48:13 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4803,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:13 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:13 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4806,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:13 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:15 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4815,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:15 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:21 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:37 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4816,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:42 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4817,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:51 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:51 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Thanks in advance,
    Mike Gorman, Director of Architecture
    YOUcentric, Inc.
    Charlotte, NC
    704-643-1000 x518
    http://www.youcentric.com

    Mike,
    Try increasing the value of weblogic.login.readTimeoutMillis.
    Mike Gorman wrote:
    >
    We've created our own HTTP client simulation tool to run multiple virtual users against Weblogic, but we're seeing lots of errors when we ramp up the number of virtual users. So I'm just trying to figure out if it's something about the way we're handling the sockets in the simulator, or some type of configuration on Weblogic. These are the types of messages I see in the log:
    Tue Apr 18 16:48:13 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4803,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:13 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:13 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4806,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:13 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:15 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4815,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:15 EDT 2000:<I> <ServletContext-Servlets> com.youcentric.servlet.LoginServlet: init
    Tue Apr 18 16:48:21 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:37 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4816,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:42 EDT 2000:<W> <ListenThread> Connection rejected: Login timed out after 5000 msec. The socket came from [host=192.168.10.59,port=4817,localport=7001] See property weblogic.login.readTimeoutMillis.
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<E> <PosixSocketMux> connection reset on HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:47 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:51 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Tue Apr 18 16:48:51 EDT 2000:<I> <PosixSocketMux> EOF on socket type HTTP
    Thanks in advance,
    Mike Gorman, Director of Architecture
    YOUcentric, Inc.
    Charlotte, NC
    704-643-1000 x518
    http://www.youcentric.com
    Stuart Lawrence
    Software Engineer
    BEA WebXpress http://www.bea.com

  • Getting javax.mail.AuthenticationFailedException: EOF on socket. Need Help

    I am trying to get hotmail emails and store in Oracle 10g database.
    When I am executing receivemail procedure from Oracle 10g database. I am getting following error.
    connect to ESIMSCO_UTIL_OWNER
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<My email address>@hotmail.com', '<My email password>');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I did following steps, but still I am getting this error. Can somebady help me to solve this problem.
    connect sys/<password>@esimsco as sysdba
    connect to sys
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 16:02:04 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> begin
    1 dbms_java.grant_permission( 'ESIMSCO_UTIL_OWNER', 'SYS:java.util.PropertyPermission', '*', 'read,write' );
    2 commit;
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.net.SocketPermission',
    5 permission_name => '*',
    6 permission_action => 'connect,resolve'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.util.PropertyPermission',
    5 permission_name => '*',
    6 permission_action => 'read,write'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL>
    Then I connect ESIMSCO_UTIL_OWNER.
    connect to ESIMSCO_UTIL_OWNER
    Create 2 tables.
    create table attachment(
    at_file varchar2(500),
    at_mimetype varchar2(500),
    at_attachment blob
    create table email (
    em_incident integer,
    em_from varchar2(1000),
    em_subject varchar2(1000),
    em_body nclob
    Then Create java source named receivemail.
    create or replace and compile java source named receivemail as
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import sqlj.runtime.*;
    import oracle.sql.BLOB;
    public class ReceiveMail
    static void getAttachments(Message message, int incidentNo)
    throws MessagingException, IOException, SQLException {
    //String attachments = "";
    Object content = message.getContent();
    if (content instanceof Multipart)
    // -- Multi part message which may contain attachment
    Multipart multipart = (Multipart)message.getContent();
    // -- Loop through all parts of the message
    for (int i=0, n=multipart.getCount(); i<n; i++) {
    Part part = multipart.getBodyPart(i);
    String disposition = part.getDisposition();
    if ((disposition != null) &&(disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE))) {
    //-- This part is a file attachment
    String fileName = incidentNo+"_"+part.getFileName().replace(' ','_');
    System.out.println("FILE: " + fileName);
    String contentType = part.getContentType();
    String mimeType = contentType.substring(0,contentType.indexOf(";"));
    System.out.println("FILETYPE: " + mimeType);
    InputStream is = part.getInputStream();
    // -- To work with a BLOB column you have to insert a record
    // -- with an emptly BLOB first.
    #sql { insert into attachment(at_file, at_mimetype, at_attachment)
    values (:fileName, :mimeType, empty_blob()) };
    // -- Retrieve the BLOB
    BLOB attachment = null;
    #sql { select at_attachment into :attachment
    from attachment where at_file = :fileName };
    // -- Fill the BLOB
    OutputStream os = attachment.getBinaryOutputStream();
    int j;
    while ((j = is.read()) != -1) {
    os.write(j);
    is.close();
    os.close();
    // -- Set the BLOB by updating the record
    #sql { update attachment set at_attachment = :attachment
    where at_file = :fileName };
    static String getPlainTextBody(Message message)
    throws MessagingException, IOException
    Object content = message.getContent();
    if (message.isMimeType("text/plain")) {
    // -- Message has plain text body only
    System.out.println("SIMPLE TEXT");
    return (String) content;
    } else if (message.isMimeType("multipart/*")) {
    // -- Message is multipart. Loop through the message parts to retrieve
    // -- the body.
    Multipart mp = (Multipart) message.getContent();
    int numParts = mp.getCount();
    System.out.println("MULTIPART: "+numParts);
    for (int i = 0; i < numParts; ++i) {
    System.out.println("PART: "+mp.getBodyPart(i).getContentType());
    if (mp.getBodyPart(i).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mp.getBodyPart(i).getContent();
    } else if (mp.getBodyPart(i).isMimeType("multipart/*")) {
    // -- Body is also multipart (both plain text and html).
    // -- Loop through the body parts to retrieve plain text part.
    MimeMultipart mmp = (MimeMultipart) mp.getBodyPart(i).getContent();
    int numBodyParts = mmp.getCount();
    System.out.println("MULTIBODYPART: "+numBodyParts);
    for (int j = 0; j < numBodyParts; ++j) {
    System.out.println("BODYPART: "+mmp.getBodyPart(j).getContentType());
    if (mmp.getBodyPart(j).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mmp.getBodyPart(j).getContent();
    return "";
    } else {
    System.out.println("UNKNOWN: "+message.getContentType());
    return "";
    static void saveMessage(Message message)
    throws MessagingException, IOException, SQLException
    //String body = "";
    int incidentNo;
    // -- Get a new incident number
    #sql { select seq_incident.nextval into :incidentNo from dual };
    // -- Get the header information
    String from = ((InternetAddress)message.getFrom()[0]).getAddress();
    System.out.println("FROM: "+ from);
    String subject = message.getSubject();
    System.out.println("SUBJECT: "+subject);
    // -- Retrieve the plain text body
    String body = getPlainTextBody(message);
    // -- Store the message in the email table
    #sql { insert into email (em_incident, em_from, em_subject, em_body)
    values (:incidentNo, :from, :subject, :body) };
    // -- Retrieve the attachments
    getAttachments(message, incidentNo);
    #sql { commit };
    // -- Mark message for deletion
    // message.setFlag(Flags.Flag.DELETED, true);
    public static String Receive(String POP3Server, String usr, String pwd)
    Store store = null;
    Folder folder = null;
    try
    // -- Get hold of the default session --
    Properties props = System.getProperties();
    props.put("mail.pop3.connectiontimeout", "60000");
    Session session = Session.getDefaultInstance(props, null);
    // -- Get hold of a POP3 message store, and connect to it --
    store = session.getStore("pop3");
    store.connect(POP3Server,995, usr, pwd);
    System.out.println("Connected");
    // -- Try to get hold of the default folder --
    folder = store.getDefaultFolder();
    if (folder == null) throw new Exception("No default folder");
    // -- ...and its INBOX --
    folder = folder.getFolder("INBOX");
    if (folder == null) throw new Exception("No POP3 INBOX");
    // -- Open the folder for read_write (to be able to delete message) --
    folder.open(Folder.READ_WRITE);
    // -- Get the message wrappers and process them --
    Message[] msgs = folder.getMessages();
    for (int msgNum = 0; msgNum < msgs.length; msgNum++){
    saveMessage(msgs[msgNum]);
    System.out.println("No more messages");
    return ("SUCCESS");
    catch (Exception ex){
    ex.printStackTrace();
    return ex.toString();
    finally{
    // -- Close down nicely --
    try{
    // close(true), to expunge deleted messages
    if (folder!=null) folder.close(true);
    if (store!=null) store.close();
    catch (Exception ex){
    //ex.printStackTrace();
    return ex.toString();
    Then create function receivemail.
    create or replace function receivemail(pop3_server in string,
    pop3_usr in string,
    pop3_pwd in string)
    return varchar2
    is language java name
    'ReceiveMail.Receive(java.lang.String,
    java.lang.String,
    java.lang.String) return String';
    And then trying to execute function receivemail, but I am getting following error.
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<Hotmail email address>@hotmail.com', 'Hotmail password');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I am requesting, please help me to solve this problem.
    I will be very thankful for your kind help and support.
    Amol......
    Edited by: Amol Karyakarte on 31-May-2012 7:27 AM

    Hello,
    I don't think this is the right forum, as this question seems to have nothing to do with the Oracle Forms tool.
    You'd better ask it in the database forum.
    Francois

  • Help to solve javax.mail.AuthenticationFailedException: EOF on socket

    I am trying to get hotmail emails and store in Oracle 10g database.
    When I am executing receivemail procedure from Oracle 10g database. I am getting following error.
    connect to ESIMSCO_UTIL_OWNER
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<My email address>@hotmail.com', '<My email password>');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I did following steps, but still I am getting this error. Can somebady help me to solve this problem.
    connect sys/<password>@esimsco as sysdba
    connect to sys
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 16:02:04 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> begin
    1 dbms_java.grant_permission( 'ESIMSCO_UTIL_OWNER', 'SYS:java.util.PropertyPermission', '*', 'read,write' );
    2 commit;
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.net.SocketPermission',
    5 permission_name => '*',
    6 permission_action => 'connect,resolve'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> begin
    2 dbms_java.grant_permission(
    3 grantee => 'ESIMSCO_UTIL_OWNER',
    4 permission_type => 'SYS:java.util.PropertyPermission',
    5 permission_name => '*',
    6 permission_action => 'read,write'
    7 );
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL>
    Then I connect ESIMSCO_UTIL_OWNER.
    connect to ESIMSCO_UTIL_OWNER
    Create 2 tables.
    create table attachment(
    at_file varchar2(500),
    at_mimetype varchar2(500),
    at_attachment blob
    create table email (
    em_incident integer,
    em_from varchar2(1000),
    em_subject varchar2(1000),
    em_body nclob
    Then Create java source named receivemail.
    create or replace and compile java source named receivemail as
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import sqlj.runtime.*;
    import oracle.sql.BLOB;
    public class ReceiveMail
    static void getAttachments(Message message, int incidentNo)
    throws MessagingException, IOException, SQLException {
    //String attachments = "";
    Object content = message.getContent();
    if (content instanceof Multipart)
    // -- Multi part message which may contain attachment
    Multipart multipart = (Multipart)message.getContent();
    // -- Loop through all parts of the message
    for (int i=0, n=multipart.getCount(); i<n; i++) {
    Part part = multipart.getBodyPart(i);
    String disposition = part.getDisposition();
    if ((disposition != null) &&(disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE))) {
    //-- This part is a file attachment
    String fileName = incidentNo+"_"+part.getFileName().replace(' ','_');
    System.out.println("FILE: " + fileName);
    String contentType = part.getContentType();
    String mimeType = contentType.substring(0,contentType.indexOf(";"));
    System.out.println("FILETYPE: " + mimeType);
    InputStream is = part.getInputStream();
    // -- To work with a BLOB column you have to insert a record
    // -- with an emptly BLOB first.
    #sql { insert into attachment(at_file, at_mimetype, at_attachment)
    values (:fileName, :mimeType, empty_blob()) };
    // -- Retrieve the BLOB
    BLOB attachment = null;
    #sql { select at_attachment into :attachment
    from attachment where at_file = :fileName };
    // -- Fill the BLOB
    OutputStream os = attachment.getBinaryOutputStream();
    int j;
    while ((j = is.read()) != -1) {
    os.write(j);
    is.close();
    os.close();
    // -- Set the BLOB by updating the record
    #sql { update attachment set at_attachment = :attachment
    where at_file = :fileName };
    static String getPlainTextBody(Message message)
    throws MessagingException, IOException
    Object content = message.getContent();
    if (message.isMimeType("text/plain")) {
    // -- Message has plain text body only
    System.out.println("SIMPLE TEXT");
    return (String) content;
    } else if (message.isMimeType("multipart/*")) {
    // -- Message is multipart. Loop through the message parts to retrieve
    // -- the body.
    Multipart mp = (Multipart) message.getContent();
    int numParts = mp.getCount();
    System.out.println("MULTIPART: "+numParts);
    for (int i = 0; i < numParts; ++i) {
    System.out.println("PART: "+mp.getBodyPart(i).getContentType());
    if (mp.getBodyPart(i).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mp.getBodyPart(i).getContent();
    } else if (mp.getBodyPart(i).isMimeType("multipart/*")) {
    // -- Body is also multipart (both plain text and html).
    // -- Loop through the body parts to retrieve plain text part.
    MimeMultipart mmp = (MimeMultipart) mp.getBodyPart(i).getContent();
    int numBodyParts = mmp.getCount();
    System.out.println("MULTIBODYPART: "+numBodyParts);
    for (int j = 0; j < numBodyParts; ++j) {
    System.out.println("BODYPART: "+mmp.getBodyPart(j).getContentType());
    if (mmp.getBodyPart(j).isMimeType("text/plain")) {
    // -- Return the plain text body
    return (String) mmp.getBodyPart(j).getContent();
    return "";
    } else {
    System.out.println("UNKNOWN: "+message.getContentType());
    return "";
    static void saveMessage(Message message)
    throws MessagingException, IOException, SQLException
    //String body = "";
    int incidentNo;
    // -- Get a new incident number
    #sql { select seq_incident.nextval into :incidentNo from dual };
    // -- Get the header information
    String from = ((InternetAddress)message.getFrom()[0]).getAddress();
    System.out.println("FROM: "+ from);
    String subject = message.getSubject();
    System.out.println("SUBJECT: "+subject);
    // -- Retrieve the plain text body
    String body = getPlainTextBody(message);
    // -- Store the message in the email table
    #sql { insert into email (em_incident, em_from, em_subject, em_body)
    values (:incidentNo, :from, :subject, :body) };
    // -- Retrieve the attachments
    getAttachments(message, incidentNo);
    #sql { commit };
    // -- Mark message for deletion
    // message.setFlag(Flags.Flag.DELETED, true);
    public static String Receive(String POP3Server, String usr, String pwd)
    Store store = null;
    Folder folder = null;
    try
    // -- Get hold of the default session --
    Properties props = System.getProperties();
    props.put("mail.pop3.connectiontimeout", "60000");
    Session session = Session.getDefaultInstance(props, null);
    // -- Get hold of a POP3 message store, and connect to it --
    store = session.getStore("pop3");
    store.connect(POP3Server,995, usr, pwd);
    System.out.println("Connected");
    // -- Try to get hold of the default folder --
    folder = store.getDefaultFolder();
    if (folder == null) throw new Exception("No default folder");
    // -- ...and its INBOX --
    folder = folder.getFolder("INBOX");
    if (folder == null) throw new Exception("No POP3 INBOX");
    // -- Open the folder for read_write (to be able to delete message) --
    folder.open(Folder.READ_WRITE);
    // -- Get the message wrappers and process them --
    Message[] msgs = folder.getMessages();
    for (int msgNum = 0; msgNum < msgs.length; msgNum++){
    saveMessage(msgs[msgNum]);
    System.out.println("No more messages");
    return ("SUCCESS");
    catch (Exception ex){
    ex.printStackTrace();
    return ex.toString();
    finally{
    // -- Close down nicely --
    try{
    // close(true), to expunge deleted messages
    if (folder!=null) folder.close(true);
    if (store!=null) store.close();
    catch (Exception ex){
    //ex.printStackTrace();
    return ex.toString();
    Then create function receivemail.
    create or replace function receivemail(pop3_server in string,
    pop3_usr in string,
    pop3_pwd in string)
    return varchar2
    is language java name
    'ReceiveMail.Receive(java.lang.String,
    java.lang.String,
    java.lang.String) return String';
    And then trying to execute function receivemail, but I am getting following error.
    SQL> set serveroutput on
    SQL>
    SQL> Declare
    2 v_error_msg varchar2(10000);
    3 Begin
    4 v_error_msg:=receivemail('pop3.live.com', '<Hotmail email address>@hotmail.com', 'Hotmail password');
    5 dbms_output.put_line(v_error_msg);
    6 End;
    7 /
    javax.mail.AuthenticationFailedException: EOF on socket
    PL/SQL procedure successfully completed.
    SQL>
    I am requesting, please help me to solve this problem.
    I will be very thankful for your kind help and support.
    Amol......

    Amol Karyakarte wrote:
    I am requesting, please help me to solve this problem.
    I will be very thankful for your kind help and support.
    Amol......since you asked for it:
    http://lmgtfy.com/?q=javax.mail.AuthenticationFailedException
    First hit
    Session session = Session.getDefaultInstance(props, null);Is null correct?
    Regards

  • EOF on socket when opening pop3 inbox

    I have a Java program that reads a pop3 inbox and sends appropriate response emails. The program was working fine but something somewhere changed and now I get the following Exception:
    Exception in thread "main" javax.mail.MessagingException: Open failed;
      nested exception is:
         java.io.EOFException: EOF on socket
         at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:215)I wrote a simple Class to reproduce the error:
        private void execute() throws MessagingException {
            Properties props = new Properties();
            props.put("mail.smtp.host", "mail.smtp.host");
            props.put("mail.store.protocol", "pop3");
            // Session session = Session.getInstance(props, null);
            Session session = Session.getDefaultInstance(props);
            Store store = session.getStore("pop3");
            store.connect("mail.myDomain.com", "myUser", "myPassword");
            Folder inbox = store.getFolder("INBOX");
            inbox.open(Folder.READ_ONLY);
        }It connects to the store okay. The exception is thrown at the the line with store.getFolder("INBOX"). I've checked our firewall settings and email server settings (dovecot/postfix) and all seems well.
    Anyone have a clue what this might be?

    Thanks for your quick reply.
    Here's the trace:
    DEBUG: setDebug: JavaMail version 1.4.5
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: mail.pop3.rsetbeforequit: false
    DEBUG POP3: mail.pop3.disabletop: false
    DEBUG POP3: mail.pop3.forgettopheaders: false
    DEBUG POP3: mail.pop3.cachewriteto: false
    DEBUG POP3: mail.pop3.filecache.enable: false
    DEBUG POP3: mail.pop3.keepmessagecontent: false
    DEBUG POP3: mail.pop3.starttls.enable: false
    DEBUG POP3: mail.pop3.starttls.required: false
    DEBUG POP3: mail.pop3.apop.enable: false
    DEBUG POP3: mail.pop3.disablecapa: false
    DEBUG POP3: connecting to host "mail.myDomain.com", port 110, isSSL false
    S: +OK Dovecot ready.
    C: CAPA
    S: +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    STLS
    USER
    SASL PLAIN
    DEBUG POP3: PIPELINING enabled
    DEBUG POP3: authentication command trace suppressed
    DEBUG POP3: authentication command succeeded
    C: STAT
    S: EOF
    C: QUIT
    S: EOF
    Exception in thread "main" javax.mail.MessagingException: Open failed;
      nested exception is:
         java.io.EOFException: EOF on socket
         at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:228)
         at com.myTest.TestOpenInbox.execute(TestOpenInbox.java:26)
         at com.myTest.TestOpenInbox.main(TestOpenInbox.java:13)
    Caused by: java.io.EOFException: EOF on socket
         at com.sun.mail.pop3.Protocol.readResponse(Protocol.java:742)
         at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:687)
         at com.sun.mail.pop3.Protocol.stat(Protocol.java:354)
         at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:203)
         ... 2 moreIt's Greek to me, but it appears everything is kosher until C:STAT S:EOF

  • EOF on socket type t3

    Has anyone ever seen this error before???
              Sun Mar 25 09:12:05 PST 2001:<I> <PosixSocketMux> EOF on socket type t3
              -stephen
              

    Is this causing problems and do you see this over and over again.
              Which version of WLS?
              -- Prasad
              Stephen Schaubach wrote:
              > Has anyone ever seen this error before???
              >
              > Sun Mar 25 09:12:05 PST 2001:<I> <PosixSocketMux> EOF on socket type t3
              >
              > -stephen
              

  • When I try to log on to my ichat I get the error message "An undefined AIM socket error has occurred.". How do I resolve this?

    The error message "An undefined AIM socket error has occurred." comes up when I try and log on to ichat.

    I have the same issue. Does anybody know why this has happened

  • If I copy the "lcds" folder, Tomcat starts with socket errors

    In the documentation it is said that when you create a new server-side application, you can start by copying the 'webapps/lcds' folder. I did that but then, Tomcat starts with some socket errors:
    [LCDS]SocketServer 'my-rtmp-SocketServer' failed to pre-validate desired socket settings for BindSocketAddress: 0.0.0.0:2038
    java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
    [LCDS]SocketServer 'my-rtmp-SocketServer' failed to start.
    flex.messaging.LocalizedException: SocketServer 'my-rtmp-SocketServer' cannot bind to accept client connections on port '2038' because another process has already bound the port. Please ensure that multiple endpoints across all applications  are not configured to use this same port.
    Am I doing something wrong?
    Thanks,
    Borek

    What is happening is that you are getting a port conflict for the socket-based NIO and RTMP endpoints used in the channel definitions in the services-config.xml file of your new web app. The issue is that you have endpoints bound to the same port  in the LCDS web and in your new web app.
    You can deal with this one of two ways:
    Option 1: In that services-config.xml file, search on "RTMP" and "NIO" to find the channel definitions and change the port numbers to something slightly different than the ones used in the LCDS web app.
    Options 2: Move the LCDS web app out of the picture so it doesn't get loaded, and just use a template for future web apps. If you aren't using it for any of your development, there is really no reason you have to load it.
    I'll add a note about this to the documentation that talks about using the LCDS web app as a template.

  • Imap performance and socket errors

    -bash-3.00$ imsimta version
    Sun Java(tm) System Messaging Server 6.2-8.04 (built Feb 28 2007)
    libimta.so 6.2-8.04 (built 19:28:07, Feb 28 2007)
    SunOS vmpm1 5.10 Generic_141414-02 sun4u sparc SUNW,Sun-Fire-V490
    We're experiencing imap problems that appear to be load related, and have had to restart mail services several times to restore service. The imap logs show a large number of socket errors. The server load average is in the 1-2 range; there's no apparent memory resource problem. We're seeing 600-1000 simultaneous imap sessions, which is a higher number than in the past. We run JMS & Communications Express on dedicated V490 SPARC server with 8GB of memory. We're planning to add an additional 8GB this Friday.
    Our imap configuration settings are as follows:
    -bash-3.00$ configutil | grep service.imap
    service.imap.enable = 1
    service.imap.enablesslport = yes
    service.imap.idletimeout = 30
    service.imap.maxsessions = 4000
    service.imap.maxthreads = 250
    service.imap.numprocesses = 1
    service.imap.objectclass = top
    service.imap.plaintextmincipher = 0
    service.imap.port = 143
    service.imap.sslcachesize = 0
    service.imap.sslport = 993
    service.imap.sslusessl = yes
    Can you suggest additional troubleshooting steps? Do you recommend any configuration changes?
    Thanks.

    dpelinka wrote:
    Questions:
    1. Our JMS version info doesn't state whether it is 32 or 64-bit. Therefore, I assume we are running a 32-bit version. Is that correct?Correct. There is no 64-bit version of MS6.2.
    2. Is there a virtual memory limit on the 32-bit version of JMS 6.2? Is the limit greater for JMS 6.3?The Solaris OS imposes the virtual memory size limit of ~3.75GB for all 32bit processes on SPARC. 64-bit processes have a much much larger limit.
    http://developers.sun.com/solaris/articles/solaris_memory.html
    Regards,
    Shane.

  • Getting "Error Establishing Socket " error while running the application

    Hi,
    Can Any one help me as I getting the following error while inserting data into database for after some rows and will insert for some rows then again some error . I googled but but didnt get any proper solution.
    Soultion what I got it is
    1) turn off windows firewall.
    2) change server TCP/IP settings.
    3) It will give probelm with windows XP SP 2
    I tried all but didnt able to solve that.
    I am using Java 1.5, MSSQL server 2000,and eclipse 3.2,windows XP SP2
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.aztecsoft.quality.DatabaseConnectionQLTYSRV.getCon(DatabaseConnectionQLTYSRV.java:25)
    at com.aztecsoft.quality.DatabaseQuery.getDaytoCountRow(DatabaseQuery.java:147)
    at com.aztecsoft.quality.ProjectTrackerUtil.getNetworkDays(ProjectTrackerUtil.java:73)
    at com.aztecsoft.quality.ProjectPlan.calODurationinDays(ProjectPlan.java:81)
    at com.aztecsoft.quality.ProjectPlan.projectSummary(ProjectPlan.java:25)
    at com.aztecsoft.quality.ProjectPlan.main(ProjectPlan.java:126)
    Thanks in advance.

    Hi this is gopi,Hyd.Is your Problem "Getting "Error Establishing Socket " error while running the application" solved if so can you reply me i am waiting for this answer

  • The system cannot find the file specified.Windows sockets error code:2.

    Hi All,
      I am on MDM 5.5 SP6.
      I am getting the following error message when trying to logging in to the DM.
    The system cannot find the file specified.Windows sockets error code:2.This application will now exit.
    Runtime Error :
    Program C :\Program Files\SAP MDM 5.5\Data Manager\Datamanager.exe
    R6025.
    -Pure virtual function call.
    And in console also the MDM server is stopped after getting the above error message.
    Can anybody tell me what could be the problem?
    Thanks & Regards
    Sireesha.

    Hi Sireesha,
    According to me, there can be 3 problems,
    1. Kindly check whether the MDM server is stopped. If it is, then restart the MDM Server and Load the repository with Update indices.
    2. If this error is coming with every repository, the problem will be either in the Version mismatch of the Server and the GUI's you are using. Kindly ensure that the versions for the MDM server and the MDM Gui's Match.
    3. If only Data manager Client is giving the problem, then you can un-install and install the DM GUI again.
    Along with this, please refer to the link below :
    [[The system cannot find the file specified.Windows sockets error code:2.;]
    Hope it helps.
    Thanks and Regards
    Nitin jain

  • Unrecognized Windows Sockets Error: 0: JVM_Bind

    I'm not entirely sure if I compacted this well enough, but after class declaration and method calling, it is essentially what my program does.
    Server server = new Server(); // Creates a ServerSocket and binds it to a port.
    Client client = new Client(server.getSocketAddress());
    public Client(SocketAddress bind)
         try
              socket = new Socket();
              socket.bind(bind); // Problem here
              recieve = new Scanner(socket.getInputStream());
              send = new Formatter(socket.getOutputStream());
         catch (IOException e)
              e.printStackTrace();
    }Running the above code produces the following exception.
    java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(Unknown Source)
         at java.net.Socket.bind(Unknown Source)
         at GameObjects.PlayArea$Client.<init>(PlayArea.java:318)
         at GameObjects.PlayArea.<init>(PlayArea.java:48)
         at MenuStates.GamePlayState.initializePlayArea(GamePlayState.java:90)
         at MenuStates.CreateGameState.mouseClicked(CreateGameState.java:106)
         at Manager.GameManager.mouseClicked(GameManager.java:428)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Window.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         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)I don't even know what this exception is, and I can't find anything that will really tell me what is going on. Can anyone tell me what is happening here?
    I know that this question isn't directly related to Game Development, but I am using it in a game program, and I posted this question in the Network forum, and they flooded my topic with useless messages, and the only person who actually answered my question was extremely vague about it, even after I asked him to clarify. I am hoping that the good people of this forum will be more helpful.

    In some cases, the server socket used to need more time to be available. If you run several test, you need time to reuse the same port (for Windows 7). I could try the following code:
    Server server = new Server(); // Creates a ServerSocket and binds it to a port.
    Thread.sleep(500); // Waiting for server to be available
    Client client = new Client(server.getSocketAddress());
    public Client(SocketAddress bind)
         try
              socket = new Socket();
              socket.bind(bind); // Problem here
              recieve = new Scanner(socket.getInputStream());
              send = new Formatter(socket.getOutputStream());
              Thread.sleep(500); // Time to execute the sme port in another test.
         catch (IOException e)
              e.printStackTrace();
    }

  • Unrecognized Windows Sockets error: 10106: create

    Am getting the following error when I use tcp-mon to sniff the HTTP traffic. Same when I use SOAP-UI.
    I'm using windows 7 and using "jdk1.6.0_13". Any help on this pls .
    java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
    at java.net.Socket.createImpl(Socket.java:388)
    at java.net.Socket.<init>(Socket.java:362)
    at java.net.Socket.<init>(Socket.java:180)
    at org.apache.ws.commons.tcpmon.SocketWaiter.halt(SocketWaiter.java:98)
    at org.apache.ws.commons.tcpmon.Listener.stop(Listener.java:543)
    at org.apache.ws.commons.tcpmon.SocketWaiter.run(SocketWaiter.java:87)

    Winsock error 10106. 8 seconds in Google. Looks like something wrong with your operating system installation.

  • Unrecognized Windows Sockets error...

    Hello everybody!
    I am encountering the following problem, when I try to run a program which wants to access the internet. I pasted an extract from the source code here, which I think includes the critical lines:
    import java.net.*;
    import java.io.*;
    class FindLinks {
    public static Vector findLinks (String address) throws Exception {
    URL u = new URL(address);
    InputStream ins = u.openStream();
    InputStreamReader isr = new InputStreamReader(ins);
    BufferedReader webPage = new BufferedReader(isr);
    When I run the complete program, I get the following message:
    Exception in thread "main" java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
    at java.net.Socket.createImpl(Socket.java:313)
    at java.net.Socket.connect(Socket.java:424)
    at java.net.Socket.connect(Socket.java:376)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:386)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:602)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:303)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:264)
    at sun.net.www.http.HttpClient.New(HttpClient.java:336)
    at sun.net.www.http.HttpClient.New(HttpClient.java:317)
    at sun.net.www.http.HttpClient.New(HttpClient.java:312)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect HttpURLConnection.java:481)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:472)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:574)
    at java.net.URL.openStream(URL.java:960)
    at FindLinks.findLinks(FindLinks.java:10)
    at FindLinks.main(FindLinks.java:47)
    I am using the new Java SDK 1.41 on a Windows XP machine. Does anyone has an idea what might be causing this problem?
    Kind regards
    Linus

    I know, but you triple posted

Maybe you are looking for

  • Call filter missing in 925

    yesterday i bought 925 and a feature was missing in this device was call and sms filter. i dont know why nokia forgot to add this feature in 925 when it is available in Amber. Solved! Go to Solution.

  • How to save xml and xsl function to a data grid column

    hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save

  • Firefox shifts page layout with larger images

    This is a Firefox specific issue. In IE, it displays as expected. I have two pages. One has dynamic links and the other has an image. Each shares the exact same page layout, well, after messing with it for a day, this is no longer actually true but e

  • Issue in populating dynamic values in smartform

    Hi Experts, I am facing some serious alignment issue while populating dynamic values in smartform. Through table, I am populating  dynamic values in smart form. If my internal table contains 20 records , first 10 records are populating in first page

  • How to setup dataguard on oracle 10g..........

    Hi! i want to setup dataguard on oracle 10g .....i have two same databases installed on my system 1)one oracle database 10g on c windows xp 2)second oracle database 10g on Vmware machine lying on red hat linux 4 actually i want ot setup dataguard on