Solved!
I had a core/src/test/resources/applicationContext-resources.xml with a
SessionFactory bean definition, and somehow this was causing the problem,
but don't understand why.



2010/6/23 Josep García <jgar...@isigma.es>

> Jesus!
> I sort of reorganize folders, poms, etc but I am locked with an error in
> the packaging of the  core module!
>
> After:
> [INFO] [dbunit:operation {execution: default}]
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: ...
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
>
> Some tests break now, whereas they were working before. Notably all the DAO
> tests. Seems that there's a problem with Hibernate config but cannot see
> what it is!
> The entities are mapped in hibernate.cfg.xml, also in persistence.xml.
> Any pointers to solve this?
>
>
> Example of the exceptions thrown:
>
> -------------------------------------------------------------------------------
> Test set: es.isigma.firmaqui.dao.DocumentDaoTest
>
> -------------------------------------------------------------------------------
> Tests run: 5, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.267 sec
> <<< FAILURE!
> testSaveDocument(es.isigma.firmaqui.dao.DocumentDaoTest)  Time elapsed:
> 0.011 sec  <<< ERROR!
> org.springframework.orm.hibernate3.HibernateSystemException: Unknown
> entity: es.isigma.firmaqui.model.User; nested exception is
> org.hibernate.MappingException: Unknown entity:
> es.isigma.firmaqui.model.User
>     at
> org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:661)
>     at
> org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
>     at
> org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
>     at
> org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
>     at
> org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:522)
>     at
> org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:516)
>     at
> es.isigma.firmaqui.dao.hibernate.GenericDaoHibernate.get(GenericDaoHibernate.java:75)
>     at
> es.isigma.firmaqui.dao.DocumentDaoTest.createDocument(DocumentDaoTest.java:104)
>     at
> es.isigma.firmaqui.dao.DocumentDaoTest.testSaveDocument(DocumentDaoTest.java:39)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> Thanks,
> Josep
>
> 2010/6/22 Matt Raible <m...@raibledesigns.com>
>
> It shouldn't be too difficult if you know Maven well. Just move all your
>> services and DAOs into a "core" module and then create a pom.xml to go with
>> it that contains the dependencies used by those classes. Make it a JAR
>> project and add it as a dependency to your WAR project. Then create a parent
>> project of type "pom" and add the core and war projects as modules.
>>
>> On Jun 22, 2010, at 3:09 AM, Josep García wrote:
>>
>> > Is there any guide on how to convert a finished AppFuse app from
>> mono-module to multi-module?
>> >
>> > Josep
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
>> For additional commands, e-mail: users-h...@appfuse.dev.java.net
>>
>>
>

Reply via email to