Re: Bundle loading during unit testing outside Eclipse

2011-09-26 Thread Paul Hoadley
Hi Marius, On 23/09/2011, at 5:29 PM, Marius Soutier wrote: Paul, are you depending on the bundle when building from Hudson? For me this property only mattes inside of Eclipse because I'm working bundle-less (which is much more compatible with other plug-ins). I run the unit tests inside

Re: Bundle loading during unit testing outside Eclipse

2011-09-23 Thread Marius Soutier
Paul, are you depending on the bundle when building from Hudson? For me this property only mattes inside of Eclipse because I'm working bundle-less (which is much more compatible with other plug-ins). My script is very simple now: target name=test depends=init.test,compile.tests

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Marius Soutier
I face the same problem when I run my WOUnit tests locally from Ant: [junit] Cannot load model named 'SFFoundationEOModel' [junit] java.lang.IllegalArgumentException: Cannot load model named 'SFFoundationEOModel' [junit] at

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Paul Hoadley
Hi Marius, On 22/09/2011, at 7:27 PM, Marius Soutier wrote: I face the same problem when I run my WOUnit tests locally from Ant: [junit] Cannot load model named 'SFFoundationEOModel' [junit] java.lang.IllegalArgumentException: Cannot load model named 'SFFoundationEOModel'

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Marius Soutier
That error message wasn't exact enough, it was a problem with ERXLocalizer being initialized too early (in statics), and now I'm down to this: [junit] Testcase: net.starhealthcare.sffoundation.model.SFTaskTest: Caused an ERROR [junit] Unable to get the name of the class to instantiate

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Henrique Prange
That error only happens when you run the tests with Ant, correct? Sent from my iPhone On 22/09/2011, at 07:51, Marius Soutier m.sout...@starhealthcare.info wrote: That error message wasn't exact enough, it was a problem with ERXLocalizer being initialized too early (in statics), and now I'm

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Marius Soutier
As a matter of fact, my WOUnit-based tests work now! On 22.09.2011, at 15:08, Henrique Prange wrote: That error only happens when you run the tests with Ant, correct? Sent from my iPhone On 22/09/2011, at 07:51, Marius Soutier m.sout...@starhealthcare.info wrote: That error message

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Chuck Hill
That sounds more like a classpath problem. Are you putting the jar in the built .framework on the classpath, or something else? On 2011-09-22, at 3:51 AM, Marius Soutier wrote: That error message wasn't exact enough, it was a problem with ERXLocalizer being initialized too early (in

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Marius Soutier
I had forgotten to fork the jUnit process, so that's resolved now. Apparently the classpath does not get passed through to jUnit unless you fork the process. Makes things a bit slower :( But I still have this random strange error where the EO cannot be instantiated because EOF is not ready. I

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Chuck Hill
On 2011-09-22, at 12:50 PM, Marius Soutier wrote: I had forgotten to fork the jUnit process, so that's resolved now. Apparently the classpath does not get passed through to jUnit unless you fork the process. Makes things a bit slower :( But I still have this random strange error where

Re: Bundle loading during unit testing outside Eclipse

2011-09-22 Thread Henrique Prange
Hi all, After some investigation on a sample project provided by Paul, I was able to find a problem in the WOUnit code. In order to solve the issue #13, I have enabled the NSBundleProjectEnabled property by default. Besides the effort to test this change inside Eclipse and in the console

Re: Bundle loading during unit testing outside Eclipse

2011-09-21 Thread Chuck Hill
On 2011-09-20, at 10:08 PM, Paul Hoadley wrote: On 21/09/2011, at 2:26 PM, Chuck Hill wrote: If you cd WT2.woa ./WT2 does the app run and find any of the bundles? Yep, runs and finds them all. Wow. The only thing that I can think of right now is that it _is_ something to do with

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
On 20/09/2011, at 7:33 AM, Chuck Hill wrote: That is, it can't find JavaMemoryAdaptor.framework when it needs it. I'm having this problem when running unit tests in both application and framework bundles of my own. JavaMemoryAdaptor.framework is on the .classpath (confirmed by running

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
Hi Ray, On 20/09/2011, at 2:58 PM, Ray Kiddy wrote: Whenever I have had this sort of problem, I usually end up switching the junit target to a java target. The re-write one has to do for that, the re-jiggering of the parameters, usually points me to the problem. It is kind of

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Chuck Hill
On 2011-09-20, at 1:57 AM, Paul Hoadley wrote: On 20/09/2011, at 7:33 AM, Chuck Hill wrote: That is, it can't find JavaMemoryAdaptor.framework when it needs it. I'm having this problem when running unit tests in both application and framework bundles of my own.

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
On 21/09/2011, at 7:51 AM, Chuck Hill wrote: I'm using the .woa directory as the bundle. The .woa directory inside the source project (dist/Foo.woa)? Or built someplace else? The former. The source project gets checked out into a Hudson workspace, and it builds in dist/WT2.woa.

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Chuck Hill
On 2011-09-20, at 3:57 PM, Paul Hoadley wrote: On 21/09/2011, at 7:51 AM, Chuck Hill wrote: I'm using the .woa directory as the bundle. The .woa directory inside the source project (dist/Foo.woa)? Or built someplace else? The former. The source project gets checked out into a

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
Hi Chuck, On 21/09/2011, at 8:44 AM, Chuck Hill wrote: Are the frameworks embedded in that bundle? Yes. You could try loading them from there instead. Just grab all the paths to jar files under Contents/Frameworks. I'll try that shortly. Try getting the classloader in one of your

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
On 21/09/2011, at 9:53 AM, Paul Hoadley wrote: Are the frameworks embedded in that bundle? Yes. You could try loading them from there instead. Just grab all the paths to jar files under Contents/Frameworks. I'll try that shortly. I added: fileset

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Chuck Hill
Hi Paul, On 2011-09-20, at 6:55 PM, Paul Hoadley wrote: On 21/09/2011, at 9:53 AM, Paul Hoadley wrote: Are the frameworks embedded in that bundle? Yes. You could try loading them from there instead. Just grab all the paths to jar files under Contents/Frameworks. I'll try that

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
On 21/09/2011, at 12:47 PM, Chuck Hill wrote: Are the frameworks embedded in that bundle? Yes. You could try loading them from there instead. Just grab all the paths to jar files under Contents/Frameworks. I'll try that shortly. I added: fileset

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Chuck Hill
On 2011-09-20, at 9:50 PM, Paul Hoadley wrote: On 21/09/2011, at 12:47 PM, Chuck Hill wrote: Are the frameworks embedded in that bundle? Yes. You could try loading them from there instead. Just grab all the paths to jar files under Contents/Frameworks. I'll try that shortly. I

Re: Bundle loading during unit testing outside Eclipse

2011-09-20 Thread Paul Hoadley
On 21/09/2011, at 2:26 PM, Chuck Hill wrote: If you cd WT2.woa ./WT2 does the app run and find any of the bundles? Yep, runs and finds them all. Wow. The only thing that I can think of right now is that it _is_ something to do with WOTest. I just can't imagine what. Is ERJars on

Bundle loading during unit testing outside Eclipse

2011-09-19 Thread Paul Hoadley
Hello, I seem to bother the list with a variation on this problem every few months. I'm doing some unit testing during a Hudson build process using Henrique's WOUnit. I think what I've got is a bundle finding/loading problem that's masquerading as a problem with WOUnit's

Re: Bundle loading during unit testing outside Eclipse

2011-09-19 Thread Chuck Hill
Hi Paul, On 2011-09-18, at 11:05 PM, Paul Hoadley wrote: Hello, I seem to bother the list with a variation on this problem every few months. I'm doing some unit testing during a Hudson build process using Henrique's WOUnit. I think what I've got is a bundle finding/loading problem

Re: Bundle loading during unit testing outside Eclipse

2011-09-19 Thread Paul Hoadley
Hi Chuck, On 20/09/2011, at 2:49 AM, Chuck Hill wrote: That is, it can't find JavaMemoryAdaptor.framework when it needs it. I'm having this problem when running unit tests in both application and framework bundles of my own. JavaMemoryAdaptor.framework is on the .classpath (confirmed by

Re: Bundle loading during unit testing outside Eclipse

2011-09-19 Thread Chuck Hill
Hi Paul, On 2011-09-19, at 2:48 PM, Paul Hoadley wrote: Hi Chuck, On 20/09/2011, at 2:49 AM, Chuck Hill wrote: That is, it can't find JavaMemoryAdaptor.framework when it needs it. I'm having this problem when running unit tests in both application and framework bundles of my own.

Re: Bundle loading during unit testing outside Eclipse

2011-09-19 Thread Ray Kiddy
On Sep 19, 2011, at 2:48 PM, Paul Hoadley wrote: Hi Chuck, On 20/09/2011, at 2:49 AM, Chuck Hill wrote: That is, it can't find JavaMemoryAdaptor.framework when it needs it. I'm having this problem when running unit tests in both application and framework bundles of my own.