Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't build tables with eclipse, ant and hibernate
    primarykey
    data
    text
    <p>I get this error when I try recreate tables in my database with hibernate.</p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: classes/com/golf/model/Pupil (wrong name: com/golf/model/Pupil) </code></pre> <p>The problem is, that when I recreate my tables before I execute ant, I can create the tables in database without any problem. But after I execute with ant the build.xml file, I get this error.</p> <p>My build.xml file is this:</p> <pre><code>&lt;project name="Golf" default="deploy" basedir="."&gt; &lt;property name="name" value="Golf"/&gt; &lt;property name="version" value="1.0"/&gt; &lt;property name="project" value="Golf"/&gt; &lt;property environment="env"/&gt; &lt;property name="build.compiler" value="classic"/&gt; &lt;property name="build.dir" value="../bin"/&gt; &lt;property name="build.src" value="${build.dir}/src"/&gt; &lt;property name="build.src.web" value="${build.dir}/src"/&gt; &lt;property name="build.dest" value="${build.dir}/classes"/&gt; &lt;property name="build.dest.web" value="${build.dir}/classes"/&gt; &lt;property name="build.web" value="${build.dir}/web"/&gt; &lt;property name="build.web-inf" value="${build.dir}/web/WEB-INF"/&gt; &lt;property name="src.java.dir" value="../src"/&gt; &lt;property name="web.src.java.dir" value="../src"/&gt; &lt;property name="lib.dir" value="../lib"/&gt; &lt;property name="compilelib.dir" value="../compile-lib"/&gt; &lt;property name="devetc.dir" value="../etc"/&gt; &lt;property name="web.dir" value="../web"/&gt; &lt;property name="deliver.class" value="${deliver.dir}/WEB-INF/classes"/&gt; &lt;property name="deliver.lib" value="${deliver.dir}/WEB-INF/lib"/&gt; &lt;property name="distribution.dir" value="../distribution"/&gt; &lt;property name="war.file.name" value="golf.war"/&gt; &lt;property name="year" value="2012"/&gt; &lt;property name="ant.home" value="."/&gt; &lt;property name="debug" value="on"/&gt; &lt;property name="optimize" value="off"/&gt; &lt;property name="deprecation" value="off"/&gt; &lt;target name="env"&gt; &lt;echo message="build.compiler = ${build.compiler}"/&gt; &lt;echo message="java.class.path = ${java.class.path}"/&gt; &lt;echo message="java.home = ${java.home}"/&gt; &lt;echo message="user.home = ${user.home}"/&gt; &lt;echo message="CATALINA.home = ${env.CATALINA_HOME}"/&gt; &lt;/target&gt; &lt;patternset id="all.src.files"&gt; &lt;!-- All java files --&gt; &lt;include name="**/*.java"/&gt; &lt;!-- All conf files --&gt; &lt;include name="**/*.xml"/&gt; &lt;include name="**/*.properties"/&gt; &lt;!-- All web files --&gt; &lt;include name="**/*.jpg"/&gt; &lt;include name="**/*.gif"/&gt; &lt;include name="**/*.js"/&gt; &lt;include name="**/*.jsp"/&gt; &lt;include name="**/*.html"/&gt; &lt;/patternset&gt; &lt;target name="prepare" depends="env"&gt; &lt;mkdir dir="${build.dir}"/&gt; &lt;mkdir dir="${build.dest}"/&gt; &lt;mkdir dir="${build.dest.web}"/&gt; &lt;mkdir dir="${build.src}"/&gt; &lt;mkdir dir="${build.web}"/&gt; &lt;mkdir dir="${build.web-inf}"/&gt; &lt;mkdir dir="${distribution.dir}"/&gt; &lt;mkdir dir="${web.src.java.dir}"/&gt; &lt;mkdir dir="${build.src.web}"/&gt; &lt;filter token="version" value="${version}"/&gt; &lt;copy todir="${build.src}" filtering="on"&gt; &lt;fileset dir="${src.java.dir}" &gt; &lt;patternset refid="all.src.files"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;copy todir="${build.web}"&gt; &lt;fileset dir="${web.dir}"&gt; &lt;include name="**/*.*"/&gt; &lt;exclude name="**/*.bak"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="compile" depends="prepare"&gt; &lt;javac srcdir="${build.src.web}" destdir="${build.dest.web}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}"&gt; &lt;exclude name="**/package.html"/&gt; &lt;exclude name="**/overview.html"/&gt; &lt;classpath&gt; &lt;path&gt; &lt;fileset dir="${lib.dir}"/&gt; &lt;fileset dir="${compilelib.dir}"/&gt; &lt;/path&gt; &lt;/classpath&gt; &lt;/javac&gt; &lt;copy todir="${build.web-inf}"&gt; &lt;fileset dir="${devetc.dir}"&gt; &lt;exclude name="**/*.bak"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;copy todir="${build.dest.web}"&gt; &lt;fileset dir="${web.src.java.dir}"&gt; &lt;include name="**/*.xml"/&gt; &lt;include name="**/*.properties"/&gt; &lt;exclude name="**/*.bak"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="deploy" depends="war"&gt; &lt;copy todir="${env.CATALINA_HOME}/webapps"&gt; &lt;fileset dir="${distribution.dir}"&gt; &lt;include name="*.war"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="war" depends="compile"&gt; &lt;war warfile="${distribution.dir}/${war.file.name}" webxml="${devetc.dir}/web.xml"&gt; &lt;fileset dir="${build.web}"&gt; &lt;exclude name="**/lib/*.*"/&gt; &lt;exclude name="**/classes/**/*.*"/&gt; &lt;exclude name="**/web.xml"/&gt; &lt;/fileset&gt; &lt;lib dir="${lib.dir}"/&gt; &lt;classes dir="${build.dest.web}"/&gt; &lt;/war&gt; &lt;/target&gt; &lt;target name="clean"&gt; &lt;delete dir="${build.dir}"/&gt; &lt;delete dir="${distribution.dir}"/&gt; &lt;mkdir dir="${build.dir}"/&gt; &lt;/target&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload