Note that there are some explanatory texts on larger screens.

plurals
  1. PONo public execute() in class mydomain error
    text
    copied!<p>I want to use <code>Hibernate Tools</code> for reverse engineering.</p> <p>My database is <code>PostgreSQL</code>. Problem is about <code>hbm.xml</code> file. Reverse engineering tool creating wrong <code>hbm.xml</code> files. So, I want to use <code>custom reverse engineering strategy.</code> I am using <code>Java.</code></p> <p><code>CustomReverseEngineeringStrategy</code> class is here:</p> <pre><code> public class CustomReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy{ public CustomReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) { super(delegate); } public CustomReverseEngineeringStrategy(){ super(new CustomReverseEngineeringStrategy()); } public Properties getTableIdentifierProperties(TableIdentifier arg0) { Properties pr = new Properties(); pr.put("sequence", "test_id_seq"); return pr; } public String getTableIdentifierStrategyName(TableIdentifier arg0) { return "sequence"; } } </code></pre> <p>[Edit]</p> <p>I Wrote <code>Ant</code> taskdef and I have an error.</p> <p>Here is my <code>build.xml</code> file :</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;!-- define the project --&gt; &lt;project name="sample_BookCatalog" default="build" basedir="."&gt; &lt;!-- define project properties --&gt; &lt;property name="compiler" value="modern" /&gt; &lt;property name="fork" value="no" /&gt; &lt;property name="verbose" value="no" /&gt; &lt;property name="debug" value="on" /&gt; &lt;property name="optimize" value="on" /&gt; &lt;property name="deprecation" value="on" /&gt; &lt;property name="target" value="1.5" /&gt; &lt;property name="source" value="1.5" /&gt; &lt;property file="build.properties" /&gt; &lt;property environment="env" /&gt; &lt;!-- define properties to refer to directories in the project --&gt; &lt;property name="webinf.dir" value="WEB-INF" /&gt; &lt;property name="webinf.lib.dir" value="WEB-INF/lib" /&gt; &lt;property name="lib.dir" value="lib" /&gt; &lt;property name="src.dir" value="src" /&gt; &lt;property name="test.dir" value="test" /&gt; &lt;property name="build.dir" value="build" /&gt; &lt;property name="webinf.classes.dir" value="${webinf.dir}/classes" /&gt; &lt;property name="webinf.classes.content.dir" value="${webinf.dir}/classes/content" /&gt; &lt;property name="web.xml" value="${webinf.dir}/web.xml" /&gt; &lt;fileset id="webapp.libs" dir="${webinf.lib.dir}"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;fileset id="libs" dir="${lib.dir}"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;path id="class.path"&gt; &lt;pathelement path="${webinf.classes.dir}" /&gt; &lt;fileset refid="webapp.libs" /&gt; &lt;fileset dir = "${webinf.lib.dir}" includes="**/*.jar"/&gt; &lt;fileset refid="libs" /&gt; &lt;/path&gt; &lt;pathconvert pathsep=":" property="class.path" refid="class.path" /&gt; &lt;fileset id="war.files" dir="."&gt; &lt;include name="${webinf.dir}/**" /&gt; &lt;exclude name="${webinf.dir}/Language-ext.properties" /&gt; &lt;include name="images/**" /&gt; &lt;include name="css/**" /&gt; &lt;include name="js/**" /&gt; &lt;exclude name="${web.xml}" /&gt; &lt;/fileset&gt; &lt;!-- compile target to compile the sources --&gt; &lt;target name="compile"&gt; &lt;mkdir dir="${webinf.classes.dir}" /&gt; &lt;!-- Content directory contains Liferay resource bundle--&gt; &lt;mkdir dir="${webinf.classes.content.dir}" /&gt; &lt;javac srcdir="${src.dir}:${test.dir}" destdir="${webinf.classes.dir}" fork="${fork}" verbose="${verbose}" deprecation="${deprecation}" debug="${debug}" optimize="${optimize}" compiler="${compiler}" target="${target}" source="${source}"&gt; &lt;classpath refid="class.path" /&gt; &lt;/javac&gt; &lt;copy todir="${webinf.classes.dir}" preservelastmodified="true"&gt; &lt;fileset dir="${src.dir}"&gt; &lt;include name="**/*.properties" /&gt; &lt;include name="**/*.xml" /&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;copy todir="${webinf.classes.content.dir}"&gt; &lt;fileset dir="${webinf.dir}"&gt; &lt;include name="Language-ext.properties" /&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;!-- &lt;taskdef name="mytask" classname="com.project.strategy.Reverse"/&gt; --&gt; &lt;property name="my.classes" value="${webinf.classes.dir}" /&gt; &lt;taskdef name="mytask" classpath="${my.classes}" classname="com.project.strategy.Reverse"/&gt; &lt;!-- target to create the project WAR file --&gt; &lt;target name="build" depends="clean,compile"&gt; &lt;mkdir dir="${build.dir}" /&gt; &lt;war destfile="${build.dir}/sample_BookCatalog.war" webxml="${web.xml}"&gt; &lt;fileset refid="war.files" /&gt; &lt;/war&gt; &lt;copy todir="${liferay.portal.home}/deploy"&gt; &lt;fileset dir="${build.dir}"&gt; &lt;include name="**/*.war" /&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;!-- target to clean up all files created by various tasks --&gt; &lt;target name="clean"&gt; &lt;delete quiet="true" includeemptydirs="true"&gt; &lt;fileset dir="${webinf.classes.dir}" includes="**/*" /&gt; &lt;fileset dir="${build.dir}" /&gt; &lt;fileset dir="${work.dir}" /&gt; &lt;/delete&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>Here is error :</p> <pre><code>No public execute() in class com.project.strategy.Reverse </code></pre> <p>Regards</p>
 

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