My application builds and works fine in hosted mode, but I am having trouble getting my application to compile using Ant. Im using GWT with hibernate4gwt and JPA annotations, so my gwt xml inherits the following:
//I am using GXT also, these are to do with that
import com.extjs.gxt.ui.client.data.BeanModelMarker;
import com.extjs.gxt.ui.client.data.BeanModelMarker.BEAN;
@Entity
@Table(name="Contact")
public class Contact extends LazyPojo {
...
}
In my build.xml i have included the following in my class path:
Hi,
My application builds and works fine in hosted mode, but I am having trouble getting my application to compile using Ant. Im using GWT with hibernate4gwt and JPA annotations, so my gwt xml inherits the following:
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.extjs.gxt.ui.GXT'/>
<inherits name='net.sf.hibernate4gwt.Hibernate4Gwt15'/>
<inherits name='net.sf.hibernate4gwt.emul.java5.ejb3.Ejb3'/>
In my domain classes I have many JPA annotations e.g:
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import net.sf.hibernate4gwt.pojo.java5.LazyPojo;
//I am using GXT also, these are to do with that
import com.extjs.gxt.ui.client.data.BeanModelMarker;
import com.extjs.gxt.ui.client.data.BeanModelMarker.BEAN;
@Entity
@Table(name="Contact")
public class Contact extends LazyPojo {
...
}
In my build.xml i have included the following in my class path:
<path id="gwt.compile.class.path">
<pathelement path="./java" />
<pathelement path="./bin" />
<pathelement location="../BcfsCommon/lib/hibernate4gwt-1.1.2.jar" />
<pathelement location="../BcfsCommon/lib/gwt-user.jar" />
<pathelement location="../BcfsCommon/lib/gwt-dev-windows.jar" />
<pathelement location="../BcfsCommon/lib/gxt.jar" />
</path>
When i try to build, the gwt compiler complains that it cannot find the JPA annotations classes:
[echo]
[echo] GWT Compiling : com.<projectname>
[echo]
[java] Processing types in compilation unit: file:/C:/<projectname>/domain/Contact.java
[java] Found type 'Contact'
[java] Resolving annotation '@Entity'
[java] [ERROR]
[java] java.lang.ClassNotFoundException: javax.persistence.Entity
So I am thinking its a class path error, but I am not sure what I need to add in to make it build properly.
Can anyone help? Thanks
Chris