Menu

ClassNotFoundException

Help
Anonymous
2003-04-09
2003-04-28
  • Anonymous

    Anonymous - 2003-04-09

    I'm getting the following errors when trying to connect. The class is definitely compiled and in the classpath specified in line 1 of the log.

    Any ideas?

    Adding Project Classpath file:/Developer/eclipse/workspace/qwiki/WEB-INF/classes
    Adding Mapping - /Users/rich/qwiki/java/com/othermedia/qwiki/model/QwikiPageVersion.hbm.xml
    java.lang.ClassNotFoundException: com.othermedia.qwiki.model.QwikiPageVersion
        at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:866)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:245)
        at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:65)
        at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:147)
        at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:924)
        at net.sf.hibernate.cfg.Configuration.add(Configuration.java:188)
        at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:145)
        at net.sf.hibernator.HibernateConnection.createConnection(HibernateConnection.java:99)
        at net.sf.hibernator.views.ConnectionView.connect(ConnectionView.java:185)
        at net.sf.hibernator.views.ConnectionView.access$4(ConnectionView.java:180)
        at net.sf.hibernator.views.ConnectionView$6.run(ConnectionView.java:164)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
        at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
        at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:989)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1911)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1623)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
        at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
        at org.eclipse.core.launcher.Main.run(Main.java:747)
        at org.eclipse.core.launcher.Main.main(Main.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
        at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
        at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    rethrown as net.sf.hibernate.MappingException: persistent class not found: com.othermedia.qwiki.model.QwikiPageVersion
        at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:68)
        at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:147)
        at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:924)
        at net.sf.hibernate.cfg.Configuration.add(Configuration.java:188)
        at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:145)
        at net.sf.hibernator.HibernateConnection.createConnection(HibernateConnection.java:99)
        at net.sf.hibernator.views.ConnectionView.connect(ConnectionView.java:185)
        at net.sf.hibernator.views.ConnectionView.access$4(ConnectionView.java:180)
        at net.sf.hibernator.views.ConnectionView$6.run(ConnectionView.java:164)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
        at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
        at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:989)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1911)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1623)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
        at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
        at org.eclipse.core.launcher.Main.run(Main.java:747)
        at org.eclipse.core.launcher.Main.main(Main.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
        at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
        at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    Caused by: java.lang.ClassNotFoundException: com.othermedia.qwiki.model.QwikiPageVersion
        at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:866)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:245)
        at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:65)
        ... 35 more
    rethrown as net.sf.hibernate.MappingException: persistent class not found: com.othermedia.qwiki.model.QwikiPageVersion
        at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:149)
        at net.sf.hibernator.HibernateConnection.createConnection(HibernateConnection.java:99)
        at net.sf.hibernator.views.ConnectionView.connect(ConnectionView.java:185)
        at net.sf.hibernator.views.ConnectionView.access$4(ConnectionView.java:180)
        at net.sf.hibernator.views.ConnectionView$6.run(ConnectionView.java:164)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
        at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
        at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:989)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1911)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1623)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
        at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
        at org.eclipse.core.launcher.Main.run(Main.java:747)
        at org.eclipse.core.launcher.Main.main(Main.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
        at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
        at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    Caused by: net.sf.hibernate.MappingException: persistent class not found: com.othermedia.qwiki.model.QwikiPageVersion
        at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:68)
        at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:147)
        at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:924)
        at net.sf.hibernate.cfg.Configuration.add(Configuration.java:188)
        at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:145)
        ... 31 more
    Caused by: java.lang.ClassNotFoundException: com.othermedia.qwiki.model.QwikiPageVersion
        at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:866)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:245)
        at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:65)
        ... 35 more

     
    • Daniel Bradby

      Daniel Bradby - 2003-04-10

      I have fixed a similar bug for Enum types that turned out to be a classloader issue.

      The fix is in CVS but I am waiting for any other features/bugs to make another release. I did however attach a hibernator.jar built from current CVS to the bug fix if you want to try it.

      https://sourceforge.net/tracker/index.php?func=detail&aid=713783&group_id=68344&atid=520899

      Let me know how you go.

       
    • Anonymous

      Anonymous - 2003-04-10

      Thanks! That new jar did the trick -- works perfectly now!

       
    • Darcy Schultz

      Darcy Schultz - 2003-04-22

      I'm experiencing the same problem and the new jar file does not work for me.  I'm using JDK1.4.1_02, Eclipse 2.1 and Hibernate 2.0 release candidate 1.

       
      • Darcy Schultz

        Darcy Schultz - 2003-04-22

        It appears as though its trying to find my classes in the wrong place.  The log states:

        Adding Project Classpath file:/C:/java/eclipse/current/eclipse/workspace/HibernateTest/classes

        but my project class path is c:/java/projects/HibernateTest/classes

        Once I put my classes where it was expecting them everything worked.  A bit awkward, but at least I can use the tool now.  Any suggestions?

         
    • Daniel Bradby

      Daniel Bradby - 2003-04-28

      Darcy,

      I'll look into your problem as I am adding support for dependant projects and jar references etc.

      Thanks for the feedback and look out for a release soon

      Daniel

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.