Re: WOInject failure with WOMonitor

Alexis Tual <[email protected]> Tue, 11 Jun 2013 19:01:55 +0200
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <CAAYM+QKiQhVpguUeVXxr=DnbqbSD=gFd5sRLhqBSzqh6Ub0EeQ@mail.gmail.com>
Hi,

funny thing I've got the same error at startup on my recently woinjected
App in deployment only (woinject v1.0.1) :

Caused by: javassist.NotFoundException:
com.webobjects.foundation._NSUtilities
at javassist.ClassPool.get(ClassPool.java:450)
at com.woinject.WOInject.init(WOInject.java:66)
... 6 more

I have no clue what's wrong. All the needed jar's are in the classpath.
Looks like there's some class loader issue in there, is there something I'm
not aware of ? The WOBootstrap.jar must be the one from the wotaskd 5.4.3 ?

Thanks for your help,

Alex




2013/2/25 Henrique Prange <[email protected]>

> Hi Steffan,
>
> On 20/02/2013, at 13:15, Steffan Westcott <
> [email protected]> wrote:
>
> This question is probably best for Henrique, but I welcome any help on
> this.
>
> I am attempting to introduce WOInject to an existing large Wonder
> application.
>
>
> Good to hear. :)
>
> Launching the application locally in WoLips works
> perfectly, injection of some @Singletons works well.
>
> My problems begin when the application is launched with WOMonitor. I
> get the following exception trace :
>
> Caused by: java.lang.Error: Cannot initialize the application to take
> advantage of WOInject features.
> at com.woinject.WOInject.init(WOInject.java:89)
> at com.clicktravel.travelmanager2.app.Application.main(Application.java:23)
> ... 5 more
> Caused by: javassist.NotFoundException:
> com.webobjects.foundation._NSUtilities
> at javassist.ClassPool.get(ClassPool.java:450)
> at com.woinject.WOInject.init(WOInject.java:66)
>
>
> Looks like neither JavaFoundation nor ERFoundation libraries are in the
> application classpath.
>
> Googling for some answers turned up this message which is probably
> related to my issue :
> http://lists.apple.com/archives/webobjects-dev/2012/Jun/msg00242.html
>
> I do not quite understand the advice given in the message, so am
> unclear if I am doing something wrong. I am using 1.1-SNAPSHOT of
> WOInject. I am also using an AppRunner class equivalent (which does
> not extend ERXApplication) which calls WOInject.init with the
> classname of my real Application class (which does extend
> ERXApplication).
>
>
> The WOInject website is a bit outdated. The latest stable version of
> WOInject is 1.0.1. I'm using this version in a huge application for more
> than a year without problems. The problem reported by Joseph in the
> mentioned thread seems to be unrelated with yours. Have you tried to
> configure your application as described in the WOInject Setup [1] section?
> Something like this:
>
> package my.app;
>
> import com.woinject.InjectableApplication;
> import com.woinject.WOInject;
>
> public class Application extends InjectableApplication {
>     public static void main(String[] args) {
>         WOInject.init("my.app.Application", args);
>     }
>     ...
> }
>
> Does it work?
>
> I note there is a branch hotfix-classloading on WOInject. Should I be
> using this version instead?
>
>
> Only if you have strange class loading problems as reported by Joseph.
>
> Is it correct to change the WOMonitor configuration to point at the
> AppRunner class instead of my real
> Application class?
>
>
> Yes, you need to run the application from the AppRunner in this case. The
> original solution (described in the docs) doesn't need it.
>
> Last year, I've started working in a framework/solution to reduce class
> loading problems without adding too much friction for WOInject users. I
> made some progress, but it's still not finished. The community interest in
> WOInject is a motivation for me to keep working on it. :)
>
> [1]http://hprange.github.com/woinject/usage.html
>
> Cheers,
>
> Henrique
>
> Any help would be gratefully received!
>
> Thanks,
> Steffan
>
> --
>
> ------------------------------
> Click Travel Ltd
> Taking business travel and expenses one step further
> http://www.clicktravel.com
>
> Winner of "Best Business Travel Management Company" at the Business Travel
> Awards (2012 & 2009) and the Travel Trade Gazette Awards (2011). We're
> also ranked
> 22nd in the 2012 Sunday Times Hiscox Tech Track 100.
>
> For all the latest Click news please visit our blog:
> http://clicktravel.com/blog
>
> Think: Do you really need to print this email?
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc