Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Problem generating metamodel

Just posting this as a separate thread.

When I am running Metamodel APT either through commandline or through
eclipse APT, I am getting following error. My entity access type is set to
"Field" explicitly, not sure why preprocessor is trying to introspect the
methods. Any light on this is aprreciated.

"Mapping metadata cannot be applied to properties/methods that take
arguments. The attribute [method addGroup] from class [class UserGroupList]
is in violation of this restriction. Ensure the method has no arguments if
it is mapped with annotations or in an XML mapping file."

I have class userGroupList which is an entity with access type set to
"Field" not "Property", not sure why is it trying to validate methods. I do
have method addGroup in that class but it is just a business method  that
EclipseLink need not worry.

For your reference, this is how I try to generate the metadata information
using Ant:
------------------------------------------------------
  <target name="generate-metamodel" >
        <property name="metaPackage" value="metamodel"/>
        <delete>
            <fileset dir="${project.dir}/src"  includes="**/*_.java"/>
        </delete>
       <echo message="generating MetaData "/>
       <javac   srcdir="${project.dir}/src" verbose="true"
            destdir="${project.dir}/src"
            classpathref="compile.class.path">
              <compilerarg line=" -processor
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor" />
              <compilerarg line=" -proc:only" compiler="javac1.6" />  
        </javac>

</target>
------------------------------------------------------


-gopal 
-- 
View this message in context: http://old.nabble.com/Problem-generating-metamodel-tp28283479p28283479.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top