Fornax-Platform
Forum

Question on error running unit tests in eclipse

View: New views
14 Messages — Rating Filter:   Alert me  

Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Question on error running unit tests in eclipse Sorry if this isn’t the right forum for “help me” questions – please direct me to a more appropriate resource if that’s the case.

My issue:
I’ve got a new business tier project I’m trying to run tests for.

When I run from the command line (say, via mvn clean install), they all fail as expected (they’re the default generated NotImplementeds).
When I try to use eclipse’s Run As Junit, I get an entirely different result (see output below for more detail).

Thanks in advance for any insight you can share.

 
The entire output is below, but here’s the relevant part (I assume).

4164 ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@262f4813] to prepare test instance [null(com.intuit.services.acs.service.api.FirmManagerTest)] java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'firmRepository' defined in file [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/services/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
java.lang.NoSuchMethodError: org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V






Entire output:

0    INFO  TestContextManager - @TestExecutionListeners is not present for class [class com.intuit.services.acs.service.api.FirmManagerTest]: using defaults. 180  INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext-test.xml] 932  INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [SessionFactory-test.xml] 1011 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [Interceptor-test.xml] 1053 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [Interceptor.xml] 1191 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [more-test.xml] 1258 INFO  AbstractApplicationContext - Refreshing org.springframework.context.support.GenericApplicationContext@2f833eca: display name [org.springframework.context.support.GenericApplicationContext@2f833eca]; startup date [Sat Sep 12 14:09:19 CDT 2009]; root of context hierarchy 1259 INFO  AbstractApplicationContext - Bean factory for application context [org.springframework.context.support.GenericApplicationContext@2f833eca]: org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc5069 1415 INFO  DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc5069: defining beans [org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,firmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,documentManager,employeeManager,engagementManager,entitlementManager,eventManager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFactory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlushNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxyCreator,businessService,readOnlyBusinessService,updatingBusinessService,messageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy 1716 INFO  Environment        - Hibernate 3.3.1.GA 1719 INFO  Environment        - hibernate.properties not found 1721 INFO  Environment        - Bytecode provider name : javassist 1724 INFO  Environment        - using JDK 1.4 java.sql.Timestamp handling 1935 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSActivity -> ACSACTIVITY 2012 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSAddress -> ACSADDRESS 2030 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSClient -> ACSCLIENT 2080 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSDocument -> ACSDOCUMENT 2102 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSDocumentContent -> ACSDOCUMENTCONTENT 2117 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSEmployee -> ACSEMPLOYEE 2152 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSEngagement -> ACSENGAGEMENT 2185 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSEntitlement -> ACSENTITLEMENT 2241 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSEntityReference -> ACSENTITYREFERENCE 2279 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSEvent -> ACSEVENT 2354 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSFirm -> ACSFIRM 2386 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSOffering -> ACSOFFERING 2418 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSOfferingAlias -> ACSOFFERINGALIAS 2447 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSOfferingSKU -> ACSOFFERINGSKU 2476 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSOrder -> ACSORDER 2529 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSOrganization -> ACSORGANIZATION 2560 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSPerson -> ACSPERSON 2594 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSRole -> ACSROLE 2629 INFO  HbmBinder          - Mapping class: com.intuit.services.acs.domain.impl.ACSSessionContext -> ACSSESSIONCONTEXT 2650 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSClient.Contacts -> ACSPERSON 2651 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSClient.Documents -> ACSDOCUMENT 2651 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSClient.Engagements -> ACSENGAGEMENT 2652 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSEmployee.Roles -> ACSROLE 2652 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSEngagement.Documents -> ACSDOCUMENT 2653 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSEntitlement.Activities -> ACSACTIVITY 2655 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSEvent.ImpactedEntities -> ACSENTITYREFERENCE 2656 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Entitlements -> ACSENTITLEMENT 2656 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Engagements -> ACSENGAGEMENT 2662 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Documents -> ACSDOCUMENT 2663 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Clients -> ACSCLIENT 2663 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Staff -> ACSEMPLOYEE 2664 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSFirm.Orders -> ACSORDER 2664 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSOffering.SKUs -> ACSOFFERINGSKU 2665 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSOffering.Aliases -> ACSOFFERINGALIAS 2665 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSOrganization.Addresses -> ACSADDRESS 2666 INFO  HbmBinder          - Mapping collection: com.intuit.services.acs.domain.impl.ACSPerson.Addresses -> ACSADDRESS 2666 INFO  LocalSessionFactoryBean - Building new Hibernate SessionFactory 2713 INFO  ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider 3194 INFO  SettingsFactory    - RDBMS: HSQL Database Engine, version: 1.8.0 3194 INFO  SettingsFactory    - JDBC driver: HSQL Database Engine Driver, version: 1.8.0 3206 INFO  Dialect            - Using dialect: org.hibernate.dialect.HSQLDialect 3209 INFO  TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory 3211 INFO  TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 3211 INFO  SettingsFactory    - Automatic flush during beforeCompletion(): disabled 3211 INFO  SettingsFactory    - Automatic session close at end of transaction: disabled 3212 INFO  SettingsFactory    - JDBC batch size: 15 3212 INFO  SettingsFactory    - JDBC batch updates for versioned data: disabled 3224 INFO  SettingsFactory    - Scrollable result sets: enabled 3225 INFO  SettingsFactory    - JDBC3 getGeneratedKeys(): disabled 3225 INFO  SettingsFactory    - Connection release mode: auto 3226 INFO  SettingsFactory    - Default batch fetch size: 1 3226 INFO  SettingsFactory    - Generate SQL with comments: disabled 3227 INFO  SettingsFactory    - Order SQL updates by primary key: disabled 3227 INFO  SettingsFactory    - Order SQL inserts for batching: disabled 3228 INFO  SettingsFactory    - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 3230 INFO  ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory3230 INFO  SettingsFactory    - Query language substitutions: {false=0, true=1} 3231 INFO  SettingsFactory    - JPA-QL strict compliance: disabled 3231 INFO  SettingsFactory    - Second-level cache: enabled 3232 INFO  SettingsFactory    - Query cache: enabled 3260 INFO  SettingsFactory    - Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 3261 INFO  RegionFactoryCacheProviderBridge - Cache provider: net.sf.ehcache.hibernate.EhCacheProvider 3263 INFO  SettingsFactory    - Optimize cache for minimal puts: disabled 3264 INFO  SettingsFactory    - Structured second-level cache entries: disabled 3264 INFO  SettingsFactory    - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 3269 INFO  SettingsFactory    - Echoing all SQL to stdout 3270 INFO  SettingsFactory    - Statistics: disabled 3271 INFO  SettingsFactory    - Deleted entity synthetic identifier rollback: disabled 3272 INFO  SettingsFactory    - Default entity-mode: pojo 3273 INFO  SettingsFactory    - Named query checking : enabled 3340 INFO  SessionFactoryImpl - building session factory 3791 INFO  SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured 3799 INFO  SchemaExport       - Running hbm2ddl schema export 3800 INFO  SchemaExport       - exporting generated schema to database 3821 INFO  SchemaExport       - schema export complete 3828 INFO  UpdateTimestampsCache - starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache 3830 WARN  EhCacheProvider    - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 3834 INFO  StandardQueryCache - starting query cache at region: org.hibernate.cache.StandardQueryCache 3835 WARN  EhCacheProvider    - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults. 4145 INFO  DefaultSingletonBeanRegistry - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc5069: defining beans [org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,firmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,documentManager,employeeManager,engagementManager,entitlementManager,eventManager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFactory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlushNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxyCreator,businessService,readOnlyBusinessService,updatingBusinessService,messageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy 4154 INFO  AbstractSessionFactoryBean - Closing Hibernate SessionFactory 4154 INFO  SessionFactoryImpl - closing 4155 INFO  SchemaExport       - Running hbm2ddl schema export 4155 INFO  SchemaExport       - exporting generated schema to database 4161 INFO  SchemaExport       - schema export complete 4164 ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@262f4813] to prepare test instance [null(com.intuit.services.acs.service.api.FirmManagerTest)] java.lang.IllegalStateException: Failed to load ApplicationContext    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:201)    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59)    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52)    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'firmRepository' defined in file [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/services/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)    at java.security.AccessController.doPrivileged(Native Method)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)    at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)    at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:197)    ... 17 more Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required    at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:117)    at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)    ... 33 more java.lang.NoSuchMethodError: org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:155)    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59)    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52)    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't know why you get different results when running from maven and eclipse, but you have found a bug.

You are using
generate.repository.hibernateSupport=true
right?

We must generate the necessary dependency injection to HibernateDaoSupport.
I think we should support JpaDaoSupport also.

I have created jira issue:
http://fornax.itemis.de/jira/browse/CSC-406
I will fix this within a few days.

/Patrik

Jef Pfeiffer wrote:
Sorry if this isn¹t the right forum for ³help me² questions ­ please direct
me to a more appropriate resource if that¹s the case.

My issue:
I¹ve got a new business tier project I¹m trying to run tests for.

When I run from the command line (say, via mvn clean install), they all fail
as expected (they¹re the default generated NotImplementeds).
When I try to use eclipse¹s Run As Junit, I get an entirely different result
(see output below for more detail).

Thanks in advance for any insight you can share.

 
The entire output is below, but here¹s the relevant part (I assume).

4164 ERROR TestContextManager - Caught exception while allowing
TestExecutionListener
[org.springframework.test.context.support.DependencyInjectionTestExecutionLi
stener@262f4813] to prepare test instance
[null(com.intuit.services.acs.service.api.FirmManagerTest)]
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'firmRepository' defined in file
[/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException:
'sessionFactory' or 'hibernateTemplate' is required
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or
'hibernateTemplate' is required
java.lang.NoSuchMethodError:
org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
ription;Ljava/lang/Throwable;)V






Entire output:

0    INFO  TestContextManager - @TestExecutionListeners is not present for
class [class com.intuit.services.acs.service.api.FirmManagerTest]: using
defaults. 180  INFO  XmlBeanDefinitionReader - Loading XML bean definitions
from class path resource [applicationContext-test.xml] 932  INFO
XmlBeanDefinitionReader - Loading XML bean definitions from class path
resource [SessionFactory-test.xml] 1011 INFO  XmlBeanDefinitionReader -
Loading XML bean definitions from class path resource [Interceptor-test.xml]
1053 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class
path resource [Interceptor.xml] 1191 INFO  XmlBeanDefinitionReader - Loading
XML bean definitions from class path resource [more-test.xml] 1258 INFO
AbstractApplicationContext - Refreshing
org.springframework.context.support.GenericApplicationContext@2f833eca:
display name
[org.springframework.context.support.GenericApplicationContext@2f833eca];
startup date [Sat Sep 12 14:09:19 CDT 2009]; root of context hierarchy 1259
INFO  AbstractApplicationContext - Bean factory for application context
[org.springframework.context.support.GenericApplicationContext@2f833eca]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
9 1415 INFO  DefaultListableBeanFactory - Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
9: defining beans
[org.springframework.context.annotation.internalPersistenceAnnotationProcess
or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
documentManager,employeeManager,engagementManager,entitlementManager,eventMa
nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy 1716
INFO  Environment        - Hibernate 3.3.1.GA 1719 INFO  Environment
- hibernate.properties not found 1721 INFO  Environment        - Bytecode
provider name : javassist 1724 INFO  Environment        - using JDK 1.4
java.sql.Timestamp handling 1935 INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSActivity -> ACSACTIVITY 2012 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSAddress -> ACSADDRESS 2030 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSClient -> ACSCLIENT 2080 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSDocument -> ACSDOCUMENT 2102 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSDocumentContent -> ACSDOCUMENTCONTENT
2117 INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSEmployee -> ACSEMPLOYEE 2152 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSEngagement -> ACSENGAGEMENT 2185 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSEntitlement -> ACSENTITLEMENT 2241
INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSEntityReference -> ACSENTITYREFERENCE
2279 INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSEvent -> ACSEVENT 2354 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSFirm -> ACSFIRM 2386 INFO  HbmBinder
- Mapping class: com.intuit.services.acs.domain.impl.ACSOffering ->
ACSOFFERING 2418 INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSOfferingAlias -> ACSOFFERINGALIAS
2447 INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSOfferingSKU -> ACSOFFERINGSKU 2476
INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSOrder -> ACSORDER 2529 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSOrganization -> ACSORGANIZATION 2560
INFO  HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSPerson -> ACSPERSON 2594 INFO
HbmBinder          - Mapping class:
com.intuit.services.acs.domain.impl.ACSRole -> ACSROLE 2629 INFO  HbmBinder
- Mapping class: com.intuit.services.acs.domain.impl.ACSSessionContext ->
ACSSESSIONCONTEXT 2650 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSClient.Contacts -> ACSPERSON 2651
INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSClient.Documents -> ACSDOCUMENT 2651
INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSClient.Engagements -> ACSENGAGEMENT
2652 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSEmployee.Roles -> ACSROLE 2652 INFO
HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSEngagement.Documents -> ACSDOCUMENT
2653 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSEntitlement.Activities -> ACSACTIVITY
2655 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSEvent.ImpactedEntities ->
ACSENTITYREFERENCE 2656 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Entitlements -> ACSENTITLEMENT
2656 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Engagements -> ACSENGAGEMENT
2662 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Documents -> ACSDOCUMENT 2663
INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Clients -> ACSCLIENT 2663 INFO
HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Staff -> ACSEMPLOYEE 2664 INFO
HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSFirm.Orders -> ACSORDER 2664 INFO
HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSOffering.SKUs -> ACSOFFERINGSKU 2665
INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSOffering.Aliases -> ACSOFFERINGALIAS
2665 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSOrganization.Addresses -> ACSADDRESS
2666 INFO  HbmBinder          - Mapping collection:
com.intuit.services.acs.domain.impl.ACSPerson.Addresses -> ACSADDRESS 2666
INFO  LocalSessionFactoryBean - Building new Hibernate SessionFactory 2713
INFO  ConnectionProviderFactory - Initializing connection provider:
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider 3194
INFO  SettingsFactory    - RDBMS: HSQL Database Engine, version: 1.8.0 3194
INFO  SettingsFactory    - JDBC driver: HSQL Database Engine Driver,
version: 1.8.0 3206 INFO  Dialect            - Using dialect:
org.hibernate.dialect.HSQLDialect 3209 INFO  TransactionFactoryFactory -
Transaction strategy:
org.springframework.orm.hibernate3.SpringTransactionFactory 3211 INFO
TransactionManagerLookupFactory - No TransactionManagerLookup configured (in
JTA environment, use of read-write or transactional second-level cache is
not recommended) 3211 INFO  SettingsFactory    - Automatic flush during
beforeCompletion(): disabled 3211 INFO  SettingsFactory    - Automatic
session close at end of transaction: disabled 3212 INFO  SettingsFactory
- JDBC batch size: 15 3212 INFO  SettingsFactory    - JDBC batch updates for
versioned data: disabled 3224 INFO  SettingsFactory    - Scrollable result
sets: enabled 3225 INFO  SettingsFactory    - JDBC3 getGeneratedKeys():
disabled 3225 INFO  SettingsFactory    - Connection release mode: auto 3226
INFO  SettingsFactory    - Default batch fetch size: 1 3226 INFO
SettingsFactory    - Generate SQL with comments: disabled 3227 INFO
SettingsFactory    - Order SQL updates by primary key: disabled 3227 INFO
SettingsFactory    - Order SQL inserts for batching: disabled 3228 INFO
SettingsFactory    - Query translator:
org.hibernate.hql.ast.ASTQueryTranslatorFactory 3230 INFO
ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory 3230 INFO
SettingsFactory    - Query language substitutions: {false=0, true=1} 3231
INFO  SettingsFactory    - JPA-QL strict compliance: disabled 3231 INFO
SettingsFactory    - Second-level cache: enabled 3232 INFO  SettingsFactory
- Query cache: enabled 3260 INFO  SettingsFactory    - Cache region factory
: org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 3261 INFO
RegionFactoryCacheProviderBridge - Cache provider:
net.sf.ehcache.hibernate.EhCacheProvider 3263 INFO  SettingsFactory    -
Optimize cache for minimal puts: disabled 3264 INFO  SettingsFactory    -
Structured second-level cache entries: disabled 3264 INFO  SettingsFactory
- Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 3269
INFO  SettingsFactory    - Echoing all SQL to stdout 3270 INFO
SettingsFactory    - Statistics: disabled 3271 INFO  SettingsFactory    -
Deleted entity synthetic identifier rollback: disabled 3272 INFO
SettingsFactory    - Default entity-mode: pojo 3273 INFO  SettingsFactory
- Named query checking : enabled 3340 INFO  SessionFactoryImpl - building
session factory 3791 INFO  SessionFactoryObjectFactory - Not binding factory
to JNDI, no JNDI name configured 3799 INFO  SchemaExport       - Running
hbm2ddl schema export 3800 INFO  SchemaExport       - exporting generated
schema to database 3821 INFO  SchemaExport       - schema export complete
3828 INFO  UpdateTimestampsCache - starting update timestamps cache at
region: org.hibernate.cache.UpdateTimestampsCache 3830 WARN  EhCacheProvider
- Could not find a specific ehcache configuration for cache named
[org.hibernate.cache.UpdateTimestampsCache]; using defaults. 3834 INFO
StandardQueryCache - starting query cache at region:
org.hibernate.cache.StandardQueryCache 3835 WARN  EhCacheProvider    - Could
not find a specific ehcache configuration for cache named
[org.hibernate.cache.StandardQueryCache]; using defaults. 4145 INFO
DefaultSingletonBeanRegistry - Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
9: defining beans
[org.springframework.context.annotation.internalPersistenceAnnotationProcess
or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
documentManager,employeeManager,engagementManager,entitlementManager,eventMa
nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy 4154
INFO  AbstractSessionFactoryBean - Closing Hibernate SessionFactory 4154
INFO  SessionFactoryImpl - closing 4155 INFO  SchemaExport       - Running
hbm2ddl schema export 4155 INFO  SchemaExport       - exporting generated
schema to database 4161 INFO  SchemaExport       - schema export complete
4164 ERROR TestContextManager - Caught exception while allowing
TestExecutionListener
[org.springframework.test.context.support.DependencyInjectionTestExecutionLi
stener@262f4813] to prepare test instance
[null(com.intuit.services.acs.service.api.FirmManagerTest)]
java.lang.IllegalStateException: Failed to load ApplicationContext    at
org.springframework.test.context.TestContext.getApplicationContext(TestConte
xt.java:201)    at
org.springframework.test.context.support.DependencyInjectionTestExecutionLis
tener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
at
org.springframework.test.context.support.DependencyInjectionTestExecutionLis
tener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
at
org.springframework.test.context.TestContextManager.prepareTestInstance(Test
ContextManager.java:255)    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(S
pringJUnit4ClassRunner.java:111)    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
thod(SpringJUnit4ClassRunner.java:148)    at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
va:59)    at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
)    at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
nit4ClassRunner.java:97)    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
erence.java:45)    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196) Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'firmRepository' defined in file
[/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException:
'sessionFactory' or 'hibernateTemplate' is required    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)    at
java.security.AccessController.doPrivileged(Native Method)    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:380)    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:264)    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:261)    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:429)    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:728)    at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:380)    at
org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
ntext(AbstractGenericContextLoader.java:84)    at
org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
ntext(AbstractGenericContextLoader.java:42)    at
org.springframework.test.context.TestContext.loadApplicationContext(TestCont
ext.java:173)    at
org.springframework.test.context.TestContext.getApplicationContext(TestConte
xt.java:197)    ... 17 more Caused by: java.lang.IllegalArgumentException:
'sessionFactory' or 'hibernateTemplate' is required    at
org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfi
g(HibernateDaoSupport.java:117)    at
org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.jav
a:44)    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)    ... 33 more
java.lang.NoSuchMethodError:
org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
ription;Ljava/lang/Throwable;)V    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
thod(SpringJUnit4ClassRunner.java:155)    at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
va:59)    at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
)    at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
nit4ClassRunner.java:97)    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
erence.java:45)    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse Very insightful, Patrick.  I am indeed using that flag.

Thanks for the quick response.

Pending a fix, should I just remove the flag and do hibernate access from the access impl rather than the repositories?


I’ll check on other machines and see if I can reproduce the originally reported test discrepancy (maybe I’ve just got a wonky issue with eclipse)...

Thanks,
Jef

On 9/13/09 3:16 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



I don't know why you get different results when running from maven and
eclipse, but you have found a bug.

You are using
generate.repository.hibernateSupport=true
right?

We must generate the necessary dependency injection to HibernateDaoSupport.
I think we should support JpaDaoSupport also.

I have created jira issue:
http://fornax.itemis.de/jira/browse/CSC-406
I will fix this within a few days.

/Patrik


Jef Pfeiffer wrote:
>
> Sorry if this isn¹t the right forum for ³help me² questions ­ please
> direct
> me to a more appropriate resource if that¹s the case.
>
> My issue:
> I¹ve got a new business tier project I¹m trying to run tests for.
>
> When I run from the command line (say, via mvn clean install), they all
> fail
> as expected (they¹re the default generated NotImplementeds).
> When I try to use eclipse¹s Run As Junit, I get an entirely different
> result
> (see output below for more detail).
>
> Thanks in advance for any insight you can share.
>
>
> The entire output is below, but here¹s the relevant part (I assume).
>
> 4164 ERROR TestContextManager - Caught exception while allowing
> TestExecutionListener
> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
> stener@262f4813] to prepare test instance
> [null(com.intuit.services.acs.service.api.FirmManagerTest)]
> java.lang.IllegalStateException: Failed to load ApplicationContext
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'firmRepository' defined in file
> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
> s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
> failed; nested exception is java.lang.IllegalArgumentException:
> 'sessionFactory' or 'hibernateTemplate' is required
> Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or
> 'hibernateTemplate' is required
> java.lang.NoSuchMethodError:
> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
> ription;Ljava/lang/Throwable;)V
>
>
>
>
>
>
> Entire output:
>
> 0    INFO  TestContextManager - @TestExecutionListeners is not present for
> class [class com.intuit.services.acs.service.api.FirmManagerTest]: using
> defaults. 180  INFO  XmlBeanDefinitionReader - Loading XML bean
> definitions
> from class path resource [applicationContext-test.xml] 932  INFO
> XmlBeanDefinitionReader - Loading XML bean definitions from class path
> resource [SessionFactory-test.xml] 1011 INFO  XmlBeanDefinitionReader -
> Loading XML bean definitions from class path resource
> [Interceptor-test.xml]
> 1053 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from
> class
> path resource [Interceptor.xml] 1191 INFO  XmlBeanDefinitionReader -
> Loading
> XML bean definitions from class path resource [more-test.xml] 1258 INFO
> AbstractApplicationContext - Refreshing
> org.springframework.context.support.GenericApplicationContext@2f833eca:
> display name
> [org.springframework.context.support.GenericApplicationContext@2f833eca];
> startup date [Sat Sep 12 14:09:19 CDT 2009]; root of context hierarchy
> 1259
> INFO  AbstractApplicationContext - Bean factory for application context
> [org.springframework.context.support.GenericApplicationContext@2f833eca]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
> 9 1415 INFO  DefaultListableBeanFactory - Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
> 9: defining beans
> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
> upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
> 1716
> INFO  Environment        - Hibernate 3.3.1.GA 1719 INFO  Environment
> - hibernate.properties not found 1721 INFO  Environment        - Bytecode
> provider name : javassist 1724 INFO  Environment        - using JDK 1.4
> java.sql.Timestamp handling 1935 INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSActivity -> ACSACTIVITY 2012 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSAddress -> ACSADDRESS 2030 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSClient -> ACSCLIENT 2080 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSDocument -> ACSDOCUMENT 2102 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSDocumentContent ->
> ACSDOCUMENTCONTENT
> 2117 INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSEmployee -> ACSEMPLOYEE 2152 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSEngagement -> ACSENGAGEMENT 2185
> INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSEntitlement -> ACSENTITLEMENT 2241
> INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSEntityReference ->
> ACSENTITYREFERENCE
> 2279 INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSEvent -> ACSEVENT 2354 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSFirm -> ACSFIRM 2386 INFO
> HbmBinder
> - Mapping class: com.intuit.services.acs.domain.impl.ACSOffering ->
> ACSOFFERING 2418 INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSOfferingAlias -> ACSOFFERINGALIAS
> 2447 INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSOfferingSKU -> ACSOFFERINGSKU 2476
> INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSOrder -> ACSORDER 2529 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSOrganization -> ACSORGANIZATION
> 2560
> INFO  HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSPerson -> ACSPERSON 2594 INFO
> HbmBinder          - Mapping class:
> com.intuit.services.acs.domain.impl.ACSRole -> ACSROLE 2629 INFO
> HbmBinder
> - Mapping class: com.intuit.services.acs.domain.impl.ACSSessionContext ->
> ACSSESSIONCONTEXT 2650 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSClient.Contacts -> ACSPERSON 2651
> INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSClient.Documents -> ACSDOCUMENT
> 2651
> INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSClient.Engagements -> ACSENGAGEMENT
> 2652 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSEmployee.Roles -> ACSROLE 2652 INFO
> HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSEngagement.Documents -> ACSDOCUMENT
> 2653 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSEntitlement.Activities ->
> ACSACTIVITY
> 2655 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSEvent.ImpactedEntities ->
> ACSENTITYREFERENCE 2656 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Entitlements -> ACSENTITLEMENT
> 2656 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Engagements -> ACSENGAGEMENT
> 2662 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Documents -> ACSDOCUMENT 2663
> INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Clients -> ACSCLIENT 2663 INFO
> HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Staff -> ACSEMPLOYEE 2664 INFO
> HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSFirm.Orders -> ACSORDER 2664 INFO
> HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSOffering.SKUs -> ACSOFFERINGSKU
> 2665
> INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSOffering.Aliases ->
> ACSOFFERINGALIAS
> 2665 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSOrganization.Addresses ->
> ACSADDRESS
> 2666 INFO  HbmBinder          - Mapping collection:
> com.intuit.services.acs.domain.impl.ACSPerson.Addresses -> ACSADDRESS 2666
> INFO  LocalSessionFactoryBean - Building new Hibernate SessionFactory 2713
> INFO  ConnectionProviderFactory - Initializing connection provider:
> org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider 3194
> INFO  SettingsFactory    - RDBMS: HSQL Database Engine, version: 1.8.0
> 3194
> INFO  SettingsFactory    - JDBC driver: HSQL Database Engine Driver,
> version: 1.8.0 3206 INFO  Dialect            - Using dialect:
> org.hibernate.dialect.HSQLDialect 3209 INFO  TransactionFactoryFactory -
> Transaction strategy:
> org.springframework.orm.hibernate3.SpringTransactionFactory 3211 INFO
> TransactionManagerLookupFactory - No TransactionManagerLookup configured
> (in
> JTA environment, use of read-write or transactional second-level cache is
> not recommended) 3211 INFO  SettingsFactory    - Automatic flush during
> beforeCompletion(): disabled 3211 INFO  SettingsFactory    - Automatic
> session close at end of transaction: disabled 3212 INFO  SettingsFactory
> - JDBC batch size: 15 3212 INFO  SettingsFactory    - JDBC batch updates
> for
> versioned data: disabled 3224 INFO  SettingsFactory    - Scrollable result
> sets: enabled 3225 INFO  SettingsFactory    - JDBC3 getGeneratedKeys():
> disabled 3225 INFO  SettingsFactory    - Connection release mode: auto
> 3226
> INFO  SettingsFactory    - Default batch fetch size: 1 3226 INFO
> SettingsFactory    - Generate SQL with comments: disabled 3227 INFO
> SettingsFactory    - Order SQL updates by primary key: disabled 3227 INFO
> SettingsFactory    - Order SQL inserts for batching: disabled 3228 INFO
> SettingsFactory    - Query translator:
> org.hibernate.hql.ast.ASTQueryTranslatorFactory 3230 INFO
> ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory 3230 INFO
> SettingsFactory    - Query language substitutions: {false=0, true=1} 3231
> INFO  SettingsFactory    - JPA-QL strict compliance: disabled 3231 INFO
> SettingsFactory    - Second-level cache: enabled 3232 INFO
> SettingsFactory
> - Query cache: enabled 3260 INFO  SettingsFactory    - Cache region
> factory
> : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 3261
> INFO
> RegionFactoryCacheProviderBridge - Cache provider:
> net.sf.ehcache.hibernate.EhCacheProvider 3263 INFO  SettingsFactory    -
> Optimize cache for minimal puts: disabled 3264 INFO  SettingsFactory    -
> Structured second-level cache entries: disabled 3264 INFO  SettingsFactory
> - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 3269
> INFO  SettingsFactory    - Echoing all SQL to stdout 3270 INFO
> SettingsFactory    - Statistics: disabled 3271 INFO  SettingsFactory    -
> Deleted entity synthetic identifier rollback: disabled 3272 INFO
> SettingsFactory    - Default entity-mode: pojo 3273 INFO  SettingsFactory
> - Named query checking : enabled 3340 INFO  SessionFactoryImpl - building
> session factory 3791 INFO  SessionFactoryObjectFactory - Not binding
> factory
> to JNDI, no JNDI name configured 3799 INFO  SchemaExport       - Running
> hbm2ddl schema export 3800 INFO  SchemaExport       - exporting generated
> schema to database 3821 INFO  SchemaExport       - schema export complete
> 3828 INFO  UpdateTimestampsCache - starting update timestamps cache at
> region: org.hibernate.cache.UpdateTimestampsCache 3830 WARN
> EhCacheProvider
> - Could not find a specific ehcache configuration for cache named
> [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 3834 INFO
> StandardQueryCache - starting query cache at region:
> org.hibernate.cache.StandardQueryCache 3835 WARN  EhCacheProvider    -
> Could
> not find a specific ehcache configuration for cache named
> [org.hibernate.cache.StandardQueryCache]; using defaults. 4145 INFO
> DefaultSingletonBeanRegistry - Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
> 9: defining beans
> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
> upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
> 4154
> INFO  AbstractSessionFactoryBean - Closing Hibernate SessionFactory 4154
> INFO  SessionFactoryImpl - closing 4155 INFO  SchemaExport       - Running
> hbm2ddl schema export 4155 INFO  SchemaExport       - exporting generated
> schema to database 4161 INFO  SchemaExport       - schema export complete
> 4164 ERROR TestContextManager - Caught exception while allowing
> TestExecutionListener
> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
> stener@262f4813] to prepare test instance
> [null(com.intuit.services.acs.service.api.FirmManagerTest)]
> java.lang.IllegalStateException: Failed to load ApplicationContext    at
> org.springframework.test.context.TestContext.getApplicationContext(TestConte
> xt.java:201)    at
> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
> tener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
> at
> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
> tener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
> at
> org.springframework.test.context.TestContextManager.prepareTestInstance(Test
> ContextManager.java:255)    at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(S
> pringJUnit4ClassRunner.java:111)    at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
> thod(SpringJUnit4ClassRunner.java:148)    at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
> va:59)    at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
> )    at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
> nit4ClassRunner.java:97)    at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
> erence.java:45)    at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
> 8)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:460)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:673)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
> java:386)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
> .java:196) Caused by:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'firmRepository' defined in file
> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
> s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
> failed; nested exception is java.lang.IllegalArgumentException:
> 'sessionFactory' or 'hibernateTemplate' is required    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1338)    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:473)    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> $1.run(AbstractAutowireCapableBeanFactory.java:409)    at
> java.security.AccessController.doPrivileged(Native Method)    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:380)    at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:264)    at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:222)    at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> ractBeanFactory.java:261)    at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:185)    at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:164)    at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> antiateSingletons(DefaultListableBeanFactory.java:429)    at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> toryInitialization(AbstractApplicationContext.java:728)    at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:380)    at
> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
> ntext(AbstractGenericContextLoader.java:84)    at
> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
> ntext(AbstractGenericContextLoader.java:42)    at
> org.springframework.test.context.TestContext.loadApplicationContext(TestCont
> ext.java:173)    at
> org.springframework.test.context.TestContext.getApplicationContext(TestConte
> xt.java:197)    ... 17 more Caused by: java.lang.IllegalArgumentException:
> 'sessionFactory' or 'hibernateTemplate' is required    at
> org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfi
> g(HibernateDaoSupport.java:117)    at
> org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.jav
> a:44)    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1335)    ... 33
> more
> java.lang.NoSuchMethodError:
> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
> ription;Ljava/lang/Throwable;)V    at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
> thod(SpringJUnit4ClassRunner.java:155)    at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
> va:59)    at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
> )    at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
> nit4ClassRunner.java:97)    at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
> erence.java:45)    at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
> 8)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:460)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:673)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
> java:386)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
> .java:196)
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@...
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25426739.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, the workaround is to not use the flag and use access impl instead.
/Patrik

Jef Pfeiffer wrote:
Very insightful, Patrick.  I am indeed using that flag.

Thanks for the quick response.

Pending a fix, should I just remove the flag and do hibernate access from
the access impl rather than the repositories?


I’ll check on other machines and see if I can reproduce the originally
reported test discrepancy (maybe I’ve just got a wonky issue with
eclipse)...

Thanks,
Jef

On 9/13/09 3:16 PM, "Patrik Nordwall" <patrik.nordwall@gmail.com> wrote:

>
>
> I don't know why you get different results when running from maven and
> eclipse, but you have found a bug.
>
> You are using
> generate.repository.hibernateSupport=true
> right?
>
> We must generate the necessary dependency injection to HibernateDaoSupport.
> I think we should support JpaDaoSupport also.
>
> I have created jira issue:
> http://fornax.itemis.de/jira/browse/CSC-406
> I will fix this within a few days.
>
> /Patrik
>
>
> Jef Pfeiffer wrote:
>> >
>> > Sorry if this isn¹t the right forum for ³help me² questions ­ please
>> > direct
>> > me to a more appropriate resource if that¹s the case.
>> >
>> > My issue:
>> > I¹ve got a new business tier project I¹m trying to run tests for.
>> >
>> > When I run from the command line (say, via mvn clean install), they all
>> > fail
>> > as expected (they¹re the default generated NotImplementeds).
>> > When I try to use eclipse¹s Run As Junit, I get an entirely different
>> > result
>> > (see output below for more detail).
>> >
>> > Thanks in advance for any insight you can share.
>> >
>> >
>> > The entire output is below, but here¹s the relevant part (I assume).
>> >
>> > 4164 ERROR TestContextManager - Caught exception while allowing
>> > TestExecutionListener
>> >
>> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
>> > stener@262f4813] to prepare test instance
>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>> > java.lang.IllegalStateException: Failed to load ApplicationContext
>> > Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> > creating bean with name 'firmRepository' defined in file
>> >
>> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
>> > s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
>> > failed; nested exception is java.lang.IllegalArgumentException:
>> > 'sessionFactory' or 'hibernateTemplate' is required
>> > Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or
>> > 'hibernateTemplate' is required
>> > java.lang.NoSuchMethodError:
>> >
>> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
>> > ription;Ljava/lang/Throwable;)V
>> >
>> >
>> >
>> >
>> >
>> >
>> > Entire output:
>> >
>> > 0    INFO  TestContextManager - @TestExecutionListeners is not present for
>> > class [class com.intuit.services.acs.service.api.FirmManagerTest]: using
>> > defaults. 180  INFO  XmlBeanDefinitionReader - Loading XML bean
>> > definitions
>> > from class path resource [applicationContext-test.xml] 932  INFO
>> > XmlBeanDefinitionReader - Loading XML bean definitions from class path
>> > resource [SessionFactory-test.xml] 1011 INFO  XmlBeanDefinitionReader -
>> > Loading XML bean definitions from class path resource
>> > [Interceptor-test.xml]
>> > 1053 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from
>> > class
>> > path resource [Interceptor.xml] 1191 INFO  XmlBeanDefinitionReader -
>> > Loading
>> > XML bean definitions from class path resource [more-test.xml] 1258 INFO
>> > AbstractApplicationContext - Refreshing
>> > org.springframework.context.support.GenericApplicationContext@2f833eca:
>> > display name
>> > [org.springframework.context.support.GenericApplicationContext@2f833eca];
>> > startup date [Sat Sep 12 14:09:19 CDT 2009]; root of context hierarchy
>> > 1259
>> > INFO  AbstractApplicationContext - Bean factory for application context
>> > [org.springframework.context.support.GenericApplicationContext@2f833eca]:
>> >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>> > 9 1415 INFO  DefaultListableBeanFactory - Pre-instantiating singletons in
>> >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>> > 9: defining beans
>> >
>> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
>> >
>> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
>> >
>> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
>> >
>> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
>> >
>> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
>> >
>> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
>> >
>> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
>> >
>> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
>> >
>> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
>> >
>> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
>> >
>> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
>> >
>> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
>> >
>> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
>> >
>> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
>> >
>> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
>> >
>> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
>> > upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
>> > 1716
>> > INFO  Environment        - Hibernate 3.3.1.GA 1719 INFO  Environment
>> > - hibernate.properties not found 1721 INFO  Environment        - Bytecode
>> > provider name : javassist 1724 INFO  Environment        - using JDK 1.4
>> > java.sql.Timestamp handling 1935 INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSActivity -> ACSACTIVITY 2012 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSAddress -> ACSADDRESS 2030 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSClient -> ACSCLIENT 2080 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSDocument -> ACSDOCUMENT 2102 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSDocumentContent ->
>> > ACSDOCUMENTCONTENT
>> > 2117 INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSEmployee -> ACSEMPLOYEE 2152 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSEngagement -> ACSENGAGEMENT 2185
>> > INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSEntitlement -> ACSENTITLEMENT 2241
>> > INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSEntityReference ->
>> > ACSENTITYREFERENCE
>> > 2279 INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSEvent -> ACSEVENT 2354 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSFirm -> ACSFIRM 2386 INFO
>> > HbmBinder
>> > - Mapping class: com.intuit.services.acs.domain.impl.ACSOffering ->
>> > ACSOFFERING 2418 INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSOfferingAlias -> ACSOFFERINGALIAS
>> > 2447 INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSOfferingSKU -> ACSOFFERINGSKU 2476
>> > INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSOrder -> ACSORDER 2529 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSOrganization -> ACSORGANIZATION
>> > 2560
>> > INFO  HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSPerson -> ACSPERSON 2594 INFO
>> > HbmBinder          - Mapping class:
>> > com.intuit.services.acs.domain.impl.ACSRole -> ACSROLE 2629 INFO
>> > HbmBinder
>> > - Mapping class: com.intuit.services.acs.domain.impl.ACSSessionContext ->
>> > ACSSESSIONCONTEXT 2650 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSClient.Contacts -> ACSPERSON 2651
>> > INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSClient.Documents -> ACSDOCUMENT
>> > 2651
>> > INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSClient.Engagements -> ACSENGAGEMENT
>> > 2652 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSEmployee.Roles -> ACSROLE 2652 INFO
>> > HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSEngagement.Documents -> ACSDOCUMENT
>> > 2653 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSEntitlement.Activities ->
>> > ACSACTIVITY
>> > 2655 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSEvent.ImpactedEntities ->
>> > ACSENTITYREFERENCE 2656 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Entitlements -> ACSENTITLEMENT
>> > 2656 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Engagements -> ACSENGAGEMENT
>> > 2662 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Documents -> ACSDOCUMENT 2663
>> > INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Clients -> ACSCLIENT 2663 INFO
>> > HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Staff -> ACSEMPLOYEE 2664 INFO
>> > HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSFirm.Orders -> ACSORDER 2664 INFO
>> > HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSOffering.SKUs -> ACSOFFERINGSKU
>> > 2665
>> > INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSOffering.Aliases ->
>> > ACSOFFERINGALIAS
>> > 2665 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSOrganization.Addresses ->
>> > ACSADDRESS
>> > 2666 INFO  HbmBinder          - Mapping collection:
>> > com.intuit.services.acs.domain.impl.ACSPerson.Addresses -> ACSADDRESS 2666
>> > INFO  LocalSessionFactoryBean - Building new Hibernate SessionFactory 2713
>> > INFO  ConnectionProviderFactory - Initializing connection provider:
>> > org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider 3194
>> > INFO  SettingsFactory    - RDBMS: HSQL Database Engine, version: 1.8.0
>> > 3194
>> > INFO  SettingsFactory    - JDBC driver: HSQL Database Engine Driver,
>> > version: 1.8.0 3206 INFO  Dialect            - Using dialect:
>> > org.hibernate.dialect.HSQLDialect 3209 INFO  TransactionFactoryFactory -
>> > Transaction strategy:
>> > org.springframework.orm.hibernate3.SpringTransactionFactory 3211 INFO
>> > TransactionManagerLookupFactory - No TransactionManagerLookup configured
>> > (in
>> > JTA environment, use of read-write or transactional second-level cache is
>> > not recommended) 3211 INFO  SettingsFactory    - Automatic flush during
>> > beforeCompletion(): disabled 3211 INFO  SettingsFactory    - Automatic
>> > session close at end of transaction: disabled 3212 INFO  SettingsFactory
>> > - JDBC batch size: 15 3212 INFO  SettingsFactory    - JDBC batch updates
>> > for
>> > versioned data: disabled 3224 INFO  SettingsFactory    - Scrollable result
>> > sets: enabled 3225 INFO  SettingsFactory    - JDBC3 getGeneratedKeys():
>> > disabled 3225 INFO  SettingsFactory    - Connection release mode: auto
>> > 3226
>> > INFO  SettingsFactory    - Default batch fetch size: 1 3226 INFO
>> > SettingsFactory    - Generate SQL with comments: disabled 3227 INFO
>> > SettingsFactory    - Order SQL updates by primary key: disabled 3227 INFO
>> > SettingsFactory    - Order SQL inserts for batching: disabled 3228 INFO
>> > SettingsFactory    - Query translator:
>> > org.hibernate.hql.ast.ASTQueryTranslatorFactory 3230 INFO
>> > ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory 3230 INFO
>> > SettingsFactory    - Query language substitutions: {false=0, true=1} 3231
>> > INFO  SettingsFactory    - JPA-QL strict compliance: disabled 3231 INFO
>> > SettingsFactory    - Second-level cache: enabled 3232 INFO
>> > SettingsFactory
>> > - Query cache: enabled 3260 INFO  SettingsFactory    - Cache region
>> > factory
>> > : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 3261
>> > INFO
>> > RegionFactoryCacheProviderBridge - Cache provider:
>> > net.sf.ehcache.hibernate.EhCacheProvider 3263 INFO  SettingsFactory    -
>> > Optimize cache for minimal puts: disabled 3264 INFO  SettingsFactory    -
>> > Structured second-level cache entries: disabled 3264 INFO  SettingsFactory
>> > - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 3269
>> > INFO  SettingsFactory    - Echoing all SQL to stdout 3270 INFO
>> > SettingsFactory    - Statistics: disabled 3271 INFO  SettingsFactory    -
>> > Deleted entity synthetic identifier rollback: disabled 3272 INFO
>> > SettingsFactory    - Default entity-mode: pojo 3273 INFO  SettingsFactory
>> > - Named query checking : enabled 3340 INFO  SessionFactoryImpl - building
>> > session factory 3791 INFO  SessionFactoryObjectFactory - Not binding
>> > factory
>> > to JNDI, no JNDI name configured 3799 INFO  SchemaExport       - Running
>> > hbm2ddl schema export 3800 INFO  SchemaExport       - exporting generated
>> > schema to database 3821 INFO  SchemaExport       - schema export complete
>> > 3828 INFO  UpdateTimestampsCache - starting update timestamps cache at
>> > region: org.hibernate.cache.UpdateTimestampsCache 3830 WARN
>> > EhCacheProvider
>> > - Could not find a specific ehcache configuration for cache named
>> > [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 3834 INFO
>> > StandardQueryCache - starting query cache at region:
>> > org.hibernate.cache.StandardQueryCache 3835 WARN  EhCacheProvider    -
>> > Could
>> > not find a specific ehcache configuration for cache named
>> > [org.hibernate.cache.StandardQueryCache]; using defaults. 4145 INFO
>> > DefaultSingletonBeanRegistry - Destroying singletons in
>> >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>> > 9: defining beans
>> >
>> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
>> >
>> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
>> >
>> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
>> >
>> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
>> >
>> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
>> >
>> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
>> >
>> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
>> >
>> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
>> >
>> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
>> >
>> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
>> >
>> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
>> >
>> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
>> >
>> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
>> >
>> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
>> >
>> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
>> >
>> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
>> > upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
>> > 4154
>> > INFO  AbstractSessionFactoryBean - Closing Hibernate SessionFactory 4154
>> > INFO  SessionFactoryImpl - closing 4155 INFO  SchemaExport       - Running
>> > hbm2ddl schema export 4155 INFO  SchemaExport       - exporting generated
>> > schema to database 4161 INFO  SchemaExport       - schema export complete
>> > 4164 ERROR TestContextManager - Caught exception while allowing
>> > TestExecutionListener
>> >
>> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
>> > stener@262f4813] to prepare test instance
>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>> > java.lang.IllegalStateException: Failed to load ApplicationContext    at
>> >
>> org.springframework.test.context.TestContext.getApplicationContext(TestConte
>> > xt.java:201)    at
>> >
>> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
>> > tener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
>> > at
>> >
>> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
>> > tener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
>> > at
>> >
>> org.springframework.test.context.TestContextManager.prepareTestInstance(Test
>> > ContextManager.java:255)    at
>> >
>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(S
>> > pringJUnit4ClassRunner.java:111)    at
>> >
>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
>> > thod(SpringJUnit4ClassRunner.java:148)    at
>> >
>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
>> > va:59)    at
>> >
>> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
>> > )    at
>> > org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
>> > at
>> > org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
>> > at
>> > org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
>> > at
>> >
>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
>> > nit4ClassRunner.java:97)    at
>> >
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
>> > erence.java:45)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
>> > 8)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>> > nner.java:460)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>> > nner.java:673)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
>> > java:386)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
>> > .java:196) Caused by:
>> > org.springframework.beans.factory.BeanCreationException: Error creating
>> > bean
>> > with name 'firmRepository' defined in file
>> >
>> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
>> > s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init method
>> > failed; nested exception is java.lang.IllegalArgumentException:
>> > 'sessionFactory' or 'hibernateTemplate' is required    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1338)    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > .doCreateBean(AbstractAutowireCapableBeanFactory.java:473)    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > $1.run(AbstractAutowireCapableBeanFactory.java:409)    at
>> > java.security.AccessController.doPrivileged(Native Method)    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > .createBean(AbstractAutowireCapableBeanFactory.java:380)    at
>> >
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
>> > stractBeanFactory.java:264)    at
>> >
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
>> > ngleton(DefaultSingletonBeanRegistry.java:222)    at
>> >
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
>> > ractBeanFactory.java:261)    at
>> >
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
>> > ctBeanFactory.java:185)    at
>> >
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
>> > ctBeanFactory.java:164)    at
>> >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
>> > antiateSingletons(DefaultListableBeanFactory.java:429)    at
>> >
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
>> > toryInitialization(AbstractApplicationContext.java:728)    at
>> >
>> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
>> > actApplicationContext.java:380)    at
>> >
>> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
>> > ntext(AbstractGenericContextLoader.java:84)    at
>> >
>> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
>> > ntext(AbstractGenericContextLoader.java:42)    at
>> >
>> org.springframework.test.context.TestContext.loadApplicationContext(TestCont
>> > ext.java:173)    at
>> >
>> org.springframework.test.context.TestContext.getApplicationContext(TestConte
>> > xt.java:197)    ... 17 more Caused by: java.lang.IllegalArgumentException:
>> > 'sessionFactory' or 'hibernateTemplate' is required    at
>> >
>> org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfi
>> > g(HibernateDaoSupport.java:117)    at
>> >
>> org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.jav
>> > a:44)    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)    at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1335)    ... 33
>> > more
>> > java.lang.NoSuchMethodError:
>> >
>> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
>> > ription;Ljava/lang/Throwable;)V    at
>> >
>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
>> > thod(SpringJUnit4ClassRunner.java:155)    at
>> >
>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
>> > va:59)    at
>> >
>> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
>> > )    at
>> > org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
>> > at
>> > org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
>> > at
>> > org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
>> > at
>> >
>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
>> > nit4ClassRunner.java:97)    at
>> >
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
>> > erence.java:45)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
>> > 8)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>> > nner.java:460)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>> > nner.java:673)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
>> > java:386)    at
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
>> > .java:196)
>> >
>> >
>>
------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > Fornax-developer mailing list
>> > Fornax-developer@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/fornax-developer
>> >
>> >
>
> --
> View this message in context:
> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
> 29s17564p25426739.html
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse When I take the flag out I get a different problem.

Specifically:

4376 WARN  TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.transaction.TransactionalTestExecutionListener@7fc4a2d3] to process 'before' execution of test method [public void com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm() throws java.lang.Exception] for test instance [null(com.intuit.services.acs.service.api.FirmManagerTest)] org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'txManager' is defined

Any ideas?

On 9/14/09 9:42 AM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



Yes, the workaround is to not use the flag and use access impl instead.
/Patrik


Jef Pfeiffer wrote:
>
> Very insightful, Patrick.  I am indeed using that flag.
>
> Thanks for the quick response.
>
> Pending a fix, should I just remove the flag and do hibernate access from
> the access impl rather than the repositories?
>
>
> I’ll check on other machines and see if I can reproduce the originally
> reported test discrepancy (maybe I’ve just got a wonky issue with
> eclipse)...
>
> Thanks,
> Jef
>
> On 9/13/09 3:16 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:
>
>>
>>
>> I don't know why you get different results when running from maven and
>> eclipse, but you have found a bug.
>>
>> You are using
>> generate.repository.hibernateSupport=true
>> right?
>>
>> We must generate the necessary dependency injection to
>> HibernateDaoSupport.
>> I think we should support JpaDaoSupport also.
>>
>> I have created jira issue:
>> http://fornax.itemis.de/jira/browse/CSC-406
>> I will fix this within a few days.
>>
>> /Patrik
>>
>>
>> Jef Pfeiffer wrote:
>>> >
>>> > Sorry if this isn¹t the right forum for ³help me² questions ­ please
>>> > direct
>>> > me to a more appropriate resource if that¹s the case.
>>> >
>>> > My issue:
>>> > I¹ve got a new business tier project I¹m trying to run tests for.
>>> >
>>> > When I run from the command line (say, via mvn clean install), they
>>> all
>>> > fail
>>> > as expected (they¹re the default generated NotImplementeds).
>>> > When I try to use eclipse¹s Run As Junit, I get an entirely different
>>> > result
>>> > (see output below for more detail).
>>> >
>>> > Thanks in advance for any insight you can share.
>>> >
>>> >
>>> > The entire output is below, but here¹s the relevant part (I assume).
>>> >
>>> > 4164 ERROR TestContextManager - Caught exception while allowing
>>> > TestExecutionListener
>>> >
>>> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
>>> > stener@262f4813] to prepare test instance
>>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>>> > java.lang.IllegalStateException: Failed to load ApplicationContext
>>> > Caused by: org.springframework.beans.factory.BeanCreationException:
>>> Error
>>> > creating bean with name 'firmRepository' defined in file
>>> >
>>> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
>>> > s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init
>>> method
>>> > failed; nested exception is java.lang.IllegalArgumentException:
>>> > 'sessionFactory' or 'hibernateTemplate' is required
>>> > Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or
>>> > 'hibernateTemplate' is required
>>> > java.lang.NoSuchMethodError:
>>> >
>>> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
>>> > ription;Ljava/lang/Throwable;)V
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > Entire output:
>>> >
>>> > 0    INFO  TestContextManager - @TestExecutionListeners is not present
>>> for
>>> > class [class com.intuit.services.acs.service.api.FirmManagerTest]:
>>> using
>>> > defaults. 180  INFO  XmlBeanDefinitionReader - Loading XML bean
>>> > definitions
>>> > from class path resource [applicationContext-test.xml] 932  INFO
>>> > XmlBeanDefinitionReader - Loading XML bean definitions from class path
>>> > resource [SessionFactory-test.xml] 1011 INFO  XmlBeanDefinitionReader
>>> -
>>> > Loading XML bean definitions from class path resource
>>> > [Interceptor-test.xml]
>>> > 1053 INFO  XmlBeanDefinitionReader - Loading XML bean definitions from
>>> > class
>>> > path resource [Interceptor.xml] 1191 INFO  XmlBeanDefinitionReader -
>>> > Loading
>>> > XML bean definitions from class path resource [more-test.xml] 1258
>>> INFO
>>> > AbstractApplicationContext - Refreshing
>>> >
>>> org.springframework.context.support.GenericApplicationContext@2f833eca:
>>> > display name
>>> >
>>> [org.springframework.context.support.GenericApplicationContext@2f833eca];
>>> > startup date [Sat Sep 12 14:09:19 CDT 2009]; root of context hierarchy
>>> > 1259
>>> > INFO  AbstractApplicationContext - Bean factory for application
>>> context
>>> >
>>> [org.springframework.context.support.GenericApplicationContext@2f833eca]:
>>> >
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>>> > 9 1415 INFO  DefaultListableBeanFactory - Pre-instantiating singletons
>>> in
>>> >
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>>> > 9: defining beans
>>> >
>>> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
>>> >
>>> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
>>> >
>>> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
>>> >
>>> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
>>> >
>>> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
>>> >
>>> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
>>> >
>>> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
>>> >
>>> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
>>> >
>>> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
>>> >
>>> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
>>> >
>>> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
>>> >
>>> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
>>> >
>>> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
>>> >
>>> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
>>> >
>>> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
>>> >
>>> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
>>> > upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
>>> > 1716
>>> > INFO  Environment        - Hibernate 3.3.1.GA 1719 INFO  Environment
>>> > - hibernate.properties not found 1721 INFO  Environment        -
>>> Bytecode
>>> > provider name : javassist 1724 INFO  Environment        - using JDK
>>> 1.4
>>> > java.sql.Timestamp handling 1935 INFO  HbmBinder          - Mapping
>>> class:
>>> > com.intuit.services.acs.domain.impl.ACSActivity -> ACSACTIVITY 2012
>>> INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSAddress -> ACSADDRESS 2030 INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSClient -> ACSCLIENT 2080 INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSDocument -> ACSDOCUMENT 2102
>>> INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSDocumentContent ->
>>> > ACSDOCUMENTCONTENT
>>> > 2117 INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSEmployee -> ACSEMPLOYEE 2152
>>> INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSEngagement -> ACSENGAGEMENT
>>> 2185
>>> > INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSEntitlement -> ACSENTITLEMENT
>>> 2241
>>> > INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSEntityReference ->
>>> > ACSENTITYREFERENCE
>>> > 2279 INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSEvent -> ACSEVENT 2354 INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSFirm -> ACSFIRM 2386 INFO
>>> > HbmBinder
>>> > - Mapping class: com.intuit.services.acs.domain.impl.ACSOffering ->
>>> > ACSOFFERING 2418 INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSOfferingAlias ->
>>> ACSOFFERINGALIAS
>>> > 2447 INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSOfferingSKU -> ACSOFFERINGSKU
>>> 2476
>>> > INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSOrder -> ACSORDER 2529 INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSOrganization -> ACSORGANIZATION
>>> > 2560
>>> > INFO  HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSPerson -> ACSPERSON 2594 INFO
>>> > HbmBinder          - Mapping class:
>>> > com.intuit.services.acs.domain.impl.ACSRole -> ACSROLE 2629 INFO
>>> > HbmBinder
>>> > - Mapping class: com.intuit.services.acs.domain.impl.ACSSessionContext
>>> ->
>>> > ACSSESSIONCONTEXT 2650 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSClient.Contacts -> ACSPERSON
>>> 2651
>>> > INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSClient.Documents -> ACSDOCUMENT
>>> > 2651
>>> > INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSClient.Engagements ->
>>> ACSENGAGEMENT
>>> > 2652 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSEmployee.Roles -> ACSROLE 2652
>>> INFO
>>> > HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSEngagement.Documents ->
>>> ACSDOCUMENT
>>> > 2653 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSEntitlement.Activities ->
>>> > ACSACTIVITY
>>> > 2655 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSEvent.ImpactedEntities ->
>>> > ACSENTITYREFERENCE 2656 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Entitlements ->
>>> ACSENTITLEMENT
>>> > 2656 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Engagements ->
>>> ACSENGAGEMENT
>>> > 2662 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Documents -> ACSDOCUMENT
>>> 2663
>>> > INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Clients -> ACSCLIENT 2663
>>> INFO
>>> > HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Staff -> ACSEMPLOYEE 2664
>>> INFO
>>> > HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSFirm.Orders -> ACSORDER 2664
>>> INFO
>>> > HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSOffering.SKUs -> ACSOFFERINGSKU
>>> > 2665
>>> > INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSOffering.Aliases ->
>>> > ACSOFFERINGALIAS
>>> > 2665 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSOrganization.Addresses ->
>>> > ACSADDRESS
>>> > 2666 INFO  HbmBinder          - Mapping collection:
>>> > com.intuit.services.acs.domain.impl.ACSPerson.Addresses -> ACSADDRESS
>>> 2666
>>> > INFO  LocalSessionFactoryBean - Building new Hibernate SessionFactory
>>> 2713
>>> > INFO  ConnectionProviderFactory - Initializing connection provider:
>>> > org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
>>> 3194
>>> > INFO  SettingsFactory    - RDBMS: HSQL Database Engine, version: 1.8.0
>>> > 3194
>>> > INFO  SettingsFactory    - JDBC driver: HSQL Database Engine Driver,
>>> > version: 1.8.0 3206 INFO  Dialect            - Using dialect:
>>> > org.hibernate.dialect.HSQLDialect 3209 INFO  TransactionFactoryFactory
>>> -
>>> > Transaction strategy:
>>> > org.springframework.orm.hibernate3.SpringTransactionFactory 3211 INFO
>>> > TransactionManagerLookupFactory - No TransactionManagerLookup
>>> configured
>>> > (in
>>> > JTA environment, use of read-write or transactional second-level cache
>>> is
>>> > not recommended) 3211 INFO  SettingsFactory    - Automatic flush
>>> during
>>> > beforeCompletion(): disabled 3211 INFO  SettingsFactory    - Automatic
>>> > session close at end of transaction: disabled 3212 INFO
>>> SettingsFactory
>>> > - JDBC batch size: 15 3212 INFO  SettingsFactory    - JDBC batch
>>> updates
>>> > for
>>> > versioned data: disabled 3224 INFO  SettingsFactory    - Scrollable
>>> result
>>> > sets: enabled 3225 INFO  SettingsFactory    - JDBC3
>>> getGeneratedKeys():
>>> > disabled 3225 INFO  SettingsFactory    - Connection release mode: auto
>>> > 3226
>>> > INFO  SettingsFactory    - Default batch fetch size: 1 3226 INFO
>>> > SettingsFactory    - Generate SQL with comments: disabled 3227 INFO
>>> > SettingsFactory    - Order SQL updates by primary key: disabled 3227
>>> INFO
>>> > SettingsFactory    - Order SQL inserts for batching: disabled 3228
>>> INFO
>>> > SettingsFactory    - Query translator:
>>> > org.hibernate.hql.ast.ASTQueryTranslatorFactory 3230 INFO
>>> > ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory 3230 INFO
>>> > SettingsFactory    - Query language substitutions: {false=0, true=1}
>>> 3231
>>> > INFO  SettingsFactory    - JPA-QL strict compliance: disabled 3231
>>> INFO
>>> > SettingsFactory    - Second-level cache: enabled 3232 INFO
>>> > SettingsFactory
>>> > - Query cache: enabled 3260 INFO  SettingsFactory    - Cache region
>>> > factory
>>> > : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
>>> 3261
>>> > INFO
>>> > RegionFactoryCacheProviderBridge - Cache provider:
>>> > net.sf.ehcache.hibernate.EhCacheProvider 3263 INFO  SettingsFactory  
>>> -
>>> > Optimize cache for minimal puts: disabled 3264 INFO  SettingsFactory  
>>> -
>>> > Structured second-level cache entries: disabled 3264 INFO
>>> SettingsFactory
>>> > - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
>>> 3269
>>> > INFO  SettingsFactory    - Echoing all SQL to stdout 3270 INFO
>>> > SettingsFactory    - Statistics: disabled 3271 INFO  SettingsFactory  
>>> -
>>> > Deleted entity synthetic identifier rollback: disabled 3272 INFO
>>> > SettingsFactory    - Default entity-mode: pojo 3273 INFO
>>> SettingsFactory
>>> > - Named query checking : enabled 3340 INFO  SessionFactoryImpl -
>>> building
>>> > session factory 3791 INFO  SessionFactoryObjectFactory - Not binding
>>> > factory
>>> > to JNDI, no JNDI name configured 3799 INFO  SchemaExport       -
>>> Running
>>> > hbm2ddl schema export 3800 INFO  SchemaExport       - exporting
>>> generated
>>> > schema to database 3821 INFO  SchemaExport       - schema export
>>> complete
>>> > 3828 INFO  UpdateTimestampsCache - starting update timestamps cache at
>>> > region: org.hibernate.cache.UpdateTimestampsCache 3830 WARN
>>> > EhCacheProvider
>>> > - Could not find a specific ehcache configuration for cache named
>>> > [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 3834 INFO
>>> > StandardQueryCache - starting query cache at region:
>>> > org.hibernate.cache.StandardQueryCache 3835 WARN  EhCacheProvider    -
>>> > Could
>>> > not find a specific ehcache configuration for cache named
>>> > [org.hibernate.cache.StandardQueryCache]; using defaults. 4145 INFO
>>> > DefaultSingletonBeanRegistry - Destroying singletons in
>>> >
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory@21cc506
>>> > 9: defining beans
>>> >
>>> [org.springframework.context.annotation.internalPersistenceAnnotationProcess
>>> >
>>> or,org.springframework.context.annotation.internalCommonAnnotationProcessor,
>>> >
>>> org.springframework.context.annotation.internalAutowiredAnnotationProcessor,
>>> >
>>> org.springframework.context.annotation.internalRequiredAnnotationProcessor,f
>>> >
>>> irmAccessFactory,crmRepository,firmRepository,activityManager,clientManager,
>>> >
>>> documentManager,employeeManager,engagementManager,entitlementManager,eventMa
>>> >
>>> nager,firmManager,offeringManager,sessionManager,hsqldbDataSource,sessionFac
>>> >
>>> tory,auditInterceptor,hibernateInterceptorFlushEager,hibernateInterceptorFlu
>>> >
>>> shNever,errorHandlingAdvice,org.springframework.aop.config.internalAutoProxy
>>> >
>>> Creator,businessService,readOnlyBusinessService,updatingBusinessService,mess
>>> >
>>> ageConsumer,org.springframework.aop.support.DefaultBeanFactoryPointcutAdviso
>>> >
>>> r#0,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,org.
>>> >
>>> springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2,org.springfr
>>> >
>>> amework.aop.support.DefaultBeanFactoryPointcutAdvisor#3,org.springframework.
>>> >
>>> aop.support.DefaultBeanFactoryPointcutAdvisor#4,repository,org.springframewo
>>> >
>>> rk.aop.support.DefaultBeanFactoryPointcutAdvisor#5,org.springframework.aop.s
>>> > upport.DefaultBeanFactoryPointcutAdvisor#6]; root of factory hierarchy
>>> > 4154
>>> > INFO  AbstractSessionFactoryBean - Closing Hibernate SessionFactory
>>> 4154
>>> > INFO  SessionFactoryImpl - closing 4155 INFO  SchemaExport       -
>>> Running
>>> > hbm2ddl schema export 4155 INFO  SchemaExport       - exporting
>>> generated
>>> > schema to database 4161 INFO  SchemaExport       - schema export
>>> complete
>>> > 4164 ERROR TestContextManager - Caught exception while allowing
>>> > TestExecutionListener
>>> >
>>> [org.springframework.test.context.support.DependencyInjectionTestExecutionLi
>>> > stener@262f4813] to prepare test instance
>>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>>> > java.lang.IllegalStateException: Failed to load ApplicationContext  
>>> at
>>> >
>>> org.springframework.test.context.TestContext.getApplicationContext(TestConte
>>> > xt.java:201)    at
>>> >
>>> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
>>> >
>>> tener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
>>> > at
>>> >
>>> org.springframework.test.context.support.DependencyInjectionTestExecutionLis
>>> >
>>> tener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
>>> > at
>>> >
>>> org.springframework.test.context.TestContextManager.prepareTestInstance(Test
>>> > ContextManager.java:255)    at
>>> >
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(S
>>> > pringJUnit4ClassRunner.java:111)    at
>>> >
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
>>> > thod(SpringJUnit4ClassRunner.java:148)    at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
>>> > va:59)    at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
>>> > )    at
>>> >
>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
>>> > at
>>> >
>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
>>> > at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
>>> > at
>>> >
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
>>> > nit4ClassRunner.java:97)    at
>>> >
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
>>> > erence.java:45)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
>>> > 8)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>>> > nner.java:460)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>>> > nner.java:673)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
>>> > java:386)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
>>> > .java:196) Caused by:
>>> > org.springframework.beans.factory.BeanCreationException: Error
>>> creating
>>> > bean
>>> > with name 'firmRepository' defined in file
>>> >
>>> [/Users/jef/p4/ACS/maindev/source/acs-core/target/classes/com/intuit/service
>>> > s/acs/repository/impl/FirmRepositoryImpl.class]: Invocation of init
>>> method
>>> > failed; nested exception is java.lang.IllegalArgumentException:
>>> > 'sessionFactory' or 'hibernateTemplate' is required    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1338)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > .doCreateBean(AbstractAutowireCapableBeanFactory.java:473)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > $1.run(AbstractAutowireCapableBeanFactory.java:409)    at
>>> > java.security.AccessController.doPrivileged(Native Method)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > .createBean(AbstractAutowireCapableBeanFactory.java:380)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
>>> > stractBeanFactory.java:264)    at
>>> >
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
>>> > ngleton(DefaultSingletonBeanRegistry.java:222)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
>>> > ractBeanFactory.java:261)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
>>> > ctBeanFactory.java:185)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
>>> > ctBeanFactory.java:164)    at
>>> >
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
>>> > antiateSingletons(DefaultListableBeanFactory.java:429)    at
>>> >
>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
>>> > toryInitialization(AbstractApplicationContext.java:728)    at
>>> >
>>> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
>>> > actApplicationContext.java:380)    at
>>> >
>>> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
>>> > ntext(AbstractGenericContextLoader.java:84)    at
>>> >
>>> org.springframework.test.context.support.AbstractGenericContextLoader.loadCo
>>> > ntext(AbstractGenericContextLoader.java:42)    at
>>> >
>>> org.springframework.test.context.TestContext.loadApplicationContext(TestCont
>>> > ext.java:173)    at
>>> >
>>> org.springframework.test.context.TestContext.getApplicationContext(TestConte
>>> > xt.java:197)    ... 17 more Caused by:
>>> java.lang.IllegalArgumentException:
>>> > 'sessionFactory' or 'hibernateTemplate' is required    at
>>> >
>>> org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfi
>>> > g(HibernateDaoSupport.java:117)    at
>>> >
>>> org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.jav
>>> > a:44)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)    at
>>> >
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
>>> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1335)    ...
>>> 33
>>> > more
>>> > java.lang.NoSuchMethodError:
>>> >
>>> org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc
>>> > ription;Ljava/lang/Throwable;)V    at
>>> >
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMe
>>> > thod(SpringJUnit4ClassRunner.java:155)    at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.ja
>>> > va:59)    at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52
>>> > )    at
>>> >
>>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
>>> > at
>>> >
>>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
>>> > at
>>> >
>>> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
>>> > at
>>> >
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJU
>>> > nit4ClassRunner.java:97)    at
>>> >
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
>>> > erence.java:45)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
>>> > 8)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>>> > nner.java:460)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
>>> > nner.java:673)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
>>> > java:386)    at
>>> >
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
>>> > .java:196)
>>> >
>>> >
>>>
> ------------------------------------------------------------------------------
>>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> > 30-Day
>>> > trial. Simplify your report design, integration and deployment - and
>>> focus
>>> > on
>>> > what you do best, core application coding. Discover what's new with
>>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> > _______________________________________________
>>> > Fornax-developer mailing list
>>> > Fornax-developer@...
>>> > https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>> >
>>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
>> 29s17564p25426739.html
>> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Fornax-developer mailing list
>> Fornax-developer@...
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@...
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25437063.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

txManager is normally generated in EntityManagerFactory-test.xml, which is imported by applicationContext-test.xml

Please verify EntityManagerFactory-test.xml.

What version of sculptor and configuration are you using?

/Patrik




Jef Pfeiffer wrote:
When I take the flag out I get a different problem.

Specifically:

4376 WARN  TestContextManager - Caught exception while allowing
TestExecutionListener
[org.springframework.test.context.transaction.TransactionalTestExecutionList
ener@7fc4a2d3] to process 'before' execution of test method [public void
com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
throws java.lang.Exception] for test instance
[null(com.intuit.services.acs.service.api.FirmManagerTest)]
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'txManager' is defined

Any ideas?

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse I’m using 1.6.0

I have no EntityManagerFactory-text.xml.  
Nor does my applicationContext-test.xml refer to one.

ApplicationContext-test is (trimmed):

<beans>    <context:annotation-config/>    <context:component-scan base-package="com.intuit.services"/>    <import resource="classpath:/SessionFactory-test.xml"/>    <import resource="classpath:/Interceptor-test.xml"/>    <import resource="classpath:/more-test.xml"/> </beans>

Sculptor generator properties:
deployment.type=ear deployment.applicationServer=JBoss db.product=oracle generate.jpa.annotation=false #generate.repository.hibernateSupport=true - bug report accepted 9/14 generate.gapClass=true generate.serviceContext=false project.nature=business-tier db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob hibernateType.Blobl=blob framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApplicationException framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.ACSAccessBaseWithException package.serviceInterface=service.api package.serviceImplementation=service.impl package.serviceProxy=service.proxy package.exception=domain.api.exception package.repositoryInterface=repository.api package.repositoryImplementation=repository.impl package.accessInterface=repository.access.api package.accessImplementation=repository.access.impl package.domain=domain.impl

Starting from scratch (deleting everything but src/main/resource) I get the same issue (no EntityManagerFactory-test.xml).

Can you reply with the bean definition I need?

On 9/14/09 11:41 AM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



txManager is normally generated in EntityManagerFactory-test.xml, which is
imported by applicationContext-test.xml

Please verify EntityManagerFactory-test.xml.

What version of sculptor and configuration are you using?

/Patrik





Jef Pfeiffer wrote:
>
> When I take the flag out I get a different problem.
>
> Specifically:
>
> 4376 WARN  TestContextManager - Caught exception while allowing
> TestExecutionListener
> [org.springframework.test.context.transaction.TransactionalTestExecutionList
> ener@7fc4a2d3] to process 'before' execution of test method [public void
> com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
> throws java.lang.Exception] for test instance
> [null(com.intuit.services.acs.service.api.FirmManagerTest)]
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> named 'txManager' is defined
>
> Any ideas?
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25439226.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, then I know what is wrong. You are using a combination that is not supported
generate.jpa.annotation=false
generate.test.annotation=true (by default)

This will cause the junit test classes to extend AbstractDbUnitJpaTests, which requires other things.

JPA, Spring annotations and JUnit annotations are new default features in Sculptor 1.6.0. If you still want to use the old style you need to add these properties:
generate.jpa.annotation=false
generate.spring.annotation=false
generate.test.annotation=false

With this configuration the junit tests will extend IsolatedDatabaseTestCase.

I don't think generate.spring.annotation=false has anything to do with this issue, and it might be possible to use spring annotations = true in combination with jpa and test = false, but that is an area that is not well tested.

/Patrik



Jef Pfeiffer wrote:
I¹m using 1.6.0

I have no EntityManagerFactory-text.xml.
Nor does my applicationContext-test.xml refer to one.

ApplicationContext-test is (trimmed):

<beans>    <context:annotation-config/>    <context:component-scan
base-package="com.intuit.services"/>    <import
resource="classpath:/SessionFactory-test.xml"/>    <import
resource="classpath:/Interceptor-test.xml"/>    <import
resource="classpath:/more-test.xml"/> </beans>

Sculptor generator properties:
deployment.type=ear deployment.applicationServer=JBoss db.product=oracle
generate.jpa.annotation=false #generate.repository.hibernateSupport=true -
bug report accepted 9/14 generate.gapClass=true
generate.serviceContext=false project.nature=business-tier
db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
hibernateType.Blobl=blob
framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
licationException
framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
SAccessBaseWithException package.serviceInterface=service.api
package.serviceImplementation=service.impl
package.serviceProxy=service.proxy package.exception=domain.api.exception
package.repositoryInterface=repository.api
package.repositoryImplementation=repository.impl
package.accessInterface=repository.access.api
package.accessImplementation=repository.access.impl
package.domain=domain.impl

Starting from scratch (deleting everything but src/main/resource) I get the
same issue (no EntityManagerFactory-test.xml).

Can you reply with the bean definition I need?

On 9/14/09 11:41 AM, "Patrik Nordwall" <patrik.nordwall@gmail.com> wrote:

>
>
> txManager is normally generated in EntityManagerFactory-test.xml, which is
> imported by applicationContext-test.xml
>
> Please verify EntityManagerFactory-test.xml.
>
> What version of sculptor and configuration are you using?
>
> /Patrik
>
>
>
>
>
> Jef Pfeiffer wrote:
>> >
>> > When I take the flag out I get a different problem.
>> >
>> > Specifically:
>> >
>> > 4376 WARN  TestContextManager - Caught exception while allowing
>> > TestExecutionListener
>> >
>> [org.springframework.test.context.transaction.TransactionalTestExecutionList
>> > ener@7fc4a2d3] to process 'before' execution of test method [public void
>> > com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
>> > throws java.lang.Exception] for test instance
>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>> > named 'txManager' is defined
>> >
>> > Any ideas?
>> >
>> >
>
> --
> View this message in context:
> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
> 29s17564p25439226.html
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

CSC-406 is fixed in trunk. I think your original problem with HibernateDaoSupport will actually go away if you use
generate.jpa.annotation=false
generate.spring.annotation=false
generate.test.annotation=false

The dependency injection of sessionFactory is done in spring xml.

/Patrik


Ok, then I know what is wrong. You are using a combination that is not supported
generate.jpa.annotation=false
generate.test.annotation=true (by default)

This will cause the junit test classes to extend AbstractDbUnitJpaTests, which requires other things.

JPA, Spring annotations and JUnit annotations are new default features in Sculptor 1.6.0. If you still want to use the old style you need to add these properties:
generate.jpa.annotation=false
generate.spring.annotation=false
generate.test.annotation=false

With this configuration the junit tests will extend IsolatedDatabaseTestCase.

I don't think generate.spring.annotation=false has anything to do with this issue, and it might be possible to use spring annotations = true in combination with jpa and test = false, but that is an area that is not well tested.

/Patrik



Jef Pfeiffer wrote:
I¹m using 1.6.0

I have no EntityManagerFactory-text.xml.
Nor does my applicationContext-test.xml refer to one.

ApplicationContext-test is (trimmed):

<beans>    <context:annotation-config/>    <context:component-scan
base-package="com.intuit.services"/>    <import
resource="classpath:/SessionFactory-test.xml"/>    <import
resource="classpath:/Interceptor-test.xml"/>    <import
resource="classpath:/more-test.xml"/> </beans>

Sculptor generator properties:
deployment.type=ear deployment.applicationServer=JBoss db.product=oracle
generate.jpa.annotation=false #generate.repository.hibernateSupport=true -
bug report accepted 9/14 generate.gapClass=true
generate.serviceContext=false project.nature=business-tier
db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
hibernateType.Blobl=blob
framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
licationException
framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
SAccessBaseWithException package.serviceInterface=service.api
package.serviceImplementation=service.impl
package.serviceProxy=service.proxy package.exception=domain.api.exception
package.repositoryInterface=repository.api
package.repositoryImplementation=repository.impl
package.accessInterface=repository.access.api
package.accessImplementation=repository.access.impl
package.domain=domain.impl

Starting from scratch (deleting everything but src/main/resource) I get the
same issue (no EntityManagerFactory-test.xml).

Can you reply with the bean definition I need?

On 9/14/09 11:41 AM, "Patrik Nordwall" <patrik.nordwall@gmail.com> wrote:

>
>
> txManager is normally generated in EntityManagerFactory-test.xml, which is
> imported by applicationContext-test.xml
>
> Please verify EntityManagerFactory-test.xml.
>
> What version of sculptor and configuration are you using?
>
> /Patrik
>
>
>
>
>
> Jef Pfeiffer wrote:
>> >
>> > When I take the flag out I get a different problem.
>> >
>> > Specifically:
>> >
>> > 4376 WARN  TestContextManager - Caught exception while allowing
>> > TestExecutionListener
>> >
>> [org.springframework.test.context.transaction.TransactionalTestExecutionList
>> > ener@7fc4a2d3] to process 'before' execution of test method [public void
>> > com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
>> > throws java.lang.Exception] for test instance
>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>> > named 'txManager' is defined
>> >
>> > Any ideas?
>> >
>> >
>
> --
> View this message in context:
> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
> 29s17564p25439226.html
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer


Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse Thanks, Patick.

I flipped the flag for test.annotation to false and all is well.
I didn’t change the spring.annotation (and haven’t had any issues yet).


On 9/14/09 3:07 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



CSC-406 is fixed in trunk. I think your original problem with
HibernateDaoSupport will actually go away if you use
generate.jpa.annotation=false
generate.spring.annotation=false
generate.test.annotation=false

The dependency injection of sessionFactory is done in spring xml.

/Patrik


Patrik Nordwall wrote:
>
> Ok, then I know what is wrong. You are using a combination that is not
> supported
> generate.jpa.annotation=false
> generate.test.annotation=true (by default)
>
> This will cause the junit test classes to extend AbstractDbUnitJpaTests,
> which requires other things.
>
> JPA, Spring annotations and JUnit annotations are new default features in
> Sculptor 1.6.0. If you still want to use the old style you need to add
> these properties:
> generate.jpa.annotation=false
> generate.spring.annotation=false
> generate.test.annotation=false
>
> With this configuration the junit tests will extend
> IsolatedDatabaseTestCase.
>
> I don't think generate.spring.annotation=false has anything to do with
> this issue, and it might be possible to use spring annotations = true in
> combination with jpa and test = false, but that is an area that is not
> well tested.
>
> /Patrik
>
>
>
>
> Jef Pfeiffer wrote:
>>
>> I¹m using 1.6.0
>>
>> I have no EntityManagerFactory-text.xml.
>> Nor does my applicationContext-test.xml refer to one.
>>
>> ApplicationContext-test is (trimmed):
>>
>> <beans>    <context:annotation-config/>    <context:component-scan
>> base-package="com.intuit.services"/>    <import
>> resource="classpath:/SessionFactory-test.xml"/>    <import
>> resource="classpath:/Interceptor-test.xml"/>    <import
>> resource="classpath:/more-test.xml"/> </beans>
>>
>> Sculptor generator properties:
>> deployment.type=ear deployment.applicationServer=JBoss db.product=oracle
>> generate.jpa.annotation=false #generate.repository.hibernateSupport=true
>> -
>> bug report accepted 9/14 generate.gapClass=true
>> generate.serviceContext=false project.nature=business-tier
>> db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
>> hibernateType.Blobl=blob
>> framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
>> licationException
>> framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
>> SAccessBaseWithException package.serviceInterface=service.api
>> package.serviceImplementation=service.impl
>> package.serviceProxy=service.proxy package.exception=domain.api.exception
>> package.repositoryInterface=repository.api
>> package.repositoryImplementation=repository.impl
>> package.accessInterface=repository.access.api
>> package.accessImplementation=repository.access.impl
>> package.domain=domain.impl
>>
>> Starting from scratch (deleting everything but src/main/resource) I get
>> the
>> same issue (no EntityManagerFactory-test.xml).
>>
>> Can you reply with the bean definition I need?
>>
>> On 9/14/09 11:41 AM, "Patrik Nordwall" <patrik.nordwall@...> wrote:
>>
>>>
>>>
>>> txManager is normally generated in EntityManagerFactory-test.xml, which
>>> is
>>> imported by applicationContext-test.xml
>>>
>>> Please verify EntityManagerFactory-test.xml.
>>>
>>> What version of sculptor and configuration are you using?
>>>
>>> /Patrik
>>>
>>>
>>>
>>>
>>>
>>> Jef Pfeiffer wrote:
>>>> >
>>>> > When I take the flag out I get a different problem.
>>>> >
>>>> > Specifically:
>>>> >
>>>> > 4376 WARN  TestContextManager - Caught exception while allowing
>>>> > TestExecutionListener
>>>> >
>>>> [org.springframework.test.context.transaction.TransactionalTestExecutionList
>>>> > ener@7fc4a2d3] to process 'before' execution of test method [public
>>>> void
>>>> >
>>>> com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
>>>> > throws java.lang.Exception] for test instance
>>>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>>>> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>>>> bean
>>>> > named 'txManager' is defined
>>>> >
>>>> > Any ideas?
>>>> >
>>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
>>> 29s17564p25439226.html
>>> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Fornax-developer mailing list
>>> Fornax-developer@...
>>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Fornax-developer mailing list
>> Fornax-developer@...
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25442639.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse Just as an FYI, if you leave spring.annotations=true with test.annotation=false then your unit tests complain during teardown that the SQL connection is closed.

So you’re correct Patrick that the support configuration in only what you described below.


On 9/14/09 4:43 PM, "Jef Pfeiffer" <jef_pfeiffer@...> wrote:

Thanks, Patick.

I flipped the flag for test.annotation to false and all is well.
I didn’t change the spring.annotation (and haven’t had any issues yet).


On 9/14/09 3:07 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



CSC-406 is fixed in trunk. I think your original problem with
HibernateDaoSupport will actually go away if you use
generate.jpa.annotation=false
generate.spring.annotation=false
generate.test.annotation=false

The dependency injection of sessionFactory is done in spring xml.

/Patrik


Patrik Nordwall wrote:
>
> Ok, then I know what is wrong. You are using a combination that is not
> supported
> generate.jpa.annotation=false
> generate.test.annotation=true (by default)
>
> This will cause the junit test classes to extend AbstractDbUnitJpaTests,
> which requires other things.
>
> JPA, Spring annotations and JUnit annotations are new default features in
> Sculptor 1.6.0. If you still want to use the old style you need to add
> these properties:
> generate.jpa.annotation=false
> generate.spring.annotation=false
> generate.test.annotation=false
>
> With this configuration the junit tests will extend
> IsolatedDatabaseTestCase.
>
> I don't think generate.spring.annotation=false has anything to do with
> this issue, and it might be possible to use spring annotations = true in
> combination with jpa and test = false, but that is an area that is not
> well tested.
>
> /Patrik
>
>
>
>
> Jef Pfeiffer wrote:
>>
>> I¹m using 1.6.0
>>
>> I have no EntityManagerFactory-text.xml.
>> Nor does my applicationContext-test.xml refer to one.
>>
>> ApplicationContext-test is (trimmed):
>>
>> <beans>    <context:annotation-config/>    <context:component-scan
>> base-package="com.intuit.services"/>    <import
>> resource="classpath:/SessionFactory-test.xml"/>    <import
>> resource="classpath:/Interceptor-test.xml"/>    <import
>> resource="classpath:/more-test.xml"/> </beans>
>>
>> Sculptor generator properties:
>> deployment.type=ear deployment.applicationServer=JBoss db.product=oracle
>> generate.jpa.annotation=false #generate.repository.hibernateSupport=true
>> -
>> bug report accepted 9/14 generate.gapClass=true
>> generate.serviceContext=false project.nature=business-tier
>> db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
>> hibernateType.Blobl=blob
>> framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
>> licationException
>> framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
>> SAccessBaseWithException package.serviceInterface=service.api
>> package.serviceImplementation=service.impl
>> package.serviceProxy=service.proxy package.exception=domain.api.exception
>> package.repositoryInterface=repository.api
>> package.repositoryImplementation=repository.impl
>> package.accessInterface=repository.access.api
>> package.accessImplementation=repository.access.impl
>> package.domain=domain.impl
>>
>> Starting from scratch (deleting everything but src/main/resource) I get
>> the
>> same issue (no EntityManagerFactory-test.xml).
>>
>> Can you reply with the bean definition I need?
>>
>> On 9/14/09 11:41 AM, "Patrik Nordwall" <patrik.nordwall@...> wrote:
>>
>>>
>>>
>>> txManager is normally generated in EntityManagerFactory-test.xml, which
>>> is
>>> imported by applicationContext-test.xml
>>>
>>> Please verify EntityManagerFactory-test.xml.
>>>
>>> What version of sculptor and configuration are you using?
>>>
>>> /Patrik
>>>
>>>
>>>
>>>
>>>
>>> Jef Pfeiffer wrote:
>>>> >
>>>> > When I take the flag out I get a different problem.
>>>> >
>>>> > Specifically:
>>>> >
>>>> > 4376 WARN  TestContextManager - Caught exception while allowing
>>>> > TestExecutionListener
>>>> >
>>>> [org.springframework.test.context.transaction.TransactionalTestExecutionList
>>>> > ener@7fc4a2d3] to process 'before' execution of test method [public
>>>> void
>>>> >
>>>> com.intuit.services.acs.service.api.FirmManagerTest.testAddUpdateFirm()
>>>> > throws java.lang.Exception] for test instance
>>>> > [null(com.intuit.services.acs.service.api.FirmManagerTest)]
>>>> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>>>> bean
>>>> > named 'txManager' is defined
>>>> >
>>>> > Any ideas?
>>>> >
>>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp254174
>>> 29s17564p25439226.html
>>> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Fornax-developer mailing list
>>> Fornax-developer@...
>>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Fornax-developer mailing list
>> Fornax-developer@...
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25442639.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse On further exploration, it looks like even when the spring.annotation is set to false I get the SQL exception on teardown.

Any ideas?

java.sql.SQLException: Connection is closed.SQLException: Connection is closed.    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:174)    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:277)    at org.fornax.cartridges.sculptor.framework.util.db.DatabaseExport.getTables(DatabaseExport.java:110)    at org.fornax.cartridges.sculptor.framework.util.db.DropAllTablesOperation.execute(DropAllTablesOperation.java:40)    at org.dbunit.AbstractDatabaseTester.executeOperation(AbstractDatabaseTester.java:190)    at org.dbunit.AbstractDatabaseTester.onTearDown(AbstractDatabaseTester.java:109)    at org.dbunit.DatabaseTestCase.tearDown(DatabaseTestCase.java:169)    at org.fornax.cartridges.sculptor.framework.util.db.IsolatedDatabaseTestCase.tearDown(IsolatedDatabaseTestCase.java:89)    at junit.framework.TestCase.runBare(TestCase.java:140)    at junit.framework.TestResult$1.protect(TestResult.java:110)    at junit.framework.TestResult.runProtected(TestResult.java:128)    at junit.framework.TestResult.run(TestResult.java:113)    at junit.framework.TestCase.run(TestCase.java:124)    at junit.framework.TestSuite.runTest(TestSuite.java:232)    at junit.framework.TestSuite.run(TestSuite.java:227)    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Sculptor configs are...

project.nature=business-tier deployment.type=ear deployment.applicationServer=JBoss
generate.jpa.annotation=false generate.test.annotation=false generate.spring.annotation=false generate.gapClass=true generate.serviceContext=false
db.product=oracle db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob hibernateType.Blobl=blob
framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApplicationException framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.ACSAccessBaseWithException
package.serviceInterface=service.api package.serviceImplementation=service.impl package.serviceProxy=service.proxy package.exception=domain.api.exception package.repositoryInterface=repository.api package.repositoryImplementation=repository.impl package.accessInterface=repository.access.api package.accessImplementation=repository.access.impl package.domain=domain.impl

Thanks for any insight you can provide...

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That error has to do with the version of DBUnit.
Change to
                <dependency>
                        <groupId>dbunit</groupId>
                        <artifactId>dbunit</artifactId>
                        <version>2.1</version>
                        <scope>test</scope>
                </dependency>


/Patrik

Jef Pfeiffer wrote:
On further exploration, it looks like even when the spring.annotation is set
to false I get the SQL exception on teardown.

Any ideas?

java.sql.SQLException: Connection is closed.SQLException: Connection is
closed.     at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOp
en(PoolingDataSource.java:174)    at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepare
Statement(PoolingDataSource.java:277)    at
org.fornax.cartridges.sculptor.framework.util.db.DatabaseExport.getTables(Da
tabaseExport.java:110)    at
org.fornax.cartridges.sculptor.framework.util.db.DropAllTablesOperation.exec
ute(DropAllTablesOperation.java:40)    at
org.dbunit.AbstractDatabaseTester.executeOperation(AbstractDatabaseTester.ja
va:190)    at
org.dbunit.AbstractDatabaseTester.onTearDown(AbstractDatabaseTester.java:109
)    at org.dbunit.DatabaseTestCase.tearDown(DatabaseTestCase.java:169)
at
org.fornax.cartridges.sculptor.framework.util.db.IsolatedDatabaseTestCase.te
arDown(IsolatedDatabaseTestCase.java:89)    at
junit.framework.TestCase.runBare(TestCase.java:140)    at
junit.framework.TestResult$1.protect(TestResult.java:110)    at
junit.framework.TestResult.runProtected(TestResult.java:128)    at
junit.framework.TestResult.run(TestResult.java:113)    at
junit.framework.TestCase.run(TestCase.java:124)    at
junit.framework.TestSuite.runTest(TestSuite.java:232)    at
junit.framework.TestSuite.run(TestSuite.java:227)    at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81
)    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
erence.java:45)    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)

Sculptor configs are...

project.nature=business-tier deployment.type=ear
deployment.applicationServer=JBoss
generate.jpa.annotation=false generate.test.annotation=false
generate.spring.annotation=false generate.gapClass=true
generate.serviceContext=false
db.product=oracle db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
hibernateType.Blobl=blob
framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
licationException
framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
SAccessBaseWithException
package.serviceInterface=service.api
package.serviceImplementation=service.impl
package.serviceProxy=service.proxy package.exception=domain.api.exception
package.repositoryInterface=repository.api
package.repositoryImplementation=repository.impl
package.accessInterface=repository.access.api
package.accessImplementation=repository.access.impl
package.domain=domain.impl

Thanks for any insight you can provide...

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Question on error running unit tests in eclipse

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Question on error running unit tests in eclipse That was it.  Thanks, Patrik.


On 9/16/09 1:23 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



That error has to do with the version of DBUnit.
Change to
                <dependency>
                        <groupId>dbunit</groupId>
                        <artifactId>dbunit</artifactId>
                        <version>2.1</version>
                        <scope>test</scope>
                </dependency>


/Patrik


Jef Pfeiffer wrote:
>
> On further exploration, it looks like even when the spring.annotation is
> set
> to false I get the SQL exception on teardown.
>
> Any ideas?
>
> java.sql.SQLException: Connection is closed.SQLException: Connection is
> closed.     at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOp
> en(PoolingDataSource.java:174)    at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepare
> Statement(PoolingDataSource.java:277)    at
> org.fornax.cartridges.sculptor.framework.util.db.DatabaseExport.getTables(Da
> tabaseExport.java:110)    at
> org.fornax.cartridges.sculptor.framework.util.db.DropAllTablesOperation.exec
> ute(DropAllTablesOperation.java:40)    at
> org.dbunit.AbstractDatabaseTester.executeOperation(AbstractDatabaseTester.ja
> va:190)    at
> org.dbunit.AbstractDatabaseTester.onTearDown(AbstractDatabaseTester.java:109
> )    at org.dbunit.DatabaseTestCase.tearDown(DatabaseTestCase.java:169)
> at
> org.fornax.cartridges.sculptor.framework.util.db.IsolatedDatabaseTestCase.te
> arDown(IsolatedDatabaseTestCase.java:89)    at
> junit.framework.TestCase.runBare(TestCase.java:140)    at
> junit.framework.TestResult$1.protect(TestResult.java:110)    at
> junit.framework.TestResult.runProtected(TestResult.java:128)    at
> junit.framework.TestResult.run(TestResult.java:113)    at
> junit.framework.TestCase.run(TestCase.java:124)    at
> junit.framework.TestSuite.runTest(TestSuite.java:232)    at
> junit.framework.TestSuite.run(TestSuite.java:227)    at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81
> )    at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
> erence.java:45)    at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
> 8)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:460)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:673)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
> java:386)    at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
> .java:196)
>
> Sculptor configs are...
>
> project.nature=business-tier deployment.type=ear
> deployment.applicationServer=JBoss
> generate.jpa.annotation=false generate.test.annotation=false
> generate.spring.annotation=false generate.gapClass=true
> generate.serviceContext=false
> db.product=oracle db.oracle.type.Blob=BLOB javaType.Blob=java.sql.Blob
> hibernateType.Blobl=blob
> framework.applicationExceptionClass=com.intuit.services.acs.exception.ACSApp
> licationException
> framework.accessBaseWithExceptionClass=com.intuit.services.acs.accessimpl.AC
> SAccessBaseWithException
> package.serviceInterface=service.api
> package.serviceImplementation=service.impl
> package.serviceProxy=service.proxy package.exception=domain.api.exception
> package.repositoryInterface=repository.api
> package.repositoryImplementation=repository.impl
> package.accessInterface=repository.access.api
> package.accessImplementation=repository.access.impl
> package.domain=domain.impl
>
> Thanks for any insight you can provide...
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@...
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>
>

--
View this message in context: http://www.nabble.com/Question-on-error-running-unit-tests-in-eclipse-tp25417429s17564p25477822.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer