Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

rrc7cz
Hello,

I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework 1.1.1

The only documentation I found online about this error was one guy who
had a corrupted jar file. I've redownloaded all three jars multiple
times and I always get the same error. Not sure if there is a checksum
available for them, but I doubt this is the problem... unless a bad
build somehow got published.

When I try to send an e-mail I get the following error (the actual
host is valid and tested via telnet to port 25, xxx here):

Caused by: com.idc.cms.content.syndication.transports.SyndicationTransportException:
org.apache.commons.mail.EmailException: Sending the email to the
following server failed : relay.xxx.com:25
        at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110)
        at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55)
        at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43)
        at com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79)
        ... 26 more
Caused by: org.apache.commons.mail.EmailException: Sending the email
to the following server failed : relay.xxx.com:25
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
        at org.apache.commons.mail.Email.send(Email.java:1163)
        at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107)
        ... 29 more
Caused by: java.lang.NoSuchMethodError:
com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
        at javax.mail.Service.connect(Service.java:233)
        at javax.mail.Service.connect(Service.java:134)
        at javax.mail.Service.connect(Service.java:86)
        at javax.mail.Transport.send0(Transport.java:162)
        at javax.mail.Transport.send(Transport.java:80)
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
        ... 31 more

The code:


                // Create the email message
                MultiPartEmail email = new MultiPartEmail();
                email.setHostName(host);
                email.setSubject(subject);

                // Finish the configuration
                email.addTo(emailAccount.getAddress(), emailAccount.getName());
                email.setFrom(fromAddress, fromName);
                email.setMsg(body);

                // Add the attachment
                email.attach(createAttachment(file));

                // Send the email
                email.send();

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

Jörg Schaible-3
Robert Campbell wrote:
> Hello,
>
> I am using Commons Email 1.1 with JavaMail 1.4.1 and
> Activation Framework 1.1.1

[snip]

Which platform do you use i.e. OS, JDK version and vendor?

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

rrc7cz
Running XP Pro SP2 with JDK Compliance set to 1.6 , JRE 1.6.0_03 is
the selected runtime environment.

Kinda strange to say this, but I don't exactly know how to pinpoint
the JDK being used by Eclipse to compile these classes. Again, the
compliance level is set to 1.6, and I have a 1.6 JDK installed on my
machine, but my old JAVA_HOME env var points to JDK 1.5...

I'm posting on another forum now how to pinpoint the exact javac
version being called by Eclipse, how it selects the JDK, etc.



On Fri, Nov 28, 2008 at 11:34 AM, Jörg Schaible
<[hidden email]> wrote:

> Robert Campbell wrote:
>> Hello,
>>
>> I am using Commons Email 1.1 with JavaMail 1.4.1 and
>> Activation Framework 1.1.1
>
> [snip]
>
> Which platform do you use i.e. OS, JDK version and vendor?
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

rrc7cz
So Eclipse uses:

An incremental Java compiler. Implemented as an Eclipse builder, it is
based on technology evolved from VisualAge for Java compiler. In
particular, it allows to run and debug code which still contains
unresolved errors.

So when I select JDK Compliance level 1.6 and run it in a 1.6 JRE, I
guess we can assume we're on 1.6 :-)



On Fri, Nov 28, 2008 at 11:54 AM, Robert Campbell <[hidden email]> wrote:

> Running XP Pro SP2 with JDK Compliance set to 1.6 , JRE 1.6.0_03 is
> the selected runtime environment.
>
> Kinda strange to say this, but I don't exactly know how to pinpoint
> the JDK being used by Eclipse to compile these classes. Again, the
> compliance level is set to 1.6, and I have a 1.6 JDK installed on my
> machine, but my old JAVA_HOME env var points to JDK 1.5...
>
> I'm posting on another forum now how to pinpoint the exact javac
> version being called by Eclipse, how it selects the JDK, etc.
>
>
>
> On Fri, Nov 28, 2008 at 11:34 AM, Jörg Schaible
> <[hidden email]> wrote:
>> Robert Campbell wrote:
>>> Hello,
>>>
>>> I am using Commons Email 1.1 with JavaMail 1.4.1 and
>>> Activation Framework 1.1.1
>>
>> [snip]
>>
>> Which platform do you use i.e. OS, JDK version and vendor?
>>
>> - Jörg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

sebb-2-2
In reply to this post by rrc7cz
On 28/11/2008, Robert Campbell <[hidden email]> wrote:

> Hello,
>
>  I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework 1.1.1
>
>  The only documentation I found online about this error was one guy who
>  had a corrupted jar file. I've redownloaded all three jars multiple
>  times and I always get the same error. Not sure if there is a checksum
>  available for them, but I doubt this is the problem... unless a bad
>  build somehow got published.
>
>  When I try to send an e-mail I get the following error (the actual
>  host is valid and tested via telnet to port 25, xxx here):
>
>  Caused by: com.idc.cms.content.syndication.transports.SyndicationTransportException:
>  org.apache.commons.mail.EmailException: Sending the email to the
>  following server failed : relay.xxx.com:25
>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110)
>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55)
>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43)
>         at com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79)
>         ... 26 more
>  Caused by: org.apache.commons.mail.EmailException: Sending the email
>  to the following server failed : relay.xxx.com:25
>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
>         at org.apache.commons.mail.Email.send(Email.java:1163)
>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107)
>         ... 29 more
>  Caused by: java.lang.NoSuchMethodError:
>  com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;

Have you tried using Eclipse to look at the jar to see if the
SocketFetcher class exists?
And if so, what the method names and parameters are?

I just did this for my copy of Javamail 1.4.1 and the class exists,
but the getSocket methods are:

getSocket(String, int, Properties, String)
getSocket(String, int, Properties, String, boolean)

whereas the code is looking for

getSocket(String, Properties, String)

Looks like a bug in the Javamail code, as this method is called by
other Javamail routines.

Commons Mail only provides classes in the org.apache.commons.mail package.

Make sure you don't have multiple copies of the mail jar on the path.

>         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
>         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
>         at javax.mail.Service.connect(Service.java:233)
>         at javax.mail.Service.connect(Service.java:134)
>         at javax.mail.Service.connect(Service.java:86)
>         at javax.mail.Transport.send0(Transport.java:162)
>         at javax.mail.Transport.send(Transport.java:80)
>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
>         ... 31 more
>
>  The code:
>
>
>                 // Create the email message
>                 MultiPartEmail email = new MultiPartEmail();
>                 email.setHostName(host);
>                 email.setSubject(subject);
>
>                 // Finish the configuration
>                 email.addTo(emailAccount.getAddress(), emailAccount.getName());
>                 email.setFrom(fromAddress, fromName);
>                 email.setMsg(body);
>
>                 // Add the attachment
>                 email.attach(createAttachment(file));
>
>                 // Send the email
>                 email.send();
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [hidden email]
>  For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

rrc7cz
How can it be a bug in JavaMail? Release 1.4.1 has been out since
October 22, 2007. I'm sure any problems would have been noticed and
resolved by now. Likewise Commons Email 1.1 was release around Sept
2007.

I can't imagine this is a bug... The whole situation is strange.



On Fri, Nov 28, 2008 at 1:39 PM, sebb <[hidden email]> wrote:

> On 28/11/2008, Robert Campbell <[hidden email]> wrote:
>> Hello,
>>
>>  I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework 1.1.1
>>
>>  The only documentation I found online about this error was one guy who
>>  had a corrupted jar file. I've redownloaded all three jars multiple
>>  times and I always get the same error. Not sure if there is a checksum
>>  available for them, but I doubt this is the problem... unless a bad
>>  build somehow got published.
>>
>>  When I try to send an e-mail I get the following error (the actual
>>  host is valid and tested via telnet to port 25, xxx here):
>>
>>  Caused by: com.idc.cms.content.syndication.transports.SyndicationTransportException:
>>  org.apache.commons.mail.EmailException: Sending the email to the
>>  following server failed : relay.xxx.com:25
>>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110)
>>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55)
>>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43)
>>         at com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79)
>>         ... 26 more
>>  Caused by: org.apache.commons.mail.EmailException: Sending the email
>>  to the following server failed : relay.xxx.com:25
>>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
>>         at org.apache.commons.mail.Email.send(Email.java:1163)
>>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107)
>>         ... 29 more
>>  Caused by: java.lang.NoSuchMethodError:
>>  com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
>
> Have you tried using Eclipse to look at the jar to see if the
> SocketFetcher class exists?
> And if so, what the method names and parameters are?
>
> I just did this for my copy of Javamail 1.4.1 and the class exists,
> but the getSocket methods are:
>
> getSocket(String, int, Properties, String)
> getSocket(String, int, Properties, String, boolean)
>
> whereas the code is looking for
>
> getSocket(String, Properties, String)
>
> Looks like a bug in the Javamail code, as this method is called by
> other Javamail routines.
>
> Commons Mail only provides classes in the org.apache.commons.mail package.
>
> Make sure you don't have multiple copies of the mail jar on the path.
>
>>         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
>>         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
>>         at javax.mail.Service.connect(Service.java:233)
>>         at javax.mail.Service.connect(Service.java:134)
>>         at javax.mail.Service.connect(Service.java:86)
>>         at javax.mail.Transport.send0(Transport.java:162)
>>         at javax.mail.Transport.send(Transport.java:80)
>>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
>>         ... 31 more
>>
>>  The code:
>>
>>
>>                 // Create the email message
>>                 MultiPartEmail email = new MultiPartEmail();
>>                 email.setHostName(host);
>>                 email.setSubject(subject);
>>
>>                 // Finish the configuration
>>                 email.addTo(emailAccount.getAddress(), emailAccount.getName());
>>                 email.setFrom(fromAddress, fromName);
>>                 email.setMsg(body);
>>
>>                 // Add the attachment
>>                 email.attach(createAttachment(file));
>>
>>                 // Send the email
>>                 email.send();
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [hidden email]
>>  For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

sebb-2-2
The stack trace shows that the missing JavaMail method is being called
by another JavaMail method.

Therefore the problem is in the JavaMail code.

Whether it is a bug or a corrupted jar or multiple jars, I cannot tell.

On 28/11/2008, Robert Campbell <[hidden email]> wrote:

> How can it be a bug in JavaMail? Release 1.4.1 has been out since
>  October 22, 2007. I'm sure any problems would have been noticed and
>  resolved by now. Likewise Commons Email 1.1 was release around Sept
>  2007.
>
>  I can't imagine this is a bug... The whole situation is strange.
>
>
>
>
>  On Fri, Nov 28, 2008 at 1:39 PM, sebb <[hidden email]> wrote:
>  > On 28/11/2008, Robert Campbell <[hidden email]> wrote:
>  >> Hello,
>  >>
>  >>  I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework 1.1.1
>  >>
>  >>  The only documentation I found online about this error was one guy who
>  >>  had a corrupted jar file. I've redownloaded all three jars multiple
>  >>  times and I always get the same error. Not sure if there is a checksum
>  >>  available for them, but I doubt this is the problem... unless a bad
>  >>  build somehow got published.
>  >>
>  >>  When I try to send an e-mail I get the following error (the actual
>  >>  host is valid and tested via telnet to port 25, xxx here):
>  >>
>  >>  Caused by: com.idc.cms.content.syndication.transports.SyndicationTransportException:
>  >>  org.apache.commons.mail.EmailException: Sending the email to the
>  >>  following server failed : relay.xxx.com:25
>  >>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110)
>  >>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55)
>  >>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43)
>  >>         at com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79)
>  >>         ... 26 more
>  >>  Caused by: org.apache.commons.mail.EmailException: Sending the email
>  >>  to the following server failed : relay.xxx.com:25
>  >>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
>  >>         at org.apache.commons.mail.Email.send(Email.java:1163)
>  >>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107)
>  >>         ... 29 more
>  >>  Caused by: java.lang.NoSuchMethodError:
>  >>  com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
>  >
>  > Have you tried using Eclipse to look at the jar to see if the
>  > SocketFetcher class exists?
>  > And if so, what the method names and parameters are?
>  >
>  > I just did this for my copy of Javamail 1.4.1 and the class exists,
>  > but the getSocket methods are:
>  >
>  > getSocket(String, int, Properties, String)
>  > getSocket(String, int, Properties, String, boolean)
>  >
>  > whereas the code is looking for
>  >
>  > getSocket(String, Properties, String)
>  >
>  > Looks like a bug in the Javamail code, as this method is called by
>  > other Javamail routines.
>  >
>  > Commons Mail only provides classes in the org.apache.commons.mail package.
>  >
>  > Make sure you don't have multiple copies of the mail jar on the path.
>  >
>  >>         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
>  >>         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
>  >>         at javax.mail.Service.connect(Service.java:233)
>  >>         at javax.mail.Service.connect(Service.java:134)
>  >>         at javax.mail.Service.connect(Service.java:86)
>  >>         at javax.mail.Transport.send0(Transport.java:162)
>  >>         at javax.mail.Transport.send(Transport.java:80)
>  >>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
>  >>         ... 31 more
>  >>
>  >>  The code:
>  >>
>  >>
>  >>                 // Create the email message
>  >>                 MultiPartEmail email = new MultiPartEmail();
>  >>                 email.setHostName(host);
>  >>                 email.setSubject(subject);
>  >>
>  >>                 // Finish the configuration
>  >>                 email.addTo(emailAccount.getAddress(), emailAccount.getName());
>  >>                 email.setFrom(fromAddress, fromName);
>  >>                 email.setMsg(body);
>  >>
>  >>                 // Add the attachment
>  >>                 email.attach(createAttachment(file));
>  >>
>  >>                 // Send the email
>  >>                 email.send();
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: [hidden email]
>  >>  For additional commands, e-mail: [hidden email]
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [hidden email]
>  > For additional commands, e-mail: [hidden email]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [hidden email]
>  For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Email - NoSuchMethodError com.sun.mail.util.SocketFetcher.getSocket

rrc7cz
Hi sebb - I got it working thanks to you help.

Before posting here I made sure there was no smtp.jar or mail.jar in
my classpath. When I move my one mail.jar up to the top of the
classpath, however, it runs fine. This means in one of the many
libraries we have in our path, there must be a conflict. We're using
Axis, Batik, Derby, Saxon, and maybe 30 others. I will have to figure
this out, but at least I know where to look now.

Thanks!


On Fri, Nov 28, 2008 at 2:30 PM, sebb <[hidden email]> wrote:

> The stack trace shows that the missing JavaMail method is being called
> by another JavaMail method.
>
> Therefore the problem is in the JavaMail code.
>
> Whether it is a bug or a corrupted jar or multiple jars, I cannot tell.
>
> On 28/11/2008, Robert Campbell <[hidden email]> wrote:
>> How can it be a bug in JavaMail? Release 1.4.1 has been out since
>>  October 22, 2007. I'm sure any problems would have been noticed and
>>  resolved by now. Likewise Commons Email 1.1 was release around Sept
>>  2007.
>>
>>  I can't imagine this is a bug... The whole situation is strange.
>>
>>
>>
>>
>>  On Fri, Nov 28, 2008 at 1:39 PM, sebb <[hidden email]> wrote:
>>  > On 28/11/2008, Robert Campbell <[hidden email]> wrote:
>>  >> Hello,
>>  >>
>>  >>  I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework 1.1.1
>>  >>
>>  >>  The only documentation I found online about this error was one guy who
>>  >>  had a corrupted jar file. I've redownloaded all three jars multiple
>>  >>  times and I always get the same error. Not sure if there is a checksum
>>  >>  available for them, but I doubt this is the problem... unless a bad
>>  >>  build somehow got published.
>>  >>
>>  >>  When I try to send an e-mail I get the following error (the actual
>>  >>  host is valid and tested via telnet to port 25, xxx here):
>>  >>
>>  >>  Caused by: com.idc.cms.content.syndication.transports.SyndicationTransportException:
>>  >>  org.apache.commons.mail.EmailException: Sending the email to the
>>  >>  following server failed : relay.xxx.com:25
>>  >>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110)
>>  >>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55)
>>  >>         at com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43)
>>  >>         at com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79)
>>  >>         ... 26 more
>>  >>  Caused by: org.apache.commons.mail.EmailException: Sending the email
>>  >>  to the following server failed : relay.xxx.com:25
>>  >>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
>>  >>         at org.apache.commons.mail.Email.send(Email.java:1163)
>>  >>         at com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107)
>>  >>         ... 29 more
>>  >>  Caused by: java.lang.NoSuchMethodError:
>>  >>  com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
>>  >
>>  > Have you tried using Eclipse to look at the jar to see if the
>>  > SocketFetcher class exists?
>>  > And if so, what the method names and parameters are?
>>  >
>>  > I just did this for my copy of Javamail 1.4.1 and the class exists,
>>  > but the getSocket methods are:
>>  >
>>  > getSocket(String, int, Properties, String)
>>  > getSocket(String, int, Properties, String, boolean)
>>  >
>>  > whereas the code is looking for
>>  >
>>  > getSocket(String, Properties, String)
>>  >
>>  > Looks like a bug in the Javamail code, as this method is called by
>>  > other Javamail routines.
>>  >
>>  > Commons Mail only provides classes in the org.apache.commons.mail package.
>>  >
>>  > Make sure you don't have multiple copies of the mail jar on the path.
>>  >
>>  >>         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
>>  >>         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
>>  >>         at javax.mail.Service.connect(Service.java:233)
>>  >>         at javax.mail.Service.connect(Service.java:134)
>>  >>         at javax.mail.Service.connect(Service.java:86)
>>  >>         at javax.mail.Transport.send0(Transport.java:162)
>>  >>         at javax.mail.Transport.send(Transport.java:80)
>>  >>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
>>  >>         ... 31 more
>>  >>
>>  >>  The code:
>>  >>
>>  >>
>>  >>                 // Create the email message
>>  >>                 MultiPartEmail email = new MultiPartEmail();
>>  >>                 email.setHostName(host);
>>  >>                 email.setSubject(subject);
>>  >>
>>  >>                 // Finish the configuration
>>  >>                 email.addTo(emailAccount.getAddress(), emailAccount.getName());
>>  >>                 email.setFrom(fromAddress, fromName);
>>  >>                 email.setMsg(body);
>>  >>
>>  >>                 // Add the attachment
>>  >>                 email.attach(createAttachment(file));
>>  >>
>>  >>                 // Send the email
>>  >>                 email.send();
>>  >>
>>  >>  ---------------------------------------------------------------------
>>  >>  To unsubscribe, e-mail: [hidden email]
>>  >>  For additional commands, e-mail: [hidden email]
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: [hidden email]
>>  > For additional commands, e-mail: [hidden email]
>>  >
>>  >
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [hidden email]
>>  For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]