Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-28 Thread Michael Ludwig
Michael Ludwig schrieb am 20.01.2011 um 02:30 (+0100): > What is special about JavaMail, JAF (Activation) and JDBC drivers that > they cannot be loaded by any other classloader? Just linking this to a thread I started on Tomcat-User (which did not, however, clarify the issue for me): mail.jar, a

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-20 Thread Patrick Martin
Thank you all for your feedback, it's much clearer now. Patrick On Thu, Jan 20, 2011 at 6:30 AM, Antoine Levy-Lambert wrote: > On 1/19/11 9:46 PM, Michael Ludwig wrote: >> But I still haven't understood the underlying issue. What's so special about >> mail.jar that it needs special treatment? >

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
On 1/19/11 9:46 PM, Michael Ludwig wrote: > But I still haven't understood the underlying issue. What's so special about > mail.jar that it needs special treatment? It *could* be that instead of just using the classloader of mail.jar ... to look for other classes of mail.jar or activation.jar it wa

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Michael Ludwig schrieb am 19.01.2011 um 13:51 (+0100): > Patrick Martin schrieb am 19.01.2011 um 10:31 (+0100): > > D:\tmp\build.xml:7: taskdef A class needed by class > > org.apache.tools.ant.taskdefs.email.MimeMailer cannot be found: > > javax/mail/MessagingException > > using the classloader A

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Antoine Levy-Lambert schrieb am 19.01.2011 um 18:51 (-0500): > Adding for clarity that the reason why the classloader task helps in > this case is that mail.jar and activation.jar contain factory classes > which cannot be loaded from the loader of the mail task directly if > mail.jar and activation

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
Adding for clarity that the reason why the classloader task helps in this case is that mail.jar and activation.jar contain factory classes which cannot be loaded from the loader of the mail task directly if mail.jar and activation.jar were not in $ANT_HOME/lib or another directory picked up at star

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Peter Reilly
url of: http://enitsys.sourceforge.net/ant-classloadertask/ Peter On Wed, Jan 19, 2011 at 8:16 PM, Antoine Levy-Lambert wrote: > Hello Patrick, > > it is possible to do this using the classloader task of jtools > > classname="org.apache.tools.ant.taskdefs.ClassloaderTask"> > > > > > > >

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
Hello Patrick, it is possible to do this using the classloader task of jtools classname="org.apache.tools.ant.taskdefs.ClassloaderTask"> here is the snippet of my ivy.xml with the dependencies conf="classloadertask->default"> so you do not need to redefine the mail task but pu

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Patrick Martin schrieb am 19.01.2011 um 10:31 (+0100): > > Is it possible to use the task without having activation.jar > and mail.jar in the ant lib folder? Well, ant-javamail.jar depends on classes from mail.jar, so that one is required. Not sure about activation.jar, though. That one will lik

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Patrick Martin
Hello, I just realized that the correct class shuold probably be org.apache.tools.ant.taskdefs.email.EmailTask. But I still end up with an error: java.lang.ClassNotFoundException: javax.activation.DataHandler Thanks, Patrick On Wed, Jan 19, 2011 at 10:31 AM, Patrick Martin wrote: > Hello, > >

Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Patrick Martin
Hello, Is it possible to use the task without having activation.jar and mail.jar in the ant lib folder? I tried to redefine the mail task this way: But it did not work. I keep on getting the following error: D:\tmp\build.