@Romain,

I have increased the log and I'm doing some further investigations. I'm
using Hibernate as persistence provider and I have an exception:
java.lang.RuntimeException: by java.lang.NoClassDefFoundError:
org/hibernate/proxy/HibernateProxy

in my arquillian-pom.xml I have
hibernate-core
hibernate-jpa-2.0-api
hibernate-entitymanager
hibernate-validator

but it seems it doesn't find the HibernateProxy

If I add further dependencies to the arquillian-pom.xml, like:
hibernate-ehcache
hibernate-commons-annotations

I get
java.lang.ClassCastException:
org.apache.openejb.hibernate.OpenEJBJtaPlatform cannot be cast to
org.hibernate.service.jta.platform.spi.JtaPlatform

However, I'm not sure if it is related to the @Startup and @Singleton
problem.




On Sat, Feb 23, 2013 at 2:18 PM, Romain Manni-Bucau
<rmannibu...@gmail.com>wrote:

> Don't you have some deps betweens beans not filled (@DependsOn)
> Le 23 févr. 2013 11:40, "Luca Merolla" <luca.mero...@gmail.com> a écrit :
>
> > Interesting is the fact that if I "mock" the @Singleton bean by changing
> >
> > @Inject // previously I was using @EJB
> > protected SystemPropertyBeanLocal propertyRegistry;
> >
> > I create a new mock bean
> > @Stateless // @Startup
> > @Alternative // @Singleton
> > public class SystemPropertyBean implements SystemPropertyBeanLocal {...
> >
> > And I define the <alternative> class in the bean.xml the test works.
> >
> > That makes me suspect that there is something fishy somewhere
> >
> >
> > On Sat, Feb 23, 2013 at 11:28 AM, Luca Merolla <luca.mero...@gmail.com
> > >wrote:
> >
> > > I'll pack an example to reproduce the error but basically I have one
> bean
> > > which is very similar to the example from the TomEE Singleton
> > > documentation, I just dont have @ConcurrencyManagement(BEAN):
> > > https://tomee.apache.org/examples-trunk/simple-singleton/
> > >
> > > In my case I'm loading properties from a database and I'm adding them
> at
> > > the system properties on startup.
> > >
> > > The singleton bean gets injected and if I check
> > > the getDatabaseProperties().size() it works, so the DBUnit is loaded
> > > correctly.
> > > However, if I do getProperty(key) it always return null.
> > >
> > > I have thought that the applicationStartup() was not executed at the
> > > startup so I have tried to force that from the Arquillian test but the
> > > behaviour didn't change
> > >
> > > Here is my singleton bean class
> > >
> > > https://gist.github.com/lucamerolla/5019229
> > >
> > >
> > >
> > >
> > >
> > > On Sat, Feb 23, 2013 at 10:57 AM, Romain Manni-Bucau <
> > > rmannibu...@gmail.com> wrote:
> > >
> > >> Hi Luca,
> > >>
> > >> It works, what's the error?
> > >> Le 23 févr. 2013 10:54, "Luca Merolla" <luca.mero...@gmail.com> a
> > écrit :
> > >>
> > >> > Hi all,
> > >> >
> > >> > are @Singleton and @Startup annotations working with Arquillian and
> > >> TomEE
> > >> > embedded.
> > >> > I have been testing for a while and the only beans that are causing
> me
> > >> > problems are the ones annotated with these two annotations.
> > >> >
> > >> > Is there something that I need to add, or simply it is not supported
> > at
> > >> > that stage by Arquillian?
> > >> >
> > >> > Thanks in advance,
> > >> > Luca
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > >   *Luca Merolla*
> > > Management, Business & Technology Consultant
> > >
> > >
> > >  <http://maps.google.com/maps?q=&hl=en>  *Mobile:* +393774569974
> > > *Email:* l...@merollaconsulting.com
> > >  *www.linkedin.com/in/lucamerolla*
> > > *Website <http://www.merollaconsulting.com>*
> > >
> > >
> > > Merolla Consulting Limited
> > >
> >
> >
> >
> > --
> >   *Luca Merolla*
> > Management, Business & Technology Consultant
> >
> >
> >  <http://maps.google.com/maps?q=&hl=en>  *Mobile:* +393774569974
> > *Email:* l...@merollaconsulting.com
> >  *www.linkedin.com/in/lucamerolla*
> > *Website <http://www.merollaconsulting.com>*
> >
> >
> > Merolla Consulting Limited
> >
>



-- 
  *Luca Merolla*
Management, Business & Technology Consultant


 <http://maps.google.com/maps?q=&hl=en>  *Mobile:* +393774569974
*Email:* l...@merollaconsulting.com
 *www.linkedin.com/in/lucamerolla*
*Website <http://www.merollaconsulting.com>*


Merolla Consulting Limited

Reply via email to