openejb3 testing notes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

openejb3 testing notes

dblevins
Administrator
Nothing important in this email, feel free to ignore it.

More or less just posting the current raw contents of my brain before  
i retire for the night.

  *  *  *  *  *  *  *

Been trying to get automated tests to run on an openejb-3.0-
SNAPSHOT.zip, but don't want to do it with the itests pre-deployed as  
we typically did in the 1.x world.  I also want to have the itests  
client run with a tightly controlled classpath and *no* extra jars in  
it.

So far I've modified our assembly to create another jar that contains  
just the itests the openejb client and junit.  This will serve as  
both the ejb app and the client app.

Maven Issues:
  - Would love to find a way to create an executable jar assembly,  
but it doesn't seem possible.
  - Having any assembly run with the build as in 'mvn install' it  
causes everything to build twice
  - Can't use m2 to execute the tests until the assembly-plugin issue  
is fixed and available, going to use m1

OpenEJB Issues:
  - The auto unpack of our logging config file doesn't work.
  - Need to port over the client code that tries harder to make valid  
provider URLs


If you had the code on my machine, these are the commands you'd need  
to get as far as I get.

mingus:~/work/openejb3/openejb-assembly
$ (cd .. && mvn clean install) && ./assemble.sh

mingus:~/work/openejb3/openejb-assembly
$ (cd target/; tar xzvf openejb-3.0-SNAPSHOT-bin.tar.gz ; cp  
openejb-3.0-SNAPSHOT-test.jar openejb-3.0-SNAPSHOT/beans/; )

mingus:~/work/openejb3/openejb-assembly 01:52:37
$ java -Dopenejb.home=target/openejb-3.0-SNAPSHOT -classpath target/
openejb-3.0-SNAPSHOT-test.jar org.openejb.test.Main remote
_________________________________________________
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|

Running EJB compliance tests on Remote Server
_________________________________________________
[] START SERVER
OPENEJB_HOME = /Users/dblevins/work/openejb3/openejb-assembly/target/
openejb-3.0-SNAPSHOT
SYSTEM_INFO  = Java 1.5.0_05; Mac OS X/10.4.5
Failed to configure log4j. /Users/dblevins/work/openejb3/openejb-
assembly/conf/logging.conf (No such file or directory)
OpenEJB 3.0-SNAPSHOT    build: 20060308-0148
http://www.openejb.org
log4j:WARN No appenders could be found for logger (OpenEJB.startup).
log4j:WARN Please initialize the log4j system properly.
resources 1
OpenEJB ready.
[init] OpenEJB Remote Server
   ** Starting Services **
   NAME                 IP              PORT
   ejbd                 0.0.0.0         4201
   admin thread         0.0.0.0         4200
-------
Ready!
Cannot initialize the test environment:  
java.lang.IllegalStateException Cannot create initial context:  
javax.naming.ConfigurationException Invalid provider URL:
127.0.0.1:4201: host unkown: Illegal character in scheme name at  
index 0: 127.0.0.1:4201
java.lang.IllegalStateException: Cannot create initial context:  
javax.naming.ConfigurationException Invalid provider URL:
127.0.0.1:4201: host unkown: Illegal character in scheme name at  
index 0: 127.0.0.1:4201
         at org.openejb.test.InstantDbTestDatabase.start
(InstantDbTestDatabase.java:96)
         at org.openejb.test.TestManager.start(TestManager.java:55)
         at org.openejb.test.TestRunner.start(TestRunner.java:175)
         at org.openejb.test.TestRunner.main(TestRunner.java:68)
         at org.openejb.test.Main.main(Main.java:15)
Caused by: javax.naming.ConfigurationException: Invalid provider URL:
127.0.0.1:4201: host unkown: Illegal character in scheme name at  
index 0: 127.0.0.1:4201
         at org.openejb.client.JNDIContext.getInitialContext
(JNDIContext.java:95)
         at javax.naming.spi.NamingManager.getInitialContext
(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx
(InitialContext.java:247)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at org.openejb.test.InstantDbTestDatabase.start
(InstantDbTestDatabase.java:94)
         ... 4 more
Cannot create initial context: javax.naming.ConfigurationException  
Invalid provider URL:127.0.0.1:4201: host unkown: Illegal character  
in scheme name at index 0: 127.0.0.1:4201

Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

Jacek Laskowski-3
2006/3/8, David Blevins <[hidden email]>:
> Nothing important in this email, feel free to ignore it.

Hi Dave,

I should've done it, but I couldn't believe Dave wrote an email with
no intent in it. ;)

> Maven Issues:

Love them and while I'm working on the M2 migration of Geronimo, I
feel as if I could help here, too ;)

>   - Would love to find a way to create an executable jar assembly,
> but it doesn't seem possible.

What's wrong with it? Where can I find the assembly descriptor?

>   - Having any assembly run with the build as in 'mvn install' it
> causes everything to build twice

Again. Where could I find and look at it?

>   - Can't use m2 to execute the tests until the assembly-plugin issue
> is fixed and available, going to use m1

Do you mean geronimo-assembly-plugin? If so, I could start migrating
it straight away since I'm in a great need to see how M2 plugins are
built.

>   - The auto unpack of our logging config file doesn't work.
>   - Need to port over the client code that tries harder to make valid
> provider URLs

I'm not even going to look into these in a near future, so don't even
try to explain them ;)

Thanks for the brain dump of yours! Keem'em posting...

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl
Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

GDamour2
Jacek Laskowski wrote:

>2006/3/8, David Blevins <[hidden email]>:
>  
>
>>Nothing important in this email, feel free to ignore it.
>>    
>>
>
>Hi Dave,
>
>I should've done it, but I couldn't believe Dave wrote an email with
>no intent in it. ;)
>
>  
>
>>Maven Issues:
>>    
>>
>
>Love them and while I'm working on the M2 migration of Geronimo, I
>feel as if I could help here, too ;)
>
>  
>
>>  - Would love to find a way to create an executable jar assembly,
>>but it doesn't seem possible.
>>    
>>
>
>What's wrong with it? Where can I find the assembly descriptor?
>
>  
>
>>  - Having any assembly run with the build as in 'mvn install' it
>>causes everything to build twice
>>    
>>
>
>Again. Where could I find and look at it?
>  
>
Hi,

I think that this is this very annoying bug
http://jira.codehaus.org/browse/MASSEMBLY-37.  Also, it seems that
fileSets defined in assembly descriptors are resolved based on the
directory from which Maven is executed.

Thanks,
Gianny

>  
>
>>  - Can't use m2 to execute the tests until the assembly-plugin issue
>>is fixed and available, going to use m1
>>    
>>
>
>Do you mean geronimo-assembly-plugin? If so, I could start migrating
>it straight away since I'm in a great need to see how M2 plugins are
>built.
>  
>


Reply | Threaded
Open this post in threaded view
|

please vote for this bug! (Re: [openejb-dev] openejb3 testing notes)

dblevins
Administrator

On Mar 8, 2006, at 3:04 AM, Gianny Damour wrote:

>>>  - Having any assembly run with the build as in 'mvn install' it
>>> causes everything to build twice
>
> I think that this is this very annoying bug http://
> jira.codehaus.org/browse/MASSEMBLY-37.  Also, it seems that  
> fileSets defined in assembly descriptors are resolved based on the  
> directory from which Maven is executed.

Oh man, that bug has been open for two months!

Could everyone vote for this one to be fixed by clicking the link below:

   http://jira.codehaus.org/browse/MASSEMBLY-37?vote=vote

We'll never be able to automatically test an assembly during a build  
unless we can have the assembly run as part of the build.  We need  
this fixed.

-David

Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

dblevins
Administrator
In reply to this post by Jacek Laskowski-3

On Mar 8, 2006, at 2:34 AM, Jacek Laskowski wrote:

> 2006/3/8, David Blevins <[hidden email]>:
>
>>   - Would love to find a way to create an executable jar assembly,
>> but it doesn't seem possible.
>
> What's wrong with it? Where can I find the assembly descriptor?

I mean the maven-assembly-plugin allows you to create uber-jars, but  
there doesn't seem to be a way to specify manifest values, such as  
Main-Class.

>>   - Can't use m2 to execute the tests until the assembly-plugin issue
>> is fixed and available, going to use m1
>
> Do you mean geronimo-assembly-plugin? If so, I could start migrating
> it straight away since I'm in a great need to see how M2 plugins are
> built.

The maven-assembly-plugin.

>>   - The auto unpack of our logging config file doesn't work.
>>   - Need to port over the client code that tries harder to make valid
>> provider URLs
>
> I'm not even going to look into these in a near future, so don't even
> try to explain them ;)

Already got the first one finished, on to the second item.

> Thanks for the brain dump of yours! Keem'em posting...
>

Will do.

-David

Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

sissonj-2
David Blevins <[hidden email]> wrote on 09/03/2006 07:18:55 AM:

>
> On Mar 8, 2006, at 2:34 AM, Jacek Laskowski wrote:
>
> > 2006/3/8, David Blevins <[hidden email]>:
> >
> >>   - Would love to find a way to create an executable jar assembly,
> >> but it doesn't seem possible.
> >
> > What's wrong with it? Where can I find the assembly descriptor?
>
> I mean the maven-assembly-plugin allows you to create uber-jars, but
> there doesn't seem to be a way to specify manifest values, such as
> Main-Class.
>

Not sure if this mail thread helps you..
http://www.mail-archive.com/users@.../msg36818.html

John

> >>   - Can't use m2 to execute the tests until the assembly-plugin issue
> >> is fixed and available, going to use m1
> >
> > Do you mean geronimo-assembly-plugin? If so, I could start migrating
> > it straight away since I'm in a great need to see how M2 plugins are
> > built.
>
> The maven-assembly-plugin.
>
> >>   - The auto unpack of our logging config file doesn't work.
> >>   - Need to port over the client code that tries harder to make valid
> >> provider URLs
> >
> > I'm not even going to look into these in a near future, so don't even
> > try to explain them ;)
>
> Already got the first one finished, on to the second item.
>
> > Thanks for the brain dump of yours! Keem'em posting...
> >
>
> Will do.
>
> -David
>
Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

dblevins
Administrator
On Mar 8, 2006, at 4:34 PM, [hidden email] wrote:

> David Blevins <[hidden email]> wrote on 09/03/2006 07:18:55  
> AM:
>
>>
>> On Mar 8, 2006, at 2:34 AM, Jacek Laskowski wrote:
>>
>>> 2006/3/8, David Blevins <[hidden email]>:
>>>
>>>>   - Would love to find a way to create an executable jar assembly,
>>>> but it doesn't seem possible.
>>>
>>> What's wrong with it? Where can I find the assembly descriptor?
>>
>> I mean the maven-assembly-plugin allows you to create uber-jars, but
>> there doesn't seem to be a way to specify manifest values, such as
>> Main-Class.
>>
>
> Not sure if this mail thread helps you..
> http://www.mail-archive.com/users@.../msg36818.html
>

That helped out quite a bit.  I was able to get an executable test  
client jar.

Thanks a million!

-David


> John
>
>>>>   - Can't use m2 to execute the tests until the assembly-plugin  
>>>> issue
>>>> is fixed and available, going to use m1
>>>
>>> Do you mean geronimo-assembly-plugin? If so, I could start migrating
>>> it straight away since I'm in a great need to see how M2 plugins are
>>> built.
>>
>> The maven-assembly-plugin.
>>
>>>>   - The auto unpack of our logging config file doesn't work.
>>>>   - Need to port over the client code that tries harder to make  
>>>> valid
>>>> provider URLs
>>>
>>> I'm not even going to look into these in a near future, so don't  
>>> even
>>> try to explain them ;)
>>
>> Already got the first one finished, on to the second item.
>>
>>> Thanks for the brain dump of yours! Keem'em posting...
>>>
>>
>> Will do.
>>
>> -David
>>

Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

Jacek Laskowski-3
In reply to this post by dblevins
2006/3/8, David Blevins <[hidden email]>:

> I mean the maven-assembly-plugin allows you to create uber-jars, but
> there doesn't seem to be a way to specify manifest values, such as
> Main-Class.

Well, I remember I did it once, but am not sure if it's
maven-assembly-plugin or other plugin (possibly maven-jar-plugin or
alike). Will try to dig it up.

> -David

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl
Reply | Threaded
Open this post in threaded view
|

Re: openejb3 testing notes

Jacek Laskowski-3
In reply to this post by sissonj-2
2006/3/9, [hidden email] <[hidden email]>:

> Not sure if this mail thread helps you..
> http://www.mail-archive.com/users@.../msg36818.html

Yes! That was this! Used it in one project successfully. Thanks John.
I was about to become worried I wouldn't find it ;)

> John

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl