1 Reply Latest reply on Sep 5, 2005 9:13 PM by Andrew Iggleden

    cannot find symbol primaryKey

    Andrew Iggleden Newbie

      I get the following when building my entity beans. I just cant seem to work this out.

      [javac] F:\workspace\JFr\src\com\meerkat\jfr\par\LineItem.java:55: cannot find symbol
      [javac] symbol : method primaryKey()
      [javac] location: @interface javax.persistence.Column
      [javac] @Column(name="ID", primaryKey=true, nullable=false)
      [javac] ^
      [javac] F:\workspace\JFr\src\com\meerkat\jfr\par\LineItem.java:146: incompatible types
      [javac] found : java.lang.String
      [javac] required: java.lang.Class
      [javac] @ManyToOne(targetEntity="com.meerkat.jfr.Transaction", fetch=EAGER)
      [javac] ^

      My build.xml is as follows :
      <?xml version="1.0"?>

      <!-- ======================================================================= -->
      <!-- JBoss build file -->
      <!-- ======================================================================= -->










      <!-- Build classpath -->




























      <!-- So that we can get jndi.properties for InitialContext -->





      <!-- =================================================================== -->
      <!-- Prepares the build directory -->
      <!-- =================================================================== -->





      <!-- =================================================================== -->
      <!-- Compiles the source code -->
      <!-- =================================================================== -->


























      <!--





      -->
      <!-- =================================================================== -->
      <!-- Cleans up generated stuff -->
      <!-- =================================================================== -->












      thanks

        • 1. Re: cannot find symbol primaryKey
          Andrew Iggleden Newbie

          Sorry about that

          <?xml version="1.0"?>
          
          <!-- ======================================================================= -->
          <!-- JBoss build file -->
          <!-- ======================================================================= -->
          
          <project name="Meerkat" default="ejbjar" basedir=".">
          
           <property environment="env"/>
           <property name="src.dir" value="${basedir}/src"/>
           <property name="jboss.home" value="${env.JBOSS_HOME}"/>
           <property name="build.dir" value="${basedir}/build"/>
           <property name="build.classes.dir" value="${build.dir}/classes"/>
           <property name="eclipse.home" value="F:/eclipse"/>
          
           <!-- Build classpath -->
           <path id="classpath">
           <fileset dir="${jboss.home}/lib">
           <include name="**/*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/server/all/lib">
           <include name="**/*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/server/all/deploy/ejb3.deployer">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/server/all/deploy/jboss-aop-jdk50.deployer">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/client">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/lib">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${jboss.home}/server/all/lib">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.0.M2/lib/j2ee-1.4">
           <include name="*.jar"/>
           </fileset>
           <fileset dir="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.aop.core_1.1.0.beta3">
           <include name="*.jar"/>
           </fileset>
          
          
           <pathelement location="${build.classes.dir}"/>
           <!-- So that we can get jndi.properties for InitialContext -->
           <pathelement location="${basedir}"/>
           </path>
          
           <property name="build.classpath" refid="classpath"/>
          
           <!-- =================================================================== -->
           <!-- Prepares the build directory -->
           <!-- =================================================================== -->
           <target name="prepare">
           <mkdir dir="${build.dir}"/>
           <mkdir dir="${build.classes.dir}"/>
           </target>
          
           <!-- =================================================================== -->
           <!-- Compiles the source code -->
           <!-- =================================================================== -->
           <target name="compile" depends="prepare">
           <javac srcdir="${src.dir}"
           destdir="${build.classes.dir}"
           debug="on"
           deprecation="on"
           optimize="off"
           includes="**">
           <classpath refid="classpath"/>
           </javac>
           </target>
          
           <target name="ejbjar" depends="compile">
           <jar jarfile="build/jfrentity.ejb3">
           <fileset dir="${build.classes.dir}/com/meerkat/jfr/par">
           <include name="**/*.class"/>
           </fileset>
           </jar>
           <copy file="build/jfrentity.ejb3" todir="${jboss.home}/server/all/deploy"/>
           </target>
          
           <target name="entity2xml" depends="prepare">
           <java fork="yes" failOnError="true" className="com.meerkat.jfr.par.EntityToHibernateXml">
           <classpath refid="classpath"/>
           <arg value="com.meerkat.jfr.par.Address"/>
           <arg value="com.meerkat.jfr.par.Customer"/>
           <arg value="com.meerkat.jfr.par.LineItem"/>
           <arg value="com.meerkat.jfr.par.Store"/>
           <arg value="com.meerkat.jfr.par.TenderItem"/>
           <arg value="com.meerkat.jfr.par.Transaction"/>
           </java>
           </target>
           <!--
           <target name="run" depends="ejbjar">
           <java classname="org.jboss.tutorial.entity.client.Client" fork="yes" dir=".">
           <classpath refid="classpath"/>
           </java>
           </target>
          -->
           <!-- =================================================================== -->
           <!-- Cleans up generated stuff -->
           <!-- =================================================================== -->
           <target name="clean.db">
           <delete dir="${jboss.home}/server/all/data/hypersonic"/>
           </target>
          
           <target name="clean">
           <delete dir="${build.dir}"/>
           <delete file="${jboss.home}/server/all/deploy/tutorial.ejb3"/>
           </target>
          
          
          </project>