Pete

You can download the source code for my book, which includes the POMs etc,
from: http://www.manning.com/crichardson
The embedded EJB 3 container looks like a good way to easily test EJB3
session beans- avoids having to fire up the fullblown server.

Chris


--
Enterprise POJO consulting - http://www.chrisrichardson.net
Author, POJOs in Action - http://www.manning.com/crichardson
Enterprise POJOs blog - http://chris-richardson.blog-city.com

On 3/20/06, Pete <[EMAIL PROTECTED]> wrote:
>
> Chris  or Dan,
>
> Just wondered if you could share your POM and testing approach with me ,
> I'm
> looking to test JBoss EJB3 EJBs using surefire or testNG, so I am
> wondering
> what the options are, and how this emedded EJB3 container works /  fits in
> ?
>
> Pete
>
> On 19/03/06, Chris Richardson <[EMAIL PROTECTED]> wrote:
> >
> > Dan,
> >
> > I also had a problem using maven2 to run the EJB3/JBoss microcontainer
> > tests
> > for the example from my book.
> > It got this error:
> >
> > Caused by: java.net.MalformedURLException: no protocol: and
> >    at java.net.URL.&lt;init&gt;(URL.java:567)
> >    at java.net.URL.&lt;init&gt;(URL.java:464)
> >    at java.net.URL.&lt;init&gt;(URL.java:413)
> >
> > A quick google found this:
> >
> >
> http://mail-archives.apache.org/mod_mbox/geronimo-dev/200512.mbox/[EMAIL 
> PROTECTED]
> >
> > It suggests that the problem is caused by the path to the repository
> being
> > under "Documents and Settings", which has a space :-(
> > After specifying a different location for the local repository, which
> > didn't
> > have spaces in the path, the problem went away and tests passed.
> >
> > Chris
> >
> > --
> > Enterprise POJO consulting - http://www.chrisrichardson.net
> > Author, POJOs in Action - http://www.manning.com/crichardson
> > Enterprise POJOs blog - http://chris-richardson.blog-city.com
> >
> >
> > On 3/19/06, Dan Greening < [EMAIL PROTECTED]> wrote:
> > >
> > > I am pulling my hair out.
> > >
> > > If you have gotten maven2 surefire plugin (or anything else) to
> > > initiate a JBoss EJB3 embeddable container, I am desperate for your
> POM.
> > >
> > > I am trying very hard to get the JBoss EJB3 embeddable container to
> > > operate under the surefire-plugin, under the test phase.  I cannot,
> > > for the life of me, get it to find the InitialContext.  I've set the
> > > system properties properly, and I even have a duplicated it in
> > > jndi.properties .  My configuration works under maven1, but not
> maven2.
> > >
> > > I think it could be caused by one of two things.  Either
> > >
> > > a. The surefire plugin isolated classloader is making it impossible
> > > for the embeddable container to find the annotated classes.
> > >
> > > b. I have screwed up my POM somehow.
> > >
> > > If all you tell me is "yes, I have gotten the JBoss EJB3 embeddable
> > > container to run and see my classes under surefire", you will have
> > > done me a favor, because that would indicate it is possible.
> > > However, it would be really nice if you would also send your POM so I
> > > could understand your configuration.
> > >
> > > Seriously, this has been driving me nuts for days, so I could really
> > > use the help.
> > >
> > > Dan R. Greening, Ph.D.,  CEO BigTribe Corporation,  http://
> > > dan.greening.name/contact.htm
> > >
> > >
> > >
> > >
> >
> >
>
>


--
Enterprise POJO consulting - http://www.chrisrichardson.net
Author, POJOs in Action - http://www.manning.com/crichardson
Enterprise POJOs blog - http://chris-richardson.blog-city.com

Reply via email to