You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Thomas Hug <th...@gmail.com> on 2013/06/04 22:53:55 UTC

[Help] Arquillian tests with TomEE profile

Hey TomEE experts

I'm currently working on getting the CDI query code base ready for import
[1] but haven't been successful running it under the TomEE profile (JBoss
and Glassfish run both fine).

As far as I could drill down to the problems it's
- a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
ShrinkWrap 2 beta)
- some of the partial beans not created (haven't checked all errors but
seems mainly related to abstract classes)
- JPA metamodel classes not initialized (all null)

Haven't run it with the debugger yet, but in case any of those problems
ring a bell, a hint is very welcome.

[1] https://github.com/ctpconsulting/query/tree/dsimport

Re: [Help] Arquillian tests with TomEE profile

Posted by Mark Struberg <st...@yahoo.de>.
Hi Thomas!

I hope I can try to build it tomorrow or the day after.

LieGrue,
strub




----- Original Message -----
> From: Thomas Hug <th...@gmail.com>
> To: dev@deltaspike.apache.org
> Cc: 
> Sent: Tuesday, 4 June 2013, 22:53
> Subject: [Help] Arquillian tests with TomEE profile
> 
> Hey TomEE experts
> 
> I'm currently working on getting the CDI query code base ready for import
> [1] but haven't been successful running it under the TomEE profile (JBoss
> and Glassfish run both fine).
> 
> As far as I could drill down to the problems it's
> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
> ShrinkWrap 2 beta)
> - some of the partial beans not created (haven't checked all errors but
> seems mainly related to abstract classes)
> - JPA metamodel classes not initialized (all null)
> 
> Haven't run it with the debugger yet, but in case any of those problems
> ring a bell, a hint is very welcome.
> 
> [1] https://github.com/ctpconsulting/query/tree/dsimport
> 

Re: [Help] Arquillian tests with TomEE profile

Posted by "John D. Ament" <jo...@gmail.com>.
Yep, switching to TomEE 1.6.0-SNAPSHOT works fine.


On Wed, Jun 5, 2013 at 4:44 AM, Thomas Hug <th...@gmail.com> wrote:

> Thnx a lot for the quick responses! Awesome :-)
>
> As for
> 1) Crashes the tests in case TomEE is not in the local repo. But not a big
> deal to work around.
> 2) Yes seems like there's a problem with the type hierarchy: The
> @Repository (with the @PartialBeanBinding) annotation on
> AbstractEntityRepository is not picked up on the subclasses of
> AbstractEntityRepository. Temporarily fixed by annotating the subclasses
> directly.
> 3) Solved. OpenJPA was somehow picky on validating a collection property
> requiring a setter (hmm...) and therefore failing the metamodel
> initialization.
>
> Will check all the tests again but I'd assume by today evening the three
> main profiles with TomEE, JBoss and GlassFish should be running.
>
>
> On Wed, Jun 5, 2013 at 9:59 AM, Arne Limburg
> <ar...@openknowledge.de>wrote:
>
> > Hi John,
> >
> > Could you please move this over to the openwebbeans list, since it seems
> > to be an issue with our AbstractAnnotationLiteral.
> >
> >
> > Cheers,
> > Arne
> >
> > Am 05.06.13 02:00 schrieb "John D. Ament" unter <john.d.ament@gmail.com
> >:
> >
> > >Hi Thomas
> > >
> > >Good news, upgrading to 1.5.2 changed me from 18 errors and 4 failures
> to
> > >13 errors (or some number like that).
> > >
> > >Hi Mark, Romain,
> > >
> > >Here's a gist to get you looking
> > >
> > >https://gist.github.com/johnament/5710627
> > >
> > >It looks like OWB isn't happy when you use abstract classes and type
> > >hierarchies.  not sure if we ever added support for abstract classes for
> > >the partial bean feature that Gerhard did. Gerhard?
> > >
> > >John
> > >
> > >
> > >On Tue, Jun 4, 2013 at 7:33 PM, John D. Ament
> > ><jo...@gmail.com>wrote:
> > >
> > >> Hi Thomas,
> > >>
> > >> Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better,
> > >> 1.5.2 is also good.  I'm going to run the tests against 1.5.2.
> > >>
> > >> John
> > >>
> > >>
> > >> On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament
> > >><jo...@gmail.com>wrote:
> > >>
> > >>> Hi Thomas,
> > >>>
> > >>> Actually, the first issue I see is a common one for arquillian users.
> > >>>  The no active context issue can be fixed by switching from an
> > >>>embedded to
> > >>> managed/remote container.  For TomEE it's just as clean, do you mind
> > >>>if I
> > >>> try this out locally to see if some of the errors go away?
> > >>>
> > >>> BTW (from a design standpoint) do you need to bind everything to
> > >>> @RequestScoped? What if a user is working on something that isn't
> > >>>request
> > >>> scoped?
> > >>>
> > >>> John
> > >>>
> > >>>
> > >>> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com>
> > >>>wrote:
> > >>>
> > >>>> Hey TomEE experts
> > >>>>
> > >>>> I'm currently working on getting the CDI query code base ready for
> > >>>>import
> > >>>> [1] but haven't been successful running it under the TomEE profile
> > >>>>(JBoss
> > >>>> and Glassfish run both fine).
> > >>>>
> > >>>> As far as I could drill down to the problems it's
> > >>>> - a Maven Aether library conflict with ShrinkWrap (solved by
> > >>>>upgrading to
> > >>>> ShrinkWrap 2 beta)
> > >>>> - some of the partial beans not created (haven't checked all errors
> > >>>>but
> > >>>> seems mainly related to abstract classes)
> > >>>> - JPA metamodel classes not initialized (all null)
> > >>>>
> > >>>> Haven't run it with the debugger yet, but in case any of those
> > >>>>problems
> > >>>> ring a bell, a hint is very welcome.
> > >>>>
> > >>>> [1] https://github.com/ctpconsulting/query/tree/dsimport
> > >>>>
> > >>>
> > >>>
> > >>
> >
> >
>

Re: [Help] Arquillian tests with TomEE profile

Posted by Thomas Hug <th...@gmail.com>.
Thnx a lot for the quick responses! Awesome :-)

As for
1) Crashes the tests in case TomEE is not in the local repo. But not a big
deal to work around.
2) Yes seems like there's a problem with the type hierarchy: The
@Repository (with the @PartialBeanBinding) annotation on
AbstractEntityRepository is not picked up on the subclasses of
AbstractEntityRepository. Temporarily fixed by annotating the subclasses
directly.
3) Solved. OpenJPA was somehow picky on validating a collection property
requiring a setter (hmm...) and therefore failing the metamodel
initialization.

Will check all the tests again but I'd assume by today evening the three
main profiles with TomEE, JBoss and GlassFish should be running.


On Wed, Jun 5, 2013 at 9:59 AM, Arne Limburg
<ar...@openknowledge.de>wrote:

> Hi John,
>
> Could you please move this over to the openwebbeans list, since it seems
> to be an issue with our AbstractAnnotationLiteral.
>
>
> Cheers,
> Arne
>
> Am 05.06.13 02:00 schrieb "John D. Ament" unter <jo...@gmail.com>:
>
> >Hi Thomas
> >
> >Good news, upgrading to 1.5.2 changed me from 18 errors and 4 failures to
> >13 errors (or some number like that).
> >
> >Hi Mark, Romain,
> >
> >Here's a gist to get you looking
> >
> >https://gist.github.com/johnament/5710627
> >
> >It looks like OWB isn't happy when you use abstract classes and type
> >hierarchies.  not sure if we ever added support for abstract classes for
> >the partial bean feature that Gerhard did. Gerhard?
> >
> >John
> >
> >
> >On Tue, Jun 4, 2013 at 7:33 PM, John D. Ament
> ><jo...@gmail.com>wrote:
> >
> >> Hi Thomas,
> >>
> >> Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better,
> >> 1.5.2 is also good.  I'm going to run the tests against 1.5.2.
> >>
> >> John
> >>
> >>
> >> On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament
> >><jo...@gmail.com>wrote:
> >>
> >>> Hi Thomas,
> >>>
> >>> Actually, the first issue I see is a common one for arquillian users.
> >>>  The no active context issue can be fixed by switching from an
> >>>embedded to
> >>> managed/remote container.  For TomEE it's just as clean, do you mind
> >>>if I
> >>> try this out locally to see if some of the errors go away?
> >>>
> >>> BTW (from a design standpoint) do you need to bind everything to
> >>> @RequestScoped? What if a user is working on something that isn't
> >>>request
> >>> scoped?
> >>>
> >>> John
> >>>
> >>>
> >>> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com>
> >>>wrote:
> >>>
> >>>> Hey TomEE experts
> >>>>
> >>>> I'm currently working on getting the CDI query code base ready for
> >>>>import
> >>>> [1] but haven't been successful running it under the TomEE profile
> >>>>(JBoss
> >>>> and Glassfish run both fine).
> >>>>
> >>>> As far as I could drill down to the problems it's
> >>>> - a Maven Aether library conflict with ShrinkWrap (solved by
> >>>>upgrading to
> >>>> ShrinkWrap 2 beta)
> >>>> - some of the partial beans not created (haven't checked all errors
> >>>>but
> >>>> seems mainly related to abstract classes)
> >>>> - JPA metamodel classes not initialized (all null)
> >>>>
> >>>> Haven't run it with the debugger yet, but in case any of those
> >>>>problems
> >>>> ring a bell, a hint is very welcome.
> >>>>
> >>>> [1] https://github.com/ctpconsulting/query/tree/dsimport
> >>>>
> >>>
> >>>
> >>
>
>

Re: [Help] Arquillian tests with TomEE profile

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Would be great to get the snapshot running, it uses owb 1.2
Le 5 juin 2013 02:01, "John D. Ament" <jo...@gmail.com> a écrit :

> Hi Thomas
>
> Good news, upgrading to 1.5.2 changed me from 18 errors and 4 failures to
> 13 errors (or some number like that).
>
> Hi Mark, Romain,
>
> Here's a gist to get you looking
>
> https://gist.github.com/johnament/5710627
>
> It looks like OWB isn't happy when you use abstract classes and type
> hierarchies.  not sure if we ever added support for abstract classes for
> the partial bean feature that Gerhard did. Gerhard?
>
> John
>
>
> On Tue, Jun 4, 2013 at 7:33 PM, John D. Ament <john.d.ament@gmail.com
> >wrote:
>
> > Hi Thomas,
> >
> > Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better,
> > 1.5.2 is also good.  I'm going to run the tests against 1.5.2.
> >
> > John
> >
> >
> > On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament <john.d.ament@gmail.com
> >wrote:
> >
> >> Hi Thomas,
> >>
> >> Actually, the first issue I see is a common one for arquillian users.
> >>  The no active context issue can be fixed by switching from an embedded
> to
> >> managed/remote container.  For TomEE it's just as clean, do you mind if
> I
> >> try this out locally to see if some of the errors go away?
> >>
> >> BTW (from a design standpoint) do you need to bind everything to
> >> @RequestScoped? What if a user is working on something that isn't
> request
> >> scoped?
> >>
> >> John
> >>
> >>
> >> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com>
> wrote:
> >>
> >>> Hey TomEE experts
> >>>
> >>> I'm currently working on getting the CDI query code base ready for
> import
> >>> [1] but haven't been successful running it under the TomEE profile
> (JBoss
> >>> and Glassfish run both fine).
> >>>
> >>> As far as I could drill down to the problems it's
> >>> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading
> to
> >>> ShrinkWrap 2 beta)
> >>> - some of the partial beans not created (haven't checked all errors but
> >>> seems mainly related to abstract classes)
> >>> - JPA metamodel classes not initialized (all null)
> >>>
> >>> Haven't run it with the debugger yet, but in case any of those problems
> >>> ring a bell, a hint is very welcome.
> >>>
> >>> [1] https://github.com/ctpconsulting/query/tree/dsimport
> >>>
> >>
> >>
> >
>

Re: [Help] Arquillian tests with TomEE profile

Posted by Arne Limburg <ar...@openknowledge.de>.
Hi John,

Could you please move this over to the openwebbeans list, since it seems
to be an issue with our AbstractAnnotationLiteral.


Cheers,
Arne

Am 05.06.13 02:00 schrieb "John D. Ament" unter <jo...@gmail.com>:

>Hi Thomas
>
>Good news, upgrading to 1.5.2 changed me from 18 errors and 4 failures to
>13 errors (or some number like that).
>
>Hi Mark, Romain,
>
>Here's a gist to get you looking
>
>https://gist.github.com/johnament/5710627
>
>It looks like OWB isn't happy when you use abstract classes and type
>hierarchies.  not sure if we ever added support for abstract classes for
>the partial bean feature that Gerhard did. Gerhard?
>
>John
>
>
>On Tue, Jun 4, 2013 at 7:33 PM, John D. Ament
><jo...@gmail.com>wrote:
>
>> Hi Thomas,
>>
>> Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better,
>> 1.5.2 is also good.  I'm going to run the tests against 1.5.2.
>>
>> John
>>
>>
>> On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament
>><jo...@gmail.com>wrote:
>>
>>> Hi Thomas,
>>>
>>> Actually, the first issue I see is a common one for arquillian users.
>>>  The no active context issue can be fixed by switching from an
>>>embedded to
>>> managed/remote container.  For TomEE it's just as clean, do you mind
>>>if I
>>> try this out locally to see if some of the errors go away?
>>>
>>> BTW (from a design standpoint) do you need to bind everything to
>>> @RequestScoped? What if a user is working on something that isn't
>>>request
>>> scoped?
>>>
>>> John
>>>
>>>
>>> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com>
>>>wrote:
>>>
>>>> Hey TomEE experts
>>>>
>>>> I'm currently working on getting the CDI query code base ready for
>>>>import
>>>> [1] but haven't been successful running it under the TomEE profile
>>>>(JBoss
>>>> and Glassfish run both fine).
>>>>
>>>> As far as I could drill down to the problems it's
>>>> - a Maven Aether library conflict with ShrinkWrap (solved by
>>>>upgrading to
>>>> ShrinkWrap 2 beta)
>>>> - some of the partial beans not created (haven't checked all errors
>>>>but
>>>> seems mainly related to abstract classes)
>>>> - JPA metamodel classes not initialized (all null)
>>>>
>>>> Haven't run it with the debugger yet, but in case any of those
>>>>problems
>>>> ring a bell, a hint is very welcome.
>>>>
>>>> [1] https://github.com/ctpconsulting/query/tree/dsimport
>>>>
>>>
>>>
>>


Re: [Help] Arquillian tests with TomEE profile

Posted by "John D. Ament" <jo...@gmail.com>.
Hi Thomas

Good news, upgrading to 1.5.2 changed me from 18 errors and 4 failures to
13 errors (or some number like that).

Hi Mark, Romain,

Here's a gist to get you looking

https://gist.github.com/johnament/5710627

It looks like OWB isn't happy when you use abstract classes and type
hierarchies.  not sure if we ever added support for abstract classes for
the partial bean feature that Gerhard did. Gerhard?

John


On Tue, Jun 4, 2013 at 7:33 PM, John D. Ament <jo...@gmail.com>wrote:

> Hi Thomas,
>
> Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better,
> 1.5.2 is also good.  I'm going to run the tests against 1.5.2.
>
> John
>
>
> On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament <jo...@gmail.com>wrote:
>
>> Hi Thomas,
>>
>> Actually, the first issue I see is a common one for arquillian users.
>>  The no active context issue can be fixed by switching from an embedded to
>> managed/remote container.  For TomEE it's just as clean, do you mind if I
>> try this out locally to see if some of the errors go away?
>>
>> BTW (from a design standpoint) do you need to bind everything to
>> @RequestScoped? What if a user is working on something that isn't request
>> scoped?
>>
>> John
>>
>>
>> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com> wrote:
>>
>>> Hey TomEE experts
>>>
>>> I'm currently working on getting the CDI query code base ready for import
>>> [1] but haven't been successful running it under the TomEE profile (JBoss
>>> and Glassfish run both fine).
>>>
>>> As far as I could drill down to the problems it's
>>> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
>>> ShrinkWrap 2 beta)
>>> - some of the partial beans not created (haven't checked all errors but
>>> seems mainly related to abstract classes)
>>> - JPA metamodel classes not initialized (all null)
>>>
>>> Haven't run it with the debugger yet, but in case any of those problems
>>> ring a bell, a hint is very welcome.
>>>
>>> [1] https://github.com/ctpconsulting/query/tree/dsimport
>>>
>>
>>
>

Re: [Help] Arquillian tests with TomEE profile

Posted by "John D. Ament" <jo...@gmail.com>.
Hi Thomas,

Also, Arquillian + TomEE was kinda buggy in 1.5.0.  1.5.1 was better, 1.5.2
is also good.  I'm going to run the tests against 1.5.2.

John


On Tue, Jun 4, 2013 at 7:29 PM, John D. Ament <jo...@gmail.com>wrote:

> Hi Thomas,
>
> Actually, the first issue I see is a common one for arquillian users.  The
> no active context issue can be fixed by switching from an embedded to
> managed/remote container.  For TomEE it's just as clean, do you mind if I
> try this out locally to see if some of the errors go away?
>
> BTW (from a design standpoint) do you need to bind everything to
> @RequestScoped? What if a user is working on something that isn't request
> scoped?
>
> John
>
>
> On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com> wrote:
>
>> Hey TomEE experts
>>
>> I'm currently working on getting the CDI query code base ready for import
>> [1] but haven't been successful running it under the TomEE profile (JBoss
>> and Glassfish run both fine).
>>
>> As far as I could drill down to the problems it's
>> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
>> ShrinkWrap 2 beta)
>> - some of the partial beans not created (haven't checked all errors but
>> seems mainly related to abstract classes)
>> - JPA metamodel classes not initialized (all null)
>>
>> Haven't run it with the debugger yet, but in case any of those problems
>> ring a bell, a hint is very welcome.
>>
>> [1] https://github.com/ctpconsulting/query/tree/dsimport
>>
>
>

Re: [Help] Arquillian tests with TomEE profile

Posted by "John D. Ament" <jo...@gmail.com>.
Hi Thomas,

Actually, the first issue I see is a common one for arquillian users.  The
no active context issue can be fixed by switching from an embedded to
managed/remote container.  For TomEE it's just as clean, do you mind if I
try this out locally to see if some of the errors go away?

BTW (from a design standpoint) do you need to bind everything to
@RequestScoped? What if a user is working on something that isn't request
scoped?

John


On Tue, Jun 4, 2013 at 4:53 PM, Thomas Hug <th...@gmail.com> wrote:

> Hey TomEE experts
>
> I'm currently working on getting the CDI query code base ready for import
> [1] but haven't been successful running it under the TomEE profile (JBoss
> and Glassfish run both fine).
>
> As far as I could drill down to the problems it's
> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
> ShrinkWrap 2 beta)
> - some of the partial beans not created (haven't checked all errors but
> seems mainly related to abstract classes)
> - JPA metamodel classes not initialized (all null)
>
> Haven't run it with the debugger yet, but in case any of those problems
> ring a bell, a hint is very welcome.
>
> [1] https://github.com/ctpconsulting/query/tree/dsimport
>

Re: [Help] Arquillian tests with TomEE profile

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

1) yes, known, not sure it is a real issue since both deps are test deps
and both are not mandatory
2) same code as openwebbeans (would be better to go on openwebbeans list
for this issue IMO)
3) you generated them (a sample here
https://github.com/rmannibucau/JeBlog/tree/master/pom.xml)? was the
entitymanager already used - if not try to add <property
name="openejb.jpa.init-entitymanager" value="true" /> in your
persistence.xml?

PS: sorry was not able to build your project with my current network
connection

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/6/4 Thomas Hug <th...@gmail.com>
>
> Hey TomEE experts
>
> I'm currently working on getting the CDI query code base ready for import
> [1] but haven't been successful running it under the TomEE profile (JBoss
> and Glassfish run both fine).
>
> As far as I could drill down to the problems it's
> - a Maven Aether library conflict with ShrinkWrap (solved by upgrading to
> ShrinkWrap 2 beta)
> - some of the partial beans not created (haven't checked all errors but
> seems mainly related to abstract classes)
> - JPA metamodel classes not initialized (all null)
>
> Haven't run it with the debugger yet, but in case any of those problems
> ring a bell, a hint is very welcome.
>
> [1] https://github.com/ctpconsulting/query/tree/dsimport