Re: ERJavaMail problem
Ondřej Čada <[email protected]> Wed, 7 Sep 2011 17:18:49 +0200
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Kieran, David, On Sep 7, 2011, at 4:09 PM, David LeBer wrote: > just initializing ... ERExtensions Perhaps I am extraordinarily dense today, but can you please tell me how = does one do that? There's a finishInitialization method in ERExtensions which looks = promising, but it's an instance method, not a class one; and althougth = there is a sharedInstance inherited method there too, it needs some = "principal class". I understand that for someone who studied Wonder for years this all is = self-evident, but I do not see what "principal class" should be; all I = need is simply to send an e-mail :( Thanks! As for On Sep 7, 2011, at 4:22 PM, Kieran Kelleher wrote: > My guess is that you will struggle and it will not "just work" until = you have at least ERExtensions, ERJars and ERJavaMail in your classpath That I do have, per the yesterday's document whose cached version is = here: = http://webcache.googleusercontent.com/search?q=3Dcache:BtMBAPwKZqEJ:homepa= ge.mac.com/kelleherk/iblog/C183784902/E2093239404/index.html+ERJavaMail&cd= =3D4&hl=3Den&ct=3Dclnk&gl=3Dcz&client=3Dsafari > and you extend ERXSession/ERXApplication.=20 Thanks. I was quite reluctant to do global changes in tested and = reliable code (session/application) to support some local change (send = an e-mail from a component), but I've tried anyway in hope it would = solve the initialization problem outlined above, but indeed it does not = work: I've replaced WOApplication/WOSession by their ERX variants in my = code (simply "Application extends ERXApplication", "Session extends = ERXSession" and appropriate import so as that builds), and then the = application crashes immediately upon launch: [2011-09-07 16:52:05 CEST] <main> java.lang.NullPointerException at er.extensions.ERXApplication.<init>(ERXApplication.java:472) at Application.<init>(Application.java:21) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native = Method) at = sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcc= essorImpl.java:39) at = sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstr= uctorAccessorImpl.java:27) at = java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at = com.webobjects.appserver.WOApplication.main(WOApplication.java:323) at Application.main(Application.java:184) Probably there are more complex changes which one must do in the project = before ERXApp can be used. Oh sigh. While I do trust Wonder is great for those who want to embrace = it fully and study its details, does not seem one is able just to use = its mail without completely re-doing all the rest :( Best, --- Ondra =C4=8Cada OCSoftware: [email protected] http://www.ocs.cz private [email protected] http://www.ocs.cz/oc