thank you! it seems to work now!
the tests are running!

bernd
On Jan 5, 2007, at 6:01 PM, Matt Raible wrote:

I would try chopping off the CN_ part of your classname and just using
AccountInformation instead.

Matt

On 1/5/07, cosmonate cosmo <[EMAIL PROTECTED]> wrote:
thank for the fast answers, tried all your suggestions and read the spring docu, but it doesn't help... should i disable depency checking or something like that i have no clue :-(

my set method looks like this:

public void setCN_AccountInformationDao (CN_AccountInformationDao dao) {
                this.dao = dao;
        }

my testget looks like this (here i seem to get the first error according to the error log!?)

        public void testGetCN_AccountInformation() throws Exception {
                cn_AccountInformation = new CN_AccountInformation();
cn_AccountInformation.setAccountNumber(new Long (1234));
                cn_AccountInformation.setBankCode(new Long(4321));
                cn_AccountInformation.setInstituteName("baca");

                dao.saveCN_AccountInformation(cn_AccountInformation);
                assertNotNull(cn_AccountInformation.getAccountID());

                cn_AccountInformation = dao.getCN_AccountInformation(
                        cn_AccountInformation.getAccountID());
assertEquals(cn_AccountInformation.getAccountNumber (), new Long(4321));
        }

the bean id has been renamed:

<!-- CN_AccountInformationDao: Hibernate implementation -->
<bean id="cN_AccountInformationDao" class="at.carenet.dao.hibernate.CN_AccountInformationDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

nothing works...
i think there are no errors in class/file naming or something like that...

again the error but i read the same message as before :-(

GrannySmith:~/Projects/carenet bernd$ ant test-dao - Dtestcase=CN_AccountInformationDao
Buildfile: build.xml

init:

prepare:
[echo] Preparing target directory '/Users/bernd/Projects/ carenet/build/carenet'

copy-resources:
     [echo] generating database.properties from build.properties
[propertyfile] Updating property file: /Users/bernd/Projects/ carenet/database.properties [copy] Copying 1 file to /Users/bernd/Projects/carenet/build/ web/classes

hibernatedoclet:
[hibernatedoclet] (XDocletMain.start 48 ) Running <hibernate/>

compile-dao:
     [echo] Compiling dao...

package-dao:
[copy] Copying 1 file to /Users/bernd/Projects/carenet/build/ dao/gen/META-INF [jar] Building jar: /Users/bernd/Projects/carenet/dist/ carenet-dao.jar

db-load:
   [dbunit] Executing operation: CLEAN_INSERT
[dbunit] on file: /Users/bernd/Projects/carenet/ metadata/sql/sample-data.xml
   [dbunit]           with format: xml

with-debug:

no-debug:

check-debug:

test-dao:
     [echo] Testing dao...
[junit] [carenet] INFO [main] CN_AccountInformationDaoTest.loadContextLocations(136) | Loading context for: classpath*:/**/dao/applicationContext- *.xml,classpath*:META-INF/applicationContext-*.xml
    [junit] Testsuite: at.carenet.dao.CN_AccountInformationDaoTest
[junit] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 7.291 sec

    [junit] ------------- Standard Output ---------------
[junit] [carenet] INFO [main] CN_AccountInformationDaoTest.loadContextLocations(136) | Loading context for: classpath*:/**/dao/applicationContext- *.xml,classpath*:META-INF/applicationContext-*.xml
    [junit] ------------- ---------------- ---------------
[junit] Testcase: testGetCN_AccountInformation (at.carenet.dao.CN_AccountInformationDaoTest): Caused an ERROR [junit] Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java: 923) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.populateBean(AbstractAutowireCapableBeanFactory.java:728) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.injectDependencies (AbstractDependencyInjectionSpringContextTests.java:179) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.prepareTestInstance (AbstractDependencyInjectionSpringContextTests.java:158) [junit] at org.springframework.test.AbstractSingleSpringContextTests.setUp (AbstractSingleSpringContextTests.java:76) [junit] at org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCase.java:69)


[junit] Testcase: testSaveCN_AccountInformation (at.carenet.dao.CN_AccountInformationDaoTest): Caused an ERROR [junit] Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java: 923) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.populateBean(AbstractAutowireCapableBeanFactory.java:728) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.injectDependencies (AbstractDependencyInjectionSpringContextTests.java:179) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.prepareTestInstance (AbstractDependencyInjectionSpringContextTests.java:158) [junit] at org.springframework.test.AbstractSingleSpringContextTests.setUp (AbstractSingleSpringContextTests.java:76) [junit] at org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCase.java:69)


[junit] Testcase: testAddAndRemoveCN_AccountInformation (at.carenet.dao.CN_AccountInformationDaoTest): Caused an ERROR [junit] Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency expressed through bean property 'CN_AccountInformationDao': Set this property value or disable dependency checking for this bean. [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java: 923) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.populateBean(AbstractAutowireCapableBeanFactory.java:728) [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.injectDependencies (AbstractDependencyInjectionSpringContextTests.java:179) [junit] at org.springframework.test.AbstractDependencyInjectionSpringContextTest s.prepareTestInstance (AbstractDependencyInjectionSpringContextTests.java:158) [junit] at org.springframework.test.AbstractSingleSpringContextTests.setUp (AbstractSingleSpringContextTests.java:76) [junit] at org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCase.java:69)


    [junit] Test at.carenet.dao.CN_AccountInformationDaoTest FAILED

BUILD FAILED
/Users/bernd/Projects/carenet/build.xml:269: The following error occurred while executing this line: /Users/bernd/Projects/carenet/build.xml:540: Unit tests failed. For error messages, check the log files in /Users/bernd/Projects/carenet/build/test/data or run "ant test-reports" to generate reports at /Users/bernd/Projects/ carenet/build/test/reports.

Total time: 17 seconds

thanks a lot for the help
bernd

-------- Original-Nachricht --------
Datum: Fri, 5 Jan 2007 16:40:33 +0100
Von: "Peter Schneider-Manzell" <[EMAIL PROTECTED]>
An: [email protected]
Betreff: AW: [appfuse-user] ant test-dao error

> I assume that the setter in your test is called "public void
> setCN_AccountInformationDao(...)".
>
> Spring uses autowiring for tests, in this case, spring detects a set
> method,
> cuts of the "set" part and makes the first letter lowercase.
> The resulting string is used to lookup for the required bean.
>
> In your case, Spring would search for a bean called
> "cN_AccountInformationDao"
>
> Solution: rename the bean in the context or rename the setter in the test
>
> For more information see the Spring Documentation,
> (http://www.springframework.org/docs/reference/beans.html#beans- factory-auto
> wire), autowiring byName
>
> Bye,
>
> Peter
>
> -----Ursprüngliche Nachricht-----
> Von: cosmonate cosmo [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 5. Januar 2007 16:00
> An: [email protected]
> Betreff: AW: [appfuse-user] ant test-dao error
>
> hmm... i did at the end of the file.
> looks like this:
>
>     <!-- Add new Daos here -->
>
> <!-- CN_AccountInformationDao: Hibernate implementation -->
>     <bean id="cn_AccountInformationDao"
> class="at.carenet.dao.hibernate.CN_AccountInformationDaoHibernate">
>         <property name="sessionFactory" ref="sessionFactory"/>
>     </bean>
> </beans>
>
> i did this according the turotial...
>
> greetz
> bernd
>
>
> -------- Original-Nachricht --------
> Datum: Fri, 5 Jan 2007 15:39:01 +0100
> Von: "Peter Schneider-Manzell" <[EMAIL PROTECTED]>
> An: [email protected]
> Betreff: AW: [appfuse-user] ant test-dao error
>
> > It seems that you dont have defined a bean named
> > "cN_AccountInformationDao"
> > in your applicationContext-hibernate.xml
> >
> > Bye,
> >
> > Peter
> >
> > -----Ursprüngliche Nachricht-----
> > Von: cosmonate cosmo [mailto:[EMAIL PROTECTED]
> > Gesendet: Freitag, 5. Januar 2007 15:35
> > An: [email protected]
> > Betreff: [appfuse-user] ant test-dao error
> >
> > Hi I'm new to appfuse trying to develop a project using the tutorial...
> >
> > now I'm implementing the tests and get the following error:
> >
> > i triple checked the xml values and have no clue what the error can be..
> > would be nice if anyone could help me a little bit out!
> >
> > GrannySmith:~/Projects/carenet bernd$ ant test-dao
> > -Dtestcase=CN_AccountInformationDao
> > Buildfile: build.xml
> >
> > init:
> >
> > prepare:
> >      [echo] Preparing target directory
> > '/Users/bernd/Projects/carenet/build/carenet'
> >
> > copy-resources:
> >      [copy] Copying 15 files to
> > /Users/bernd/Projects/carenet/build/web/classes
> > [native2ascii] Converting 2 files from
> > /Users/bernd/Projects/carenet/web/WEB-INF/classes to
> > /Users/bernd/Projects/carenet/build/web/classes
> > [native2ascii] Converting 5 files from
> > /Users/bernd/Projects/carenet/web/WEB-INF/classes to
> > /Users/bernd/Projects/carenet/build/web/classes
> >      [echo] generating database.properties from build.properties
> > [propertyfile] Updating property file:
> > /Users/bernd/Projects/carenet/database.properties
> >      [copy] Copying 1 file to
> > /Users/bernd/Projects/carenet/build/web/classes
> >
> > hibernatedoclet:
> > [hibernatedoclet] (XDocletMain.start 48 ) Running
> > <hibernate/>
> >
> > compile-dao:
> >      [echo] Compiling dao...
> >
> > package-dao:
> >      [copy] Copying 1 file to
> > /Users/bernd/Projects/carenet/build/dao/gen/META-INF
> >       [jar] Building jar:
> > /Users/bernd/Projects/carenet/dist/carenet-dao.jar
> >
> > db-load:
> >    [dbunit] Executing operation: CLEAN_INSERT
> >    [dbunit]           on   file:
> > /Users/bernd/Projects/carenet/metadata/sql/sample-data.xml
> >    [dbunit]           with format: xml
> >
> > with-debug:
> >
> > no-debug:
> >
> > check-debug:
> >
> > test-dao:
> >      [echo] Testing dao...
> > [mkdir] Created dir: /Users/bernd/Projects/carenet/build/ test/data
> >      [copy] Copying 1 file to
> > /Users/bernd/Projects/carenet/build/test/dao/classes
> >     [junit] [carenet] INFO [main]
> > CN_AccountInformationDaoTest.loadContextLocations(136) | Loading
> > context
> > for:
> > classpath*:/**/dao/applicationContext-*.xml,classpath*:META- INF/applic
> > ationC
> > ontext-*.xml
> > [junit] Testsuite: at.carenet.dao.CN_AccountInformationDaoTest > > [junit] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 9.182
> > sec
> >
> >     [junit] ------------- Standard Output ---------------
> >     [junit] [carenet] INFO [main]
> > CN_AccountInformationDaoTest.loadContextLocations(136) | Loading
> > context
> > for:
> > classpath*:/**/dao/applicationContext-*.xml,classpath*:META- INF/applic
> > ationC
> > ontext-*.xml
> >     [junit] ------------- ---------------- ---------------
> >     [junit] Testcase:
> >
> testGetCN_AccountInformation (at.carenet.dao.CN_AccountInformationDaoTest):
> > Caused an ERROR
> >     [junit] Error creating bean with name
> > 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency > > expressed through bean property 'CN_AccountInformationDao': Set this
> > property value or disable dependency checking for this bean.
> >     [junit]
> > org.springframework.beans.factory.UnsatisfiedDependencyException:
> > Error creating bean with name
> 'at.carenet.dao.CN_AccountInformationDaoTest':
> > Unsatisfied dependency expressed through bean property
> > 'CN_AccountInformationDao': Set this property value or disable
> > dependency checking for this bean.
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .checkDependencies(AbstractAutowireCapableBeanFactory.java:923)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .populateBean(AbstractAutowireCapableBeanFactory.java:728)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .injec
> > tDependencies (AbstractDependencyInjectionSpringContextTests.java:179)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .prepa
> > reTestInstance (AbstractDependencyInjectionSpringContextTests.java:158)
> >     [junit]     at
> > org.springframework.test.AbstractSingleSpringContextTests.setUp (Abstra
> > ctSing
> > leSpringContextTests.java:76)
> >     [junit]     at
> > org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCa
> > se.jav
> > a:69)
> >
> >
> >     [junit] Testcase:
> >
> testSaveCN_AccountInformation (at.carenet.dao.CN_AccountInformationDaoTest):
> > Caused an ERROR
> >     [junit] Error creating bean with name
> > 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency > > expressed through bean property 'CN_AccountInformationDao': Set this
> > property value or disable dependency checking for this bean.
> >     [junit]
> > org.springframework.beans.factory.UnsatisfiedDependencyException:
> > Error creating bean with name
> 'at.carenet.dao.CN_AccountInformationDaoTest':
> > Unsatisfied dependency expressed through bean property
> > 'CN_AccountInformationDao': Set this property value or disable
> > dependency checking for this bean.
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .checkDependencies(AbstractAutowireCapableBeanFactory.java:923)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .populateBean(AbstractAutowireCapableBeanFactory.java:728)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .injec
> > tDependencies (AbstractDependencyInjectionSpringContextTests.java:179)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .prepa
> > reTestInstance (AbstractDependencyInjectionSpringContextTests.java:158)
> >     [junit]     at
> > org.springframework.test.AbstractSingleSpringContextTests.setUp (Abstra
> > ctSing
> > leSpringContextTests.java:76)
> >     [junit]     at
> > org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCa
> > se.jav
> > a:69)
> >
> >
> >     [junit] Testcase:
> >
> testAddAndRemoveCN_AccountInformation (at.carenet.dao.CN_AccountInformationDa
> > oTest):       Caused an ERROR
> >     [junit] Error creating bean with name
> > 'at.carenet.dao.CN_AccountInformationDaoTest': Unsatisfied dependency > > expressed through bean property 'CN_AccountInformationDao': Set this
> > property value or disable dependency checking for this bean.
> >     [junit]
> > org.springframework.beans.factory.UnsatisfiedDependencyException:
> > Error creating bean with name
> 'at.carenet.dao.CN_AccountInformationDaoTest':
> > Unsatisfied dependency expressed through bean property
> > 'CN_AccountInformationDao': Set this property value or disable
> > dependency checking for this bean.
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .checkDependencies(AbstractAutowireCapableBeanFactory.java:923)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .populateBean(AbstractAutowireCapableBeanFactory.java:728)
> >     [junit]     at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean F
> > actory
> > .autowireBeanProperties (AbstractAutowireCapableBeanFactory.java:266)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .injec
> > tDependencies (AbstractDependencyInjectionSpringContextTests.java:179)
> >     [junit]     at
> > org.springframework.test.AbstractDependencyInjectionSpringContextTest s
> > .prepa
> > reTestInstance (AbstractDependencyInjectionSpringContextTests.java:158)
> >     [junit]     at
> > org.springframework.test.AbstractSingleSpringContextTests.setUp (Abstra
> > ctSing
> > leSpringContextTests.java:76)
> >     [junit]     at
> > org.springframework.test.ConditionalTestCase.runBare (ConditionalTestCa
> > se.jav
> > a:69)
> >
> >
> > [junit] Test at.carenet.dao.CN_AccountInformationDaoTest FAILED
> >
> > BUILD FAILED
> > /Users/bernd/Projects/carenet/build.xml:269: The following error
> > occurred while executing this line:
> > /Users/bernd/Projects/carenet/build.xml:540: Unit tests failed. For
> > error messages, check the log files in
> > /Users/bernd/Projects/carenet/build/test/data or run
> > "ant test-reports"
> >                 to generate reports at
> > /Users/bernd/Projects/carenet/build/test/reports.
> >
> > Total time: 25 seconds
> >
> > any help would nice
> >
> > thx
> > bernd
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to