Thanks for your help, but I don't have a WEB-INF/lib folder. All the hibernate jars are located in shared/lib and my eclipse project links to them there. Are copies or multiple versions of a class disallowed by the Tomcat classloader? If not, what else could be causing the problem?
Thanks for your help, Rob -----Original Message----- From: Sergei Dubov [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 10:55 AM To: Tapestry users Subject: Re: Weird NoClassDefFoundError Classloading issues. You probably have the tapestry related jars (how about the same annotations jar?) in your WEB-INF/lib. I'd remove everything from shared/lib and keep the dependencies application specific. Serge Rob Dennett wrote: > I am getting a weird NoClassDefFoundError when I try to start my application. > The error is thrown when I call new AnnotationConfiguration(). The code > compiles and hibernate-annotations.jar is in [tomcat-home]/shared/lib. Any > ideas? Below is the relevant code (I think). > > > > Thanks for your help, > > Rob > > > > > >>From Home.java: > > > > public void pageBeginRender(PageEvent event) > > { > > System.out.println("ever here"); > > if (!getRequestCycle().isRewinding()) > > { > > BugReport br = new BugReport(); > > User u = new User(); > > u.setUserName("foo"); > > u.setPassword("bar"); > > br.setSubmitter(u); > > br.setAssignee(u); > > getUserDAO().save(u); > > getBugReportDAO().save(br); > > } > > System.out.println("ever here"); > > } > > > >>From userDAO.save(): > > > > public void save(Object o) > > { > > if (o != null) > > { > > getSession().saveOrUpdate(o); > > } > > } > > > >>From userDAO.getSession(): > > > > private Session getSession() > > { > > return sessionOwner.getSession(); > > } > > > > sessionOwner is injected by HiveMind. > > > >>From sessionOwnerImpl.java: > > > > public Session getSession() > > { > > if (session == null) > > { > > session = sessionCreator.getSession(); > > if (trans == null) > > { > > trans = > session.beginTransaction(); > > isToRollback = false; > > } > > } > > return session; > > } > > > > sessionCreator is injected by HiveMind. > > > >>From SessionCreatorImpl.java: > > > > public SessionCreatorImpl() > > { > > AnnotationConfiguration config = new > AnnotationConfiguration(); <-- the code blows up here > > config.configure(); > > factory = config.buildSessionFactory(); > > } > > > > The (partial) stack trace: > > > > * model.daos.SessionCreatorImpl.<init>(SessionCreatorImpl.java:14) > > * sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > * > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > * > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > * java.lang.reflect.Constructor.newInstance(Constructor.java:494) > > * java.lang.Class.newInstance0(Class.java:350) > > * java.lang.Class.newInstance(Class.java:303) > > * > org.apache.hivemind.util.InstanceCreationUtils.createInstance(InstanceCreationUtils.java:54) > > > * > org.apache.hivemind.impl.CreateClassServiceConstructor.constructCoreServiceImplementation(CreateClassServiceConstructor.java:35) > > > * > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:107) > > > * > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:157) > > > * > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139) > > > * > org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68) > > > * $SessionCreator_10afac322bc._service($SessionCreator_10afac322bc.java) > > * $SessionCreator_10afac322bc.getSession($SessionCreator_10afac322bc.java) > > * $SessionCreator_10afac322bb.getSession($SessionCreator_10afac322bb.java) > > * model.daos.SessionOwnerImpl.getSession(SessionOwnerImpl.java:23) > > * $SessionOwner_10afac322b9.getSession($SessionOwner_10afac322b9.java) > > * $SessionOwner_10afac322ba.getSession($SessionOwner_10afac322ba.java) > > * model.daos.GenericDAOImpl.getSession(GenericDAOImpl.java:36) > > * model.daos.GenericDAOImpl.save(GenericDAOImpl.java:119) > > * $GenericDAO_10afac32269.save($GenericDAO_10afac32269.java) > > * $GenericDAO_10afac32268.save($GenericDAO_10afac32268.java) > > * view.Home.pageBeginRender(Home.java:48) > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 5/1/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 5/1/2006 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]