javamail java.lang.IllegalAccessError:

P

pcouas

Hi,

Anyone could explain me following error message

java.lang.IllegalAccessError: taglibm2.SendTag tried to access method
javax/mail/internet/InternetAddress.(Ljava/lang/String;Z)V


String temp=null;
this.recipients = new StringTokenizer(listto,";");

InternetAddress[] toAddrs = null, ccAddrs = null;
// toAddrs = InternetAddress.parse(recipients, false);

try {
String temp=null;
if (recipients != null)
{
int i=0;
toAddrs = new InternetAddress[recipients.countTokens()];

//boucle si plusieurs destinataires
while(recipients.hasMoreElements())
{
temp=(String)recipients.nextElement();
//ERROR IS HERE
toAddrs = new InternetAddress(temp,false);
i++;
}
 
P

Paul Lutus

Hi,

Anyone could explain me following error message

java.lang.IllegalAccessError: taglibm2.SendTag tried to access method
javax/mail/internet/InternetAddress.(Ljava/lang/String;Z)V

It means exactly what it says -- the calling method cannot legally access
this constructor. You haven't said whether this is an applet or an
application, and you haven't provided enough context to say why this error
is thrown.

Also, avoid StringTokenizer if possible. If you are building against a
recent version of Java, use String.split() instead.
 
P

pcouas

Hi,

This piece of code is in my TAG library.
I use Tomcat 4.1.24 on AIX 4.3.3.0 with IBM JDK 1.3.1

Thanks
Philippe
 
P

pcouas

Before i used parse,
toAddrs = InternetAddress.parse(temp, false);

But i can't separate mail address with semicolon

Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top