I found the problem. It had nothing to do with maven and everything to
do with the VM's incompetent error reporting. The problem was that the
DateLiteralBean class below linked to classes in jarA which linked to
classes in jarB. JarB was not in the classpath.
-----Original Message-----
From: Mike Perham
Sent: Saturday, September 24, 2005 11:07 AM
To: Maven Users List
Subject: [m2b1] tests not seeing classes?
I have a project which is compiling some Hibernate beans into
target/classes and then running an integration test with Derby to ensure
that the database creation and simple queries work, etc.
2750 [main] ERROR net.sf.hibernate.proxy.LazyInitializer - CGLIB
Enhancement failed
java.lang.NoClassDefFoundError:
com.webify.framework.triples.beans.DateLiteralBean
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
at java.lang.Class.getDeclaredMethod(Class.java:1262)
at
net.sf.cglib.proxy.Enhancer.getCallbacksSetter(Enhancer.java:558)
But when I look in target/classes, the classes are right where they are
expected.
Directory of ...\target\classes\com\webify\framework\triples\beans
09/23/2005 11:41 AM 1,208 DateLiteralBean.class
09/23/2005 11:41 AM 1,336 DateLiteralBean.hbm.xml
I suspect Maven2 is the problem only because this project compiles and
the tests pass perfectly when I use our current ant-based build system.
I tried -X to get more debugging but it didn't print out the test
classpath. Is there a way to see the surefire classpath when the tests
are run? Any advice on how to debug this issue would be appreciated.
mike
---------------------------------------------------------------------
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]