I'm having a problem when running my unit tests from maven. I get the following error :
[junit] Running ch.tecost.siems.service.user.SiemsUserServiceTest 0 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/gehel/.maven/repository/ehcache/jars/ehcache-1.1.jar!/ehcache-failsafe.xml 2478 [main] WARN org.hibernate.cache.EhCacheProvider - Could not find configuration [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 2508 [main] WARN org.hibernate.cache.EhCacheProvider - Could not find configuration [org.hibernate.cache.StandardQueryCache]; using defaults. CharScanner; panic: ClassNotFoundException: When running the same test from eclipse, I get a bit more infos : ch.tecost.siems.service.user.SiemsUserServiceException: Error performing 'ch.tecost.siems.service.user.SiemsUserService.getSiemsUsers()' --> java.lang.NoClassDefFoundError: antlr/ANTLRException at ch.tecost.siems.service.user.SiemsUserServiceBase.getSiemsUsers(SiemsUserServiceBase.java:126) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:99) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy77.getSiemsUsers(Unknown Source) at ch.tecost.siems.service.user.SiemsUserServiceTest.testGetSiemsUsers(SiemsUserServiceTest.java:33) 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:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194) Caused by: java.lang.NoClassDefFoundError: antlr/ANTLRException at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:27) at org.hibernate.impl.SessionFactoryImpl.createQueryTranslators(SessionFactoryImpl.java:351) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:417) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:824) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:782) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at ch.tecost.siems.dao.user.SiemsUserDaoBase.findAll(SiemsUserDaoBase.java:310) at ch.tecost.siems.dao.user.SiemsUserDaoBase.findAll(SiemsUserDaoBase.java:299) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:99) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy5.findAll(Unknown Source) at ch.tecost.siems.service.user.SiemsUserServiceImpl.handleGetSiemsUsers(SiemsUserServiceImpl.java:65) at ch.tecost.siems.service.user.SiemsUserServiceBase.getSiemsUsers(SiemsUserServiceBase.java:118) ... 29 more The test itself is very basic. It gets an instance of the SiemsUserService using "ServiceLocator.instance().getSiemsUserService();" and calls one method that loads a list of users. I find it quite strange that "org.hibernate.hql.ast.HqlToken" isnt found as is seems that some other Hibernate classes are loaded before and they are both in the same jar ... I'm not completly sure what change I did that couses that (there has been quite a lot of commits in our CVS lately ...) but we upgraded from Hibernate 2 to Hibernate 3.0.1, that might be related. Also, even if the tests fail, the deployed (Tomcat) application works just fine ... strange, as I dont have any special jar in $CATALINA_HOME/common/lib ... Do you have any idea what I should be looking for ? Thanks ! -- Jabber : [EMAIL PROTECTED] (feel free to contact me) _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3555#3555 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user