maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Mistroni" <mmistr...@gmail.com>
Subject Re: errors for hibernate test cases
Date Fri, 30 Nov 2007 22:40:26 GMT
Giovanni,
 could you please post stacktrace of exception? i had also problems with
hibernate and got everything
sorted out..
your hbm.xml files  should end up in src/main/resources in order to be
present in the classpath during
testing(they'll end up in target\classes)

regards
 marco

On Nov 30, 2007 10:17 PM, Giovanni Azua <bravegag@swissonline.ch> wrote:

> hi,
>
> I have a set of test cases that pass fine under Eclipse .. but from Maven
> I
> get java.lang.NoClassDefFoundError when running
> TestHibernateGenericReadOnlyDao and TestHibernateGenericDao (see below).
>
> My gut-feeling is that the auxiliary Fixture class Person (not a TestCase
> and not Test* pattern) is being filtered out by Maven during testing?
>
> Also can not tell from the logs that Person.hbm.xml is being picked up
> properly ... does it belong under /src/test/java/<my packages>.../ ? or
> under /src/test/resources/<my packages>.../ ?
>
> If interested the sources are available for checkout from:
> http://perfectjpattern.svn.sourceforge.net/svnroot/perfectjpattern/trunk/
>
> TIA,
> regards,
> Giovanni
>
> I have implemented a Generic Dao based on Hibernate and then included
> under
> my test package:
>
> trunk/
> - perfectjpattern-j2ee
> -- pom.xml
> -- src/
> --- test/
> ---- java/
> ----- perfectjpattern/
> ------ j2ee/
> ------- database/
> -------- dao/
> --------- hibernate/
> ---------- Person.java
> ---------- Person.hbm.xml
> ---------- TestHibernateGenericReadOnlyDao.java
> ---------- TestHibernateGenericDao.java
> ---- resources/
> ----- hibernate.cfg.xml
> ----- hsql.properties
> ----- hsql.script
> ----- log4j.xml
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message