5 Replies Latest reply on Jan 18, 2011 5:10 PM by Aslak Knutsen

    Arquillian + EclipseLink deployment Glassfish remote : canonical metamodel class not found

    Stephane Le Mouel Newbie

      Hi guys, I'm french so i hope that you'll forgive my english.

      I'm encountering a small problem when trying to execute my arquillian test...

       

      I manage to inject a bean in my test class and the entityManager that i get is able to execute some createNativeQuery, so far ..all is good.

       

      What makes me write this question is that when i try execute an HQL query with entityManager.createQuery, i get this message that may sound familiar to some of you ...

       

      If you want me to publish some of my code, no problem just ask

       

      For now, here is the error stack trace :

       

      LE PLUS FIN: Begin predeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Predeployed; factoryCount 1

      LE PLUS FIN: End predeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Predeployed; factoryCount 2

      INFO: Portable JNDI names for EJB Gorp : [java:global/jsr88-8585001103973347774/Gorp, java:global/jsr88-8585001103973347774/Gorp!arianeGroupe.controller.Gorp]

      INFO: Portable JNDI names for EJB DataRepositoryProducer : [java:global/jsr88-8585001103973347774/DataRepositoryProducer, java:global/jsr88-8585001103973347774/DataRepositoryProducer!arianeGroupe.data.DataRepositoryProducerLocal]

      INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

       

      INFO: Loading application jsr88-8585001103973347774 at /test

      INFO: Loading application jsr88-8585001103973347774 at /test

      INFO: Loading application jsr88-8585001103973347774 at /test

       

      INFO: gorp est instancié : Impeccable!!

      INFO: Hi!

      LE PLUS FIN: Begin deploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Predeployed; factoryCount 2

      INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

      LE PLUS FIN: property=eclipselink.target-server; value=SunAS9; translated value=org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform

      LE PLUS FIN: property=eclipselink.logging.level; value=ALL; translated value=ALL

      LE PLUS FIN: property=eclipselink.logging.level; value=ALL; translated value=ALL

      INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.HSQLPlatform, RegularExpression: (?i)hsql.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.InformixPlatform, RegularExpression: (?i)informix.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.PointBasePlatform, RegularExpression: (?i)pointbase.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.DB2Platform, RegularExpression: (?i).*db2.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.SQLServerPlatform, RegularExpression: (?i)microsoft.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.PostgreSQLPlatform, RegularExpression: (?i)postgresql.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.H2Platform, RegularExpression: (?i)h2.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.SybasePlatform, RegularExpression: (?i)(sybase.*)|(adaptive server enterprise.*)|(SQL Server).

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.FirebirdPlatform, RegularExpression: (?i)firebird.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.JavaDBPlatform, RegularExpression: (?i).*derby.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform, RegularExpression: (?i)oracle.*.

      LE PLUS FIN: DBPlatform: org.eclipse.persistence.platform.database.MySQLPlatform, RegularExpression: (?i)mysql.*.

      FIN: Detected Vendor platform: org.eclipse.persistence.platform.database.MySQLPlatform

      CONFIG: connecting(DatabaseLogin(

          platform=>DatabasePlatform

          user name=> ""

          connector=>JNDIConnector datasource name=>null

      ))

      CONFIG: Connected: jdbc:mysql://localhost:3306/ariane

          User: root@localhost

          Database: MySQL  Version: 5.1.36-community-log

          Driver: MySQL-AB JDBC Driver  Version: mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )

      CONFIG: connecting(DatabaseLogin(

          platform=>MySQLPlatform

          user name=> ""

          connector=>JNDIConnector datasource name=>null

      ))

      CONFIG: Connected: jdbc:mysql://localhost:3306/ariane

          User: root@localhost

          Database: MySQL  Version: 5.1.36-community-log

          Driver: MySQL-AB JDBC Driver  Version: mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )

      INFO: file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test login successful

      PLUS FIN: Canonical Metamodel class [arianeGroupe.model.Utilisateur_] not found during initialization.

      LE PLUS FIN: End deploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Deployed; factoryCount 2

      PLUS FIN: client acquired

      PLUS FIN: TX binding to tx mgr, status=STATUS_ACTIVE

      PLUS FIN: TX beginTransaction, status=STATUS_ACTIVE

      LE PLUS FIN: Execute query DataReadQuery(sql="select * from utilisateur")

      LE PLUS FIN: reconnecting to external connection pool

      FIN: select * from utilisateur

      PLUS FIN: TX beforeCompletion callback, status=STATUS_ACTIVE

      PLUS FIN: begin unit of work commit

      PLUS FIN: TX afterCompletion callback, status=COMMITTED

      PLUS FIN: end unit of work commit

      PLUS FIN: release unit of work

      PLUS FIN: client released

      INFO: [1LE MOUELSTEPHANEaa@aol.comhihihihihihihihihihihihihih]

      ATTENTION: A system exception occurred during an invocation on EJB Gorp method public java.util.List arianeGroupe.controller.Gorp.afficheTableUtilisateur()

      javax.ejb.EJBException

          at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)

          at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)

          at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)

          at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)

          at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)

          at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)

          at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)

          at $Proxy148.afficheTableUtilisateur(Unknown Source)

          at arianeGroupe.controller.__EJB31_Generated__Gorp__Intf____Bean__.afficheTableUtilisateur(Unknown Source)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)

          at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

          at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

          at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)

          at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)

          at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)

          at arianeGroupe.controller.Gorp_$$_javassist_29.afficheTableUtilisateur(Gorp_$$_javassist_29.java)

          at arianeGroupe.test.BasicArchiEclateeTest.testHi(BasicArchiEclateeTest.java:68)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

          at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:251)

          at org.jboss.arquillian.impl.handler.TestEventExecuter.callback(TestEventExecuter.java:44)

          at org.jboss.arquillian.impl.handler.TestEventExecuter.callback(TestEventExecuter.java:34)

          at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

          at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

          at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)

          at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)

          at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)

          at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)

          at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

          at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)

          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)

          at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)

          at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

          at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)

          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

          at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

          at org.junit.runner.JUnitCore.run(JUnitCore.java:136)

          at org.jboss.arquillian.junit.JUnitTestRunner.execute(JUnitTestRunner.java:69)

          at org.jboss.arquillian.protocol.servlet_3.ServletTestRunner.doGet(ServletTestRunner.java:84)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)

          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)

          at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)

          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)

          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)

          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)

          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)

          at com.sun.grizzly.ContextTask.run(ContextTask.java:69)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:

      Exception Description: Syntax error parsing the query [select u from arianeGroupe.model.Utilisateur_ u], line 1, column 26: syntax error at [.].

      Internal Exception: MismatchedTokenException(83!=78)

          at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1328)

          at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:425)

          at arianeGroupe.data.SessionScopedBean.afficheUtilisateurs(SessionScopedBean.java:53)

          at arianeGroupe.controller.Gorp.afficheTableUtilisateur(Gorp.java:20)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)

          at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)

          at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)

          at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)

          at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

          at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)

          at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:47)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)

          at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

          at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)

          at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)

          at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)

          at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

          at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)

          at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)

          at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)

          at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)

          ... 76 more

      Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.JPQLException

      Exception Description: Syntax error parsing the query [select u from arianeGroupe.model.Utilisateur_ u], line 1, column 26: syntax error at [.].

      Internal Exception: MismatchedTokenException(83!=78)

          at org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:362)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:304)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:245)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.reportError(JPQLParser.java:362)

          at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(Unknown Source)

          at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown Source)

          at org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown Source)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.rangeVariableDeclaration(JPQLParser.java:3575)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.identificationVariableDeclaration(JPQLParser.java:3483)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.fromClause(JPQLParser.java:3367)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:356)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:276)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)

          at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)

          at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:198)

          at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:173)

          at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:125)

          at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:109)

          at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1326)

          ... 109 more

      Caused by: MismatchedTokenException(83!=78)

          ... 123 more

       

       

      LE PLUS FIN: Begin undeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Deployed; factoryCount 2

      LE PLUS FIN: End undeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-8585001103973347774/WEB-INF/lib/testCase.jar_test; state Deployed; factoryCount 1

       

      See you soon, Stephane

        • 1. Arquillian + EclipseLink deployment Glassfish remote : canonical metamodel class not found
          Aslak Knutsen Master

          The exception seems to be related to your query ?

           

          Exception Description: Syntax error parsing the query [select u from arianeGroupe.model.Utilisateur_ u], line 1, column 26: syntax error at [.].

           

          Is that the package name? should the _ be there?

          1 of 1 people found this helpful
          • 2. Arquillian + EclipseLink deployment Glassfish remote : canonical metamodel class not found
            Stephane Le Mouel Newbie

            You were right Aslak my query wasn't right, i corrected in 'select u from Utilisateur u' where Utilisateur points to 'arianeGroupe.model.Utilisateur'

             

            Now the eclipseLink provider makes a good translation as you can see he finds the fields : IDUTILISATEUR, MAIL, ...

             

            And the error cause seems less complex (Class cast error) :

             

            but why can't he cast a type into its own type ?

             

            the query i made is the following :

             

            final List<Utilisateur> lo = (List<Utilisateur>) em.createQuery(

                         "select u from Utilisateur u")

                         .getResultList();

             

            =============================================================

                      The stack trace

            =============================================================

             

            PLUS FIN: client acquired

            PLUS FIN: TX binding to tx mgr, status=STATUS_ACTIVE

            LE PLUS FIN: Execute query ReadAllQuery(referenceClass=Utilisateur sql="SELECT IDUTILISATEUR, MAILUTILISATEUR, COMMENTAIRE, NOMUTILISATEUR, PRENOMUTILISATEUR FROM utilisateur")

            LE PLUS FIN: reconnecting to external connection pool

            FIN: SELECT IDUTILISATEUR, MAILUTILISATEUR, COMMENTAIRE, NOMUTILISATEUR, PRENOMUTILISATEUR FROM utilisateur

            LE PLUS FIN: Register the existing object arianeGroupe.model.Utilisateur@bdd4ae

            PLUS FIN: TX afterCompletion callback, status=ROLLEDBACK

            PLUS FIN: release unit of work

            PLUS FIN: client released

            ATTENTION: A system exception occurred during an invocation on EJB Gorp method public java.util.List arianeGroupe.controller.Gorp.afficheTableUtilisateur()

            javax.ejb.EJBException

                at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)

                at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)

                at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)

                at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)

                at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)

                at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)

                at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)

                at $Proxy112.afficheTableUtilisateur(Unknown Source)

                at arianeGroupe.controller.__EJB31_Generated__Gorp__Intf____Bean__.afficheTableUtilisateur(Unknown Source)

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

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)

                at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)

                at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)

                at arianeGroupe.controller.Gorp_$$_javassist_13.afficheTableUtilisateur(Gorp_$$_javassist_13.java)

                at arianeGroupe.test.BasicArchiEclateeTest.testHi(BasicArchiEclateeTest.java:68)

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

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

                at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:251)

                at org.jboss.arquillian.impl.handler.TestEventExecuter.callback(TestEventExecuter.java:44)

                at org.jboss.arquillian.impl.handler.TestEventExecuter.callback(TestEventExecuter.java:34)

                at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

                at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

                at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)

                at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)

                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)

                at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)

                at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)

                at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)

                at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:136)

                at org.jboss.arquillian.junit.JUnitTestRunner.execute(JUnitTestRunner.java:69)

                at org.jboss.arquillian.protocol.servlet_3.ServletTestRunner.doGet(ServletTestRunner.java:84)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

                at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)

                at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)

                at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

                at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)

                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)

                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)

                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)

                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)

                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)

                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)

                at java.lang.Thread.run(Thread.java:619)

            Caused by: java.lang.ClassCastException: arianeGroupe.model.Utilisateur cannot be cast to arianeGroupe.model.Utilisateur

                at arianeGroupe.data.SessionScopedBean.afficheUtilisateurs(SessionScopedBean.java:57)

                at arianeGroupe.controller.Gorp.afficheTableUtilisateur(Gorp.java:20)

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

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)

                at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)

                at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)

                at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)

                at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

                at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)

                at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:47)

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

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)

                at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

                at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)

                at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)

                at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)

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

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)

                at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)

                at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)

                at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)

                at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)

                at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)

                ... 76 more

             

             

            LE PLUS FIN: Begin undeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-3628818245331899704/WEB-INF/lib/testCase.jar_test; state Deployed; factoryCount 2

            LE PLUS FIN: End undeploying Persistence Unit test; session file:/D:/ariane/utils/glassfish3.0.1-b22/glassfish/domains/domain1/applications/jsr88-3628818245331899704/WEB-INF/lib/testCase.jar_test; state Deployed; factoryCount 1

            • 3. Arquillian + EclipseLink deployment Glassfish remote : canonical metamodel class not found
              Stephane Le Mouel Newbie

              Dear Aslak thank you for your time and work ! It works all fine! That was just some stupid error in my code, not in arquillian nor in eclipseLink

              • 4. Arquillian + EclipseLink deployment Glassfish remote : canonical metamodel class not found
                Aslak Knutsen Master

                The Classes are form two different ClassLoaders. Not sure why that would happen, you basically do the same as they do here:

                http://nosoftskills.com/2011/01/unit-testing-services-arquillian/