ok, thanks.

But the, two questions:
1. What about my PersonDaoTest.java? Why is it complaining about the missing
personManager bean?
2. What is special about "classpath:**/applicationContext*.xml", in the
PersonDaoTest's getConfigLocations method?


Matt Raible-3 wrote:
> 
> When packaging a context file in a JAR, the best way to refer to it is:
> 
> classpath*:/filenamewithnowildcards.xml
> 
> So "classpath*:/applicationContext.xml" should work.
> 
> Matt
> 
> On 2/20/07, viggo <[EMAIL PROTECTED]> wrote:
>>
>> I just wondered what the syntax is when referering to files on the
>> classpath
>> the way you do in web.xml and PersonDaoTest.java:
>>
>> My web.xml:
>>     <context-param>
>>         <param-name>contextConfigLocation</param-name>
>>         <param-value>
>>             classpath*:/applicationContext-resources.xml
>>             classpath*:/applicationContext-dao.xml
>>             classpath*:/applicationContext-service.xml
>>             /WEB-INF/applicationContext*.xml
>>             /WEB-INF/security.xml
>>         </param-value>
>>     </context-param>
>>
>> My PersonDaoTest:
>>    protected String[] getConfigLocations() {
>>       setAutowireMode(AUTOWIRE_BY_NAME);
>>       return new String[] {
>>               "classpath*:/applicationContext-dao.xml",
>>               "classpath*:/applicationContext-resources.xml",
>>               "classpath:**/applicationContext*.xml",
>>               "classpath*:/applicationContext.xml"
>>           };
>>   }
>>
>>
>>
>> The reason I ask is that I get the following error when running mvn
>> integration-test from the core module:
>>  T E S T S
>> -------------------------------------------------------
>> Running PersonManagerTest
>> testing getPerson
>> testing getPersons
>> testing getByLastName
>> testing savePerson
>> testing removePerson
>> Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.079 sec
>> Running CoreTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
>> Running com.xpoints.dao.PersonDaoTest
>> [xpoints] INFO [main] PersonDaoTest.loadContextLocations(180) | Loading
>> context for:
>> classpath*:/applicationContext-dao.xml,classpath*:/applicationContext-resources.xml,classpath:**/applicationContext*.xml,classpath*:/applicationContext.xml
>> [xpoints] INFO [main] PersonDaoTest.loadContextLocations(180) | Loading
>> context for:
>> classpath*:/applicationContext-dao.xml,classpath*:/applicationContext-resources.xml,classpath:**/applicationContext*.xml,classpath*:/applicationContext.xml
>> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.93 sec
>> <<<
>> FAILURE!
>>
>> Results :
>> Tests run: 8, Failures: 0, Errors: 2, Skipped: 0
>>
>> and when I look into the surefire report file:
>> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.929 sec
>> <<< FAILURE!
>> testFindPersonByLastName(com.xpoints.dao.PersonDaoTest)  Time elapsed:
>> 0.702
>> sec  <<< ERROR!
>> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>> find
>> class [com.xpoints.service.impl.GenericManagerImpl] for bean with name
>> 'personManager' defined in URL
>> [file:/home/viggo/workspace/xpoints-trunk/xpoints-core/target/classes/applicationContext.xml];
>> nested exception is java.lang.ClassNotFoundException:
>> com.xpoints.service.impl.GenericManagerImpl
>> Caused by: java.lang.ClassNotFoundException:
>> com.xpoints.service.impl.GenericManagerImpl
>>
>>
>> I'm by the way running a modular-spring project m4-SNAPSHOT
>> --
>> View this message in context:
>> http://www.nabble.com/Syntax-when-referencing-resources-on-the-classpath-tf3261942s2369.html#a9066089
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Syntax-when-referencing-resources-on-the-classpath-tf3261942s2369.html#a9067019
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to