: Weblogic and javax.mail
Even I was facing the same problem(Provider rfc )as Jon has, solved it
thanks to Phil.. set the mail.jar ahead of weblogic.jar.
But now am getting a different error...
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
[email protected]
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at email.Email.send(Email.java:98)
at jsp_servlet._email._jspService(_email.java:88)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Any thoughts!!
Thanks!
hariharan
"Phil Magill" <[email protected]> wrote in message
news:<[email protected]>...
Download the JavaMail Api from sun and add the mail.jar file as the first
entry on your classpath as these will be call before weblogics internal
version. There are two files missing from Weblogic which resolve the
providors.
Cheers
Phil
"Dimitri Rakitine" <[email protected]> wrote in message
news:[email protected]..
Install service pack 6
Jon Crater <[email protected]> wrote:
I'm having problems sending JavaMail through Weblogic. When I call my
JavaMail wrapper class from the command line, mail gets sent fine, butwhen
I try to call them from a servlet in Weblogic, I get a MessagingException:
"No provider for Address type rfc822"
Any ideas?Dimitri
Hi,
Line: "550 5.7.1 Unable to relay for [email protected]"
seems to be message from your SMTP server. Try different recipient or
different SMTP server.
t.Tero
hari wrote:
Even I was facing the same problem(Provider rfc )as Jon has, solved it
thanks to Phil.. set the mail.jar ahead of weblogic.jar.
But now am getting a different error...
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
[email protected]
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at email.Email.send(Email.java:98)
at jsp_servlet._email._jspService(_email.java:88)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Any thoughts!!
Thanks!
hariharan
"Phil Magill" <[email protected]> wrote in message
news:<[email protected]>...
Download the JavaMail Api from sun and add the mail.jar file as the first
entry on your classpath as these will be call before weblogics internal
version. There are two files missing from Weblogic which resolve the
providors.
Cheers
Phil
"Dimitri Rakitine" <[email protected]> wrote in message
news:[email protected]...
Install service pack 6
Jon Crater <[email protected]> wrote:
I'm having problems sending JavaMail through Weblogic. When I call my
JavaMail wrapper class from the command line, mail gets sent fine, butwhen
I try to call them from a servlet in Weblogic, I get a MessagingException:
"No provider for Address type rfc822"
Any ideas?Dimitri
// Tero Soukko
// iobox - A Terra Mobile Company
// +358 50 5435259
// [email protected], [email protected] (m-mail)
// http://www.iobox.fi, We bring the Internet to your mobile.
Similar Messages
-
Wanna download javax.mail.* and javax.mail.internet.*
Hi all;
i'm a beginner in JSP and want help in downloading api classes for javax.mail.* and javax.mail.internet.*...would any1 like to tell me the URL for it and also after downloading, wat sequence would i follow to make these files run properly with my code.
would b waiting desperately for immediate response.
Regards.Go to
http://java.sun.com
There are 5 drop List. Under the 2nd Drop List Search for JavaMail(TM) API 1.3. Now continue to download. U will download a file names javamail-1_3.zip. There are some jar files which u need to extract and add to ur classpath settings.
Not use the following code to send a simple SMTP Mail.
//Java specific imports
import javax.activation.FileDataSource;
import javax.activation.DataHandler;
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class SendMail
Session session = null;
public SendMail() throws Exception
Properties props = new Properties();
String strMailIPServer = "Your SMTP Server IP";
props.put("mail.smtp.host", strMailIPServer);
session = Session.getDefaultInstance(props, null);
public void sendMail(String strToAddress, String strFromAddress, String strSubject, String strMessage) throws Exception
try
long intTimeForTenMinutes = 60;
MimeMessage objMimeMsg = new MimeMessage(session);
//Address objFromAddr = new InternetAddress(strFromAddress);
javax.mail.internet.InternetAddress objFromAddr = new javax.mail.internet.InternetAddress (strFromAddress);
Address[] objToAddr = InternetAddress.parse(strToAddress);
objMimeMsg.setFrom(objFromAddr);
objMimeMsg.setRecipients(Message.RecipientType.TO, objToAddr);
objMimeMsg.setSubject(strSubject);
objMimeMsg.setContent(strMessage, "text/html");
Transport.send(objMimeMsg);
catch (Exception mex)
throw mex;
All the Best!
Thanks and regards,
Pazhanikanthan. P -
SOAP and javax.mail.internet.ContentType
Hi there,
I have a problem with a very simple SOAP app:
I get a saaj error "Unable to internalize message", which gets caused by a
NoClassDefFoundError: javax/mail/internet/ContentTypeI have tried everything:
1) Copied mail.jar to ./jre/lib/ext
2) Added the directory containing mail.jar to the CLASSPATH, in Windoze and in Sun ONE Studio
When I try to instantiate javax.mail.internet.ContentType in the same app, it works fine, i.e. the class can be found, but saaj doesn't see it for some strange reason.
Any ideas?
I am using the Web Services pack 1.3 and java version:
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)Thanks in advance
AndiYou also need to have the Java Activation Framework available (activation.jar).
The NoClassDefFoundErr can me caused by a class being used by a class not being found. -
Java Frrustration with Windows and javax.mail
Please help.
I was under the impression that if you could get java compiled (on any plat form) in my case a linux box and you had the correct version of java (J2sdk1.4.2) that your application etc would run on say a windows box. Is this correct or do you have to recompile the application on for each different platform. My application is running perfectly on a Linux box and I was wanting to see if it would run on a windows box. Having some problems compiling due to class path errors with javax.mail, but if I don't need to recompile for windows, I'll focus on just getting it running ona windows box vrs trying to recompile on windows.
ThanksO.K. I got my java server to start on windows, thanks for the help and everything seems to be working correctly except that
the server will not update the mysql database.
It can select the data, but can not update the table.
I have check the permission, and even changed to a root login and no luck.
My linux version (working) is running MySql 4.0.23 and connector of
export CLASSPATH=$CLASSPATH:./classes/mysql-connector-java-3.0.9-stable-bin.jar
My windows version MySQL 4.1.10-nt
I have played with a few different version of connectors and all will allow me to connect
3.0.9
3.0.11
3.0.16-ga-bin
none seem to allow me to update on the mysql database which is (being a database person and not a java person.) pertty strange, cause I do understand the database stuff....
Thanks for any idea's -
Javax.mail. package not recognised
Hi people!!!!
Please help me out as I am new to j2ee/JavaMail
I have the j2ee sdk 1.4 installed as well as j2se1.4.2/netbeans conbundle.
I would create to a simple application that sends an email. However, the compiler doesn't recognise the javax.mail.* and javax.mail.internet.* packages.
When I type j2ee -verbose at the command prompt it states that it doesn't recognise the command.
I have set my environment variables as follows:
J2EE_PATH: C:\Sun\AppServer\
J2EE_HOME: C:\Sun\AppServer\
JAVA_HOME: C:\Program Files\j2sdk_nb\j2sdk1.4.2\
System Variables:
CLASSPATH: C:\Sun\AppServer\lib\j2ee.jar
PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MSSQL7\BINN;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\;C:\TOOLS\Tomcat4.1\webapps\Intranet\WEB-INF\classes\;C:\Sun\AppServer\bin\
Do perhaps know what I have not done correctly....
Thanks, any assistance will be much appreciated.
You may email your answers to me at [a href='mailto:[email protected]'][email protected][\a] if you wish
Regards
UshantaHey I have added the mail.jar file to my classpath and I don't get this error any more.... Unfortunately, though I get a java.lang.NoClassDefFoundError Exception in thread 'main'
I do have a main method, here is my code:
import javax.mail.*;
import javax.mail.internet.*;
import java.util.Properties;
import java.io.*;
* @author user
public class SimpleSender {
/** Creates a new instance of SimpleSender */
public SimpleSender() {
public static void main(String[] args) {
if (args.length != 3) {
System.out.println("ERROR");
System.exit(1);
String host = args[0];
String to = args[1];
String from = args[2];
String contentType = "text/html";
Properties props = System.getProperties();
props.put("mail.smtp.host", args[0]);
try{
Session session = Session.getDefaultInstance(props, null);
MimeMessage message = new MimeMessage(session);
message.setSubject("Hello");
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
String text = "<h1>testing email</h1>";
message.setContent(text, "text/html");
Transport.send(message);
} catch (MessagingException e) {
e.printStackTrace();
} -
Trying to import javax.mail.*
hi,
I need to make a sort of webmail program for school, i understand most of the things I've read so far about it but when i actually try to program and import javax.mail.* and javax.mail.internet.* Together (the compiler we have to use) doesn't recognise these import
any help would be appreciated because i'm dying to get started :)Hi,
You need to have java mail jar files in your classpath.
They are available for download at http://java.sun.com/products/javamail/downloads/index.html
-Amol -
Newbie Class Loader Errors on javax/mail/Part
I'm a newb to Java but have experience in other languages. I built a command line application using Eclipse 3.0 that runs great in Eclipse. The app takes incoming .eml files from a WinXP server's drop dir, parses the attachments and stashes them as blobs in a database. I've jarred my .class files together and set my Class-Path attributes in the Manifest file and the proggie looks like it wants to run until I get to line 102 in main() where I call on one of my helper classes.
The line reads:
MimeWalker objMime = new MimeWalker();
In my MimeWalker class upon instantiation, I have the initialization routine set up some class objects as follows:
public class MimeWalker {
private int w;
private boolean headerParsed;
private String subject;
private Address from;
private Address to[];
private Date sentDate;
private InputStream bodyCopy;
private String bodyMimeType;
private Properties props;
private Session mailSession;
private MimeMessage message;
private Multipart mPart;
private int partCount;
private String partContentType;
private String partDisposition;
private String partFilename;
private String partMimeType;
private InputStream partData;
/* This method sets the private variables to the necessary values
* to open a file at this point.
public MimeWalker(){
this.props = System.getProperties();
this.props.put("mail.host", "smtp.dummydomain.com");
this.props.put("mail.transport.protocol", "smtp");
this.mailSession = Session.getDefaultInstance(this.props, null);
I have imported javax.mail.*; and javax.mail.internet.*; in my MimeWalker class and since this is the first point in the program where a call to that library is used this is where it's bombing. The bomb message I get is as follows:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Part
at com.jwt.emailProc.EmailProcessor.main(EmailProcessor.java:102)
I've been dealing with this off anf on for almost 2 days now and have searched countless websites for some insight. I have two hypothesis at this point but don't know how valid either is.
1. javax/mail/Part is actually an Interface and not a class so could that be causing my problems? If so how?
2. Because the mail API relys on the activation.jar library there's some anomaly that is preventing it from working properly. activation.jar just like all the other necessary libraries are located in ./stuff/*.jar in relation to my emailProc.jar application.
Thanks in advance for any help you can provide!
--JamesI found out what my problem was. So for all you Java newbs like me remember this!
In the MANIFEST.MF file if you have a line that is longer than 72 bytes (not characters... bytes) the end of the line is scrapped.
That was my problem. As soon as I broke my Class-Path line down into 3 seperate lines with each line starting with a single space and each previous line ending with a single space and cr my app just started working.
The JAR tutorial on this site is a great resource! I advise anyone attempting to Jar their distributions to use it.
-- James -
Javax.jms versus javax.mail
Are javax.jms and javax.mail related in any way?
Both share similar concepts, but are they in any way interdependent on each other?The only they have in common they are both included into J2EE.
JavaMail provides the email processing on a top of SMTP/POP3
e-mail protocol. Generally If you want to send/receive e-mail you
can just use TCP and SMTP/POP3. But it is much better to use
JavaMail.
JMS is the messaging system provided the communication between
Enterprize Java components and is not related to SMTP.
vpanasenko_even -
Javax.mail.NoSuchProviderException: No provider for Address type: rfc822
Use JavaMail 1.2 send Mail Errors:
"javax.mail.NoSuchProviderException: No provider for Address type: rfc822"
Why?
Can you supply a stmp server name?
Thanks.[skyask],
Honestly, I am not very sure where the JVM is located for the WebLogic 5.1 application server. You probably need to contact your local BEA rep office for support.
The jar file for the JavaMail API is either mail.jar (contains the API libraries) or mailapi.jar (contains the API libraries and all the providers), so I guess if you search the WebLogic directories, you might be able to locate it.
It also depends on the OS platform that you are working on and the WebLogic installation documentation may give a clue or two where the .jar files for optional Java packages are found.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
WLS5.1 SP8: using javax.mail
Hi All,
I've just managed to use the javax.mail package to send email from a session
bean, but I'm not happy with the way I did it and I had to hack the
solution, rather than follow the recommended way:
In my weblogic.properties file, I have;
weblogic.resource.MailSession.weblogic.resource.mail.EBCSession=\
mail.from=[email protected], \
mail.host=mail.fluid.com.au
which seems to be correct according to
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#102218
2
When I start WLS, it indicated that it's bound the JNDI name without error
However, in my session bean, I kept getting a runtime error as the session
was trying to connect to a server on localhost, instead of
"mail.fluid.com.au". In other words, it didn't seem to be using the
mail.host setting in weblogic.properties.
I managed to solve the problem by doing this:
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", Utility.getProperty("ebc.mail.host"));
// use mail address from HTML form for from address
props.put("mail.from", "[email protected]");
and sending the props object when creating the session AND THIS WORKED!
I'd prefer to configure the mail session only in weblogic.properties, so is
there another step I need to take to make WLS see/use the mail.host I have
set in weblogic.properties?
Thanks all for your time.
byeeeeeeeeeeeeeeeeeeeeeThe 'nice' way to do what you want is to have your realm implement
the ManageableRealm interface and call those methods instead of
changing the database directly from the Bean.
Also make sure your realm has a way to refresh it's cache (if you
use one) when Users/Groups/ACLs are added/changed in your underlying
data store.
-Don
"Andy Marks" <[email protected]> wrote:
Hi All,
I've hacked the rdbmsrealm example from the standard WLS5.1
install to use
the schema in my Oracle 8.1.6 database instread of the
cloudscape db, and
everything is fine. However...
I'm a little in the dark about how much interaction my
EJBs should have with
the realm? I initially had a bean which controlled user
creation by
populating the same database table that is now mapped
to by my
realm.properties. Should I now delegate the user creation
to the realm
classes instead of my bean?
I've looked through what I think is all the documentation,
but still cannot
really find the "how is it used" information I require.
byeeeeeeeeeeeeeeee
Thanks in advance. -
Package javax.mail not found in import.
hi,
i am trying to develop a mail application using jsp, i have jaf1.0.1 and javamail API and the application was working fine on weblogic but when i tried to do the same thing on Apache server the Package javax.mail not found in import. is occuring,
What could be the problem can any one explain...
ThanksI think you have not placed mail.jar and activation.jar files in the /jre/lib/ext directory. Just place the mail.jar and activation.jar files in the jdk's /jre/lib/ext directory and check out. This will work for you.
Rkanthj -
I am getting this exception , while my application is trying to send mails. The complete stack trace is below
com.bp.ebus.downstream.util.ErrorLevelException: javax.mail.MessagingException: 452 4.4.5 Insufficient disk space; try again
later
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:879)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:599)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:319)
at com.bp.ebus.interfaces.SmtpClient.sendMessage(SmtpClient.java:252)
at com.bp.ebus.interfaces.SmtpClient.send(SmtpClient.java:191)
at com.bp.ebus.downstream.ejb.ServicesSessionBean.sendNewEmails(ServicesSessionBean.java:105)
at com.bp.ebus.downstream.ejb.ServicesSessionBean_f7hinc_EOImpl.sendNewEmails(ServicesSessionBean_f7hinc_EOImpl.java:
166)
at com.bp.ebus.downstream.ejb.ServicesSessionBean_f7hinc_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:262)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:229)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy4.sendNewEmails(Unknown Source)
at com.bp.ebus.lighthouse.jobs.SendEmail.run(SendEmail.java:70)
at java.util.TimerThread.mainLoop(Timer.java:435)
at java.util.TimerThread.run(Timer.java:385)
My OS is solaris and Application server is weblogic.The message is coming from your mail server.
Looks like your server is out of disk space. -
Problems sending email using javax.mail.*
I need to send an email from an application I am working on. I am using the features of the javax.mail package to do so. In looking at the code I am unsure why this is not working. This is my first time using this package so it might be something silly I am missing so any of your thoughts are appreciated. The code is as follows:
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class EmailTester {
public static void main(String[] args) {
try {
//Set the smtp address
Properties props = new Properties();
props.put("mail.smtp.host", args[0] );
// get the default Session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(true);
// create a message for this session
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress from =
new InternetAddress( args[1] );
InternetAddress[] to = new InternetAddress[1];
to[0] = new InternetAddress( args[2] );
msg.setFrom(from);
msg.setRecipients(Message.RecipientType.TO, to);
// set the subject and content type
msg.setSubject("subject");
msg.setContent("this is my test email", "text/plain");
// send the email
Transport.send(msg);
catch (MessagingException me) {I have an EMail class that I use at:
http://www.discoverteenergy.com/files/EMail.java
Feel free to use it or compare against your code to see what is different. -
Problem with recognizing javax.mail.* class ?
Hi Folks,
I am new to JavaMail usage on a standalone java program. I did write a java program to send a mail. The problem is it is not recognizing the javax.mail.* class, though i added on the classpath. I too added mail.jar file in the c:\program files\java\jdk1.5.0_16\lib and added the reference same to the classpath and still it is not recognizing. Do i miss something? help me out guys.
Regards,
jaisuryahHi Shannon,
I hope the configuration i did is well. Yah am running the Java from the command line and i dont know why importing the package of javax.mail.* classes are not recognizing. I did unzipped the zip file and placed all the JAR files to lib folder of my installed JDK and referenced the JDK to classpath in environment variable also.
Regards,
Jaisuryah -
Package javax.mail does not exist (Still having trouble)
Good Morning
I know that there are several posts regarding issues with javamail. I have viewed them for the past hour. While several of them address my issue I have been unable to locate a solution.
Bare with me please, I am making this post very thorough. The other threads I have read are frusterating because the problems people tend to post are not clear.
I am trying to run "msgsend" which is a provided demo of javamail-1.4 using command prompt (start - run - cmd) with the javac command.
The output below is directly pasted from command prompt and written in bold.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>javac msgsend.java
msgsend.java:44: package javax.mail does not exist
import javax.mail.*;
^
msgsend.java:45: package javax.mail.internet does not exist
import javax.mail.internet.*;
^
msgsend.java:140: cannot find symbol
symbol : class Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:140: cannot find symbol
symbol : variable Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:145: cannot find symbol
symbol : class Message
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:145: cannot find symbol
symbol : class MimeMessage
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:147: cannot find symbol
symbol : class InternetAddress
location: class msgsend
msg.setFrom(new InternetAddress(from));
^
msgsend.java:151: package Message does not exist
msg.setRecipients(Message.RecipientType.TO,
^
msgsend.java:152: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(to,
^
msgsend.java:154: package Message does not exist
msg.setRecipients(Message.RecipientType.CC,
^
msgsend.java:155: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(cc,
^
msgsend.java:157: package Message does not exist
msg.setRecipients(Message.RecipientType.BCC,
^
msgsend.java:158: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(bcc,
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:185: cannot find symbol
symbol : variable Transport
location: class msgsend
Transport.send(msg);
^
msgsend.java:193: cannot find symbol
symbol : class Store
location: class msgsend
Store store = null;
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:212: cannot find symbol
symbol : class Folder
location: class msgsend
Folder folder = store.getFolder(record);
^
msgsend.java:218: cannot find symbol
symbol : variable Folder
location: class msgsend
folder.create(Folder.HOLDS_MESSAGES);
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
27 errors
Here are the methods I have tried...
1. Make sure you have most current version of Java
2. Reinstall Java
3. Attempt to compile in an IDE (Attempted in Eclipse 3.2)
4. Set class path
Some sources suggest "CLASSPATH" some suggest "CLASS PATH" as the variable name. I have tried both.
Below is what the classpath looks like in bold.
Variable Name: CLASS PATH
Variable value: c:\download\javamail-1.4\mail.jar;C:\download\jaf-1.1\activation.jar;.
I have double checked all folder names and copy pasted all entries to eliminate typos. Javamail-1.4 and jaf-1.1 are both located in c:\download which is the same location Class Path points to.
Thank you very much for your input and effort. I can imagine how frusterating it is responding to 20million javamail posts :) (that may be a bit of an overstatement!)
Thank you again!
Irbi
Message was edited by:
irbi
Message was edited by:
irbiYes - I have read that part of the README and did exactly as it has said in a previous attempt. I should have mentioned that here I'm sorry :)
I moved the .jar files into the download folder and set the classpath exactly as the readme shows.
When I do that the msgsend.java compiles correctly but it still does not run.
Below is what happens.
C:\download\javamail-1.4\demo>set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.4
\mail.jar;%CLASSPATH%;c:\download\jaf-1.1\activation.jar.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>java msgsend.java
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend/java
C:\download\javamail-1.4\demo>
I have tried fixing this error as well via forums and FAQs but it seems to be the most generic error.
One suggestion was to clear your classpath. I tried this with a test hello world program which was giving the same error - "NoClassDefFoundError". By clearing the classpath I was able to get the hello world program to run without this error. But I can't just clear the classpath in this instance because it needs to point to mail.jar and activation.jar for the program to compile.
Thanks again for all of your efforts. You are more appreciated than you know.
Maybe you are looking for
-
Using a .png file as OLE objet
I am trying to use a png file in my report. I have it linked in but it only will display the file name. If I use the same file converted to pdf, it works perfect. is there a switch somewhere that defines what ole objects can be used? i need to us
-
IDOC Receiver determines no receiving service
Hi, I have send an R/3 IDOC successfully to XI and find the messag with status OK in the monitor, even the receiving service and the receiving interface is empty. I have configured a message interface and the receiver has an appropriate communication
-
Logic- report to move columns to row in a list
Hi, I have an internal table ITAB with following data ITAB DATE MATNR PLANT QUANT 200704 100A 050 111.00 200705 100A 050 333.00 200706 100A 050 444.00 200707 100A 050 555.00 200704 100B 051 999.00 200705 10
-
How can I edit a working WordPress site installed on a working local server in "Live Mode"?
Although I can successfully edit the site in "Design" mode, it's pointless when I just see "PHP" icons everywhere thus I'm editing blindly hoping the edits turn out after constantly saving and then heading over to the WordPress site and reloading the
-
Photoshop CS shuts down at open
I've got a old version CS. Just recently when I open Photoshop, it will go through it's routine and right before the welcome page it just closes. All other CS programs work. Operating in Windows XP. Tried opening with the Control-Alt-Shift held down