0 Replies Latest reply on Nov 9, 2011 1:16 PM by bernard stanyer

    Arquillian RC 2/4 with JBoss 6.1

    bernard stanyer Newbie

      Hello,

       

      The main question is wether the combination : -Eclipse Indigo + JBoss 6.1 Final + Arquillian RC 2/4 +JUnit-  runs stable ? (more or less)

      I ask this question because I'm trying to run Tests on Software but get really nasty Exceptions I don't even can understand.

      Maybe someone can help me figure out wether my IDE settings are bogus  or the code is faulty or the combination mentioned before causes my problems.

       

      Note: I did run some Tests on a JBoss released code (for Testing the combination) which was succesfull. But this code is simple and does not include EJB nor Databases.

       

      I suspect the combination to be reason for the Errors - maybe some arquillian- .jars are the wrong ones or i messed up some configs in the Arquillian.xml  - I simply don't know and ask all of you for help

       

      (Fun Fact : a co-worker of mine pretends that the combination worked fine for testing with JBoss 7.0 but I was there.)

       

       

      Here are the Exceptions and Stacktrace (in parts) I get :

       

      A)

      java.lang.RuntimeException: Could not inject members

      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:135)

      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:78)

      at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

      at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:82)

      .

      .

      .

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

      at java.lang.Thread.run(Unknown Source)

      Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.jboss.ejb3.ejbref.resolver.spi.UnresolvableReferenceException : Could not resolve reference [EJB Reference: beanInterface 'java.lang.Object', beanName '', mappedName 'null'] in AbstractVFSDeploymentContext@838476722{vfs:///C:/jboss6_1/jboss-6.1.0.Final/server/default/deploy/lisa-server.war} [Proxied because : Original exception not deserilizable, ClassNotFoundException]

      at org.jboss.ejb3.ejbref.resolver.ejb30.impl.ScopedEJBReferenceResolver.resolveEjb(ScopedEJBReferenceResolver.java:80)

      at org.jboss.weld.integration.ejb.JBossEjbInjectionServices.resolveEjb(JBossEjbInjectionServices.java:67)

      at org.jboss.weld.util.Beans.injectEEFields(Beans.java:775)

      ... 

      And 90 More.

       

      B)

      javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.SQLGrammarException: could not insert: [de.ebcot.bsctool.ejb.location.entity.LocationEntity]

      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148)

      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227)

      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:287)

      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:203)

      at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)

      .

      .

      .

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

      at java.lang.Thread.run(Unknown Source)

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [de.ebcot.bsctool.ejb.location.entity.LocationEntity]

      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215)

      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148)

      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1154)

      at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:678)

      at org.jboss.jpa.impl.tx.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:206)

      at de.ebcot.bsctool.ejb.GenericCRUDControl.create(GenericCRUDControl.java:58)

      at de.ebcot.bsctool.ejb.GenericCRUDControl.createList(GenericCRUDControl.java:135)

      .

      .

      .

      at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95)

      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223)

      ... 127 more

      Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.hibernate.exception.SQLGrammarException : could not insert: [de.ebcot.bsctool.ejb.location.entity.LocationEntity] [Proxied because : Original exception not deserilizable, ClassNotFoundException]

      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)

      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

      at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:64)

      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2345)

      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2852)

      at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)

      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)

      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)

      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)

      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)

      at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:69)

      at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:179)

      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135)

      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)

      at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808)

      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782)

      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786)

      at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:672)

      ... 185 more

      Caused by: java.sql.SQLException: Table not found in statement [insert into LocationEntity (ID, negativeID, autoSize, bottomEdge, enabled, importKey, incremental, label, leftEdge, matrix, name, organisationLevel, position, rightEdge, selectable, topEdge, userLoginCount, virtualOU) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]

      at org.hsqldb.jdbc.Util.throwError(Unknown Source)

      at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)

      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:467)

      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:455)

      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:253)

      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)

      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)

      at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:54)

      ... 200 more