• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Ant & WOMailDelivery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ant & WOMailDelivery


  • Subject: Ant & WOMailDelivery
  • From: Calven Eggert <email@hidden>
  • Date: Tue, 27 Apr 2004 09:56:41 -0400

I9m want to create a little app that will check a database table and if
there are any rows in that table send an email message.  This app would be
called on a regular basis.

I thought that it would be easy by compiling a simple java file via ant.
Well, not always the case.  It compiles ok, but when it runs I get an error
message.

My source file contains the compose method:
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;
import com.webobjects.jdbcadaptor.*;
import java.util.*;
import java.io.*;
...
String mailMessage = mailDelivery.composePlainTextEmail(emailFrom,
emailAddress, null, subject, theText, true);
...

To run the app:
java -DDEBUG=NO -classpath
"lib/javafoundation.jar:lib/javaeoaccess.jar:lib/javaeocontrol.jar:lib/javax
ml.jar:lib/javajdbcadaptor.jar:lib/javawebobjects.jar:lib/CORESendMail.jar:.
" com.UHN.CORESendMail.SendMail

Error Message:
sh run.sh
Exception in thread "main" java.lang.NoSuchMethodError:
com.webobjects.foundation._NSStringUtilities.stringFromBuffer(Ljava/lang/Str
ingBuffer;)Ljava/lang/String;
        at
com.webobjects.appserver.xml.WOXMLCoder.encodeRootObjectForKey(WOXMLCoder.ja
va:523)
        at
com.webobjects.appserver.WOAdminAction.<clinit>(WOAdminAction.java:18)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at
com.webobjects.appserver.WOApplication.class$(WOApplication.java:185)
        at
com.webobjects.appserver.WOApplication.<clinit>(WOApplication.java:203)
        at
com.webobjects.appserver.WOMailDelivery.sendEmail(WOMailDelivery.java:198)
        at
com.webobjects.appserver.WOMailDelivery.composePlainTextEmail(WOMailDelivery
.java:117)
        at com.UHN.CORESendMail.SendMail.sendMailMessage(SendMail.java:54)
        at com.UHN.CORESendMail.SendMail.sendAllMessages(SendMail.java:42)
        at com.UHN.CORESendMail.SendMail.main(SendMail.java:25)


Any idea why I9m getting this?

Does someone have another way to accomplish this?

Calven
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Setting an attribute based on PK?
  • Next by Date: Re: Xcode Tools v1.2 and WebObjects 5.2.3
  • Previous by thread: Re: WOToOneRelationShip selected value
  • Next by thread: WODev "PK on Insert" code causes D2W(onder) problem
  • Index(es):
    • Date
    • Thread