You got to see it - http://www.burzs.com/edit/arg.php?id=39134
gerjan wrote: > > Hi, > > Is there a way to force mvn to rebuild everything from scratch? The > reason I'm asking is mvn jetty:run-war being unable to locate some > class, even though its source is verifiably available. > > If I try to do mvn clean; mvn jetty:run-war in a basic AppFuse Spring > MVC project, and when working on my friend's Windows system (appfuse > 2.0.1, maven 2.0.9, java 1.6.0), I run into this error: > > C:\dev\archiimmo>mvn clean > ... > [INFO] Deleting directory C:\dev\archiimmo\target > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESSFUL > ... > > C:\dev\archiimmo>mvn jetty:run-war -Djetty.port=18080 > ... > [INFO] Configuration XML file loaded: > C:\dev\archiimmo\src\main\resources\hibernate.cfg.xml > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Unable to load class declared as <mapping > class="com.larchitecte.model.Objet"/> in the configuration: > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > org.hibernate.MappingException: Unable to load class declared as > <mapping class="com.larchitecte.model.Objet"/> in the configuration: > ... > > The odd thing is, when running these commands in the same project on my > Linux box, I have no problems whatsoever. > > I started this project on the Windows system as no more than the basic > Spring MVC and Hibernate example from the Tutorial, plus a single POJO > (Objet) and appfuse:gen generated CRUD. > > I then moved the project source to my Linux system - without any trouble > - and added a simple servlet plus some JSP pages. After establishing > that things worked fine on my system, I did a mvn clean and sent the > entire project as a tarball to my friend. > > He simply replaced his project file in d:\dev\archiimmo with the archive > I sent him, but he's getting the above error message when he's trying to > run mvn jetty:run-war. > > I'm guessing that mvn is confused by an obsolete, compiled version of a > compiled Objet class file, as the mvn -X output shows that only the > newly added servlet gets compiled. But where could this obsolete class > be? By running mvn clean we removed the target folder from the project, > right? Or is it in the maven repository? > > Then again, the error message suggests that mvn can't locate the Objet > class at all. But why doesn't it just compile the source? (We have > verified it is there; in > src/main/java/com/larchitecte/archiimmo/model/Objet.java) > > So, I think we need to rebuild all, ignoring possibly cached classes. Is > it possible to tell mvn to do just that? > > Thanks, > > Ger-Jan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Rebuild-from-scratch--%28org.hibernate.MappingException%3A-Unable-to-load-class%29-tp17290447s2369p17305631.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]
