org.hibernate.MappingException: Unable to load class declared as <mapping class= "org.bull.model.User"/> in the configuration:

AppFuse JIRA | dan | 6 years ago
  1. 0

    2.1.0-M1 still have the aspectj-maven-plugin,but 2.1.0-M2 didn't,so when execute "mvn site",the error below will product: [INFO] Unable to load class declared as <mapping class="org.bull.model.User"/> i n the configuration: [INFO] ------------------------------------------------------------------------ [INFO] Trace org.hibernate.MappingException: Unable to load class declared as <mapping class= "org.bull.model.User"/> in the configuration: at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat ionConfiguration.java:650) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav a:1589) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:1047) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:64) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:1035) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:64) at org.hibernate.cfg.Configuration.configure(Configuration.java:1477) at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfigu ration.java:1023) at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfigu ration.java:64) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.doConfiguration(AbstractComponentConfiguration.java:95) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.getConfiguration(AbstractComponentConfiguration.java:56) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:87) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:152) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy cle(DefaultLifecycleExecutor.java:1205) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def aultLifecycleExecutor.java:1038) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:663) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.ClassNotFoundException: org.bull.model.User at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL oader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:255) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:274) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader. java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123) at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat the detail steps list below: 1.mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0-M2 -DgroupId=org.bull -DartifactId=Bull 2. cd Bull mvn appfuse:full-source 3.mvn site

    AppFuse JIRA | 6 years ago | dan
    org.hibernate.MappingException: Unable to load class declared as <mapping class= "org.bull.model.User"/> in the configuration:
  2. 0

    2.1.0-M1 still have the aspectj-maven-plugin,but 2.1.0-M2 didn't,so when execute "mvn site",the error below will product: [INFO] Unable to load class declared as <mapping class="org.bull.model.User"/> i n the configuration: [INFO] ------------------------------------------------------------------------ [INFO] Trace org.hibernate.MappingException: Unable to load class declared as <mapping class= "org.bull.model.User"/> in the configuration: at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat ionConfiguration.java:650) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav a:1589) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:1047) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:64) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:1035) at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfi guration.java:64) at org.hibernate.cfg.Configuration.configure(Configuration.java:1477) at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfigu ration.java:1023) at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfigu ration.java:64) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.doConfiguration(AbstractComponentConfiguration.java:95) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.getConfiguration(AbstractComponentConfiguration.java:56) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:87) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:152) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy cle(DefaultLifecycleExecutor.java:1205) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def aultLifecycleExecutor.java:1038) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:663) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.ClassNotFoundException: org.bull.model.User at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL oader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:255) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:274) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader. java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123) at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat the detail steps list below: 1.mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0-M2 -DgroupId=org.bull -DartifactId=Bull 2. cd Bull mvn appfuse:full-source 3.mvn site

    AppFuse JIRA | 6 years ago | dan
    org.hibernate.MappingException: Unable to load class declared as <mapping class= "org.bull.model.User"/> in the configuration:
  3. 0

    GitHub comment 1#382651

    GitHub | 6 years ago | jeroenr
    java.lang.NoClassDefFoundError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    What is the easiest way to start tomcat in embedded mode from the cargo-maven2-plugin?

    Stack Overflow | 8 years ago | npellow
    java.lang.ClassNotFoundException: org.apache.catalina.Connector
  6. 0

    James Lorenzen's Blog: Automated Performance Tests using JMeter and Maven

    blogspot.com | 4 months ago
    jmeter.threads.JMeterThread: Test failed! org.apache.jmeter.protocol.http.parser.HTMLParseError

  1. andyglick 2 times, last 6 days ago
  2. richard77 1 times, last 1 week ago
  3. musketyr 2 times, last 1 week ago
  4. michallos 2 times, last 1 week ago
  5. batwalrus76 2 times, last 1 week ago
67 more registered users
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.bull.model.User

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    4 frames
  3. Plexus
    RealmClassLoader.loadClass
    1. org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
    2. org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
    3. org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
    4. org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
    4 frames
  4. Java RT
    Class.forName
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    2. java.lang.Class.forName0(Native Method)
    3. java.lang.Class.forName(Class.java:169)
    3 frames
  5. Hibernate
    ReflectHelper.classForName
    1. org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
    1 frame