You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Libor Pleva <lp...@rssystem.cz> on 2003/06/17 11:13:18 UTC
[JELLY] - email tag -> exception
Hi,
emails text in Jelly tag body makes exception.
<?xml version="1.0"?>
<j:jelly xmlns:j="jelly:core" xmlns:email="jelly:email">
<email:email
server="smtp.server.cz"
from="bob@bobo.cz"
to="lpleva@rssystem.cz"
subject="test mailu"
>
Test mailu.
</email:email>
</j:jelly>
...
Root cause
java.lang.NullPointerException
at
javax.mail.internet.MimeUtility.checkAscii(MimeUtility.java:1079)
at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:846)
at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1406)
at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1394)
at
org.apache.commons.jelly.tags.email.EmailTag.doTag(EmailTag.java:277)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at
org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.util.CommandLineParser.invokeCommandLineJelly(CommandLineParser.java:146)
at org.apache.commons.jelly.Jelly.main(Jelly.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
Solution:
--- EmailTag.java.orig 2003-06-17 10:32:18.000000000 +0200
+++ EmailTag.java 2003-06-17 10:23:30.000000000 +0200
@@ -218,7 +218,7 @@
invokeBody(xmlOutput);
}
else {
- message = getBodyText(encodeXML);
+ messageBody = getBodyText(encodeXML);
}
// configure the mail session
Regards
Libor Pleva
--
+----------------------------------------------------------------------+
| Libor Pleva System Specialist |
|----------------------------------------------------------------------|
| R.S. System s.r.o. ### ### ### E-mail: lpleva@rssystem.cz |
| 28. rijna 84 # # # # |
| Ostrava 702 00 ### ### ### Phone : +420-596 111 844 |
| Czech Republic # # # # Fax : +420-596 111 844 |
| www.rssystem.cz # # ### ### |
+----------------------------------------------------------------------+