Any solutions to this problem?

 

I'm pretty sure I've updated correctly to the latest Appfuse.  Using Spring
MVC Basic with Hibernate and MySql.

To use an example, I have an AssociationDao that uses the generic dao
functionality, so all thats defined is in the applicationContext.xml:

 

<bean id="associationDao"
class="org.appfuse.dao.hibernate.GenericDaoHibernate">   

        <constructor-arg value="com.mycompany.myapp.model.Association"/>    

        <property name="sessionFactory" ref="sessionFactory"/>   

</bean>

 

My unit test class, AssociationDAOTest.java, then starts like this:

 

public class AssociationDAOTest extends BaseDaoTestCase {

      private GenericDao<Association, Long> associationDao = null;

      

      public void setAssociationDao(GenericDao<Association, Long>
associationDao){

            this.associationDao = associationDao;

      }

 

So far so simple.  Not doing anything odd, I've even tried commenting out
the body of my test methods.

 

When I run mvn test I then get the error as described in my first email.

 

The same happens with all my dao tests, be they customised or generic.

 

Any ideas?

 

Regards

Aled

 

From: Aled Jones [mailto:[EMAIL PROTECTED] 
Sent: 18 March 2008 16:37
To: users@appfuse.dev.java.net
Subject: Re: [appfuse-user] UnsatisfiedDependencyException

 

Yep this replicates my error.

Sorry I haven't had a chance to debug further yet.

Aled

On 18/03/2008, Martin Homik <[EMAIL PROTECTED]> wrote:


The day proceeded and I can provide more details.

1. I took the pom.xml as it is and ran 'mvn' clean and then 'mvn test' and
all DAO tests failed.
2. I changed the testResource directory to

   src/main/webapp/WEB-INF

and the DAO tests passed.
3. However, while the manager tests passed, too, the action tests failed.
4. I changed the testResource directory back to
   src/main/webapp
and the action tests pass.

Somehow strange ...




Martin Homik wrote:
>
> I ran into the same problem this morning. Yesterday evening, I have been
> working on a project without any problems except for the usual problems
> when you code new snippets. Today morning, I run the usual tests and all
> my DAO tests failed. I followed the proposed instructions in
>
>    http://issues.appfuse.org/browse/APF-998
>
> The change of the testResource directory to
>
>    src/main/webapp/WEB-INF
>
> resolved my problem. All DAO tests passed. However, the following proposed
> steps to run 'mvn -U' and to change the testResource directory back to
>
>    src/main/webapp/WEB-INF
>
> did not work for me after an 'mvn clean'. All DAO tests failed again.
> Unfortunately, I am not an expert, so I cannot explain the behaviour/error
> but confirm its sudden appearance.
>
> Martin
>
>
>
>
> Aled Rhys Jones wrote:
>>
>> Hi All
>>
>>
>>
>> I've finally managed to resolve some problems integrating nutch into my
>> application, but now all my DAO tests fail.  I don't think its related,
>> but
>> not sure.
>>
>>
>>
>> I had a look at the mailing list and noticed some similar problems, but
>> I'm
>> not sure if this issue has definitely been resolved.
>>
>> http://issues.appfuse.org/browse/APF-998 ?
>>
>>
>>
>> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
>> creating bean with name 'commycompany.myapp.dao.AssociationDAOTest':
>> Unsatisfied dependency expressed through bean property 'associationDao':
>> Set
>> this property value or disable dependency checking for this bean.
>>
>>
>>
>> I tried changing the testResources to include WEB-INF, but although
>> seemed
>> to work for the DAO's, the controllers then fail with the error:
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException: Could not
>> resolve bean definition resource pattern
>> [/WEB-INF/applicationContext*.xml];
>> nested exception is java.io.FileNotFoundException: ServletContext
>> resource
>> [/WEB-INF/] cannot be resolved to URL because it does not exist
>>
>>
>>
>>
>>
>> Any help would be greatly appreciated.
>>
>>
>>
>> Cheers
>>
>> Aled
>>
>>
>>
>
>

--

View this message in context:
http://www.nabble.com/UnsatisfiedDependencyException-tp15793588s2369p1612506
1.html

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