2013-05-14 9 views
5

エラーを解決できない輸入エラー:開発モードでcom.google.appengine.api.datastoreのはJPA GAE GWT

[ERROR] [cbd] - Line 15: The import com.google.appengine.api.datastore cannot be resolved 

User.java

@Entity 
public class User implements Serializable { 

    private static final long serialVersionUID = 1L; 

    @Id 
    @Column(name="id") 
    @GeneratedValue(strategy = GenerationType.IDENTITY) 
    private Key id; 

    private String googleID; 

    private String firstName; 

    private String lastName; 

    private String password; 

    private String gender; 

    private String email; 


    @OneToOne(cascade=CascadeType.ALL) 
    @JoinColumn(name="key") 
    private AuthenticationToken token= AuthenticationToken(); 
    ......} 

AuthenticationToken.java

public class AuthenticationToken implements Serializable { 

    /** 
    * 
    */ 
    private static final long serialVersionUID = 1L; 

    @Id 
    @Column(name="key") 
    @GeneratedValue(strategy = GenerationType.IDENTITY) 
    private Key key; 

    private String email; 

    private String token; 

    private Date obtained; 

    private Date activity; 
    .....} 

persistence.xml

<?xml version="1.0" encoding="UTF-8" ?> 
<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
     http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> 

    <persistence-unit name="transactions-optional"> 


     <provider>org.datanucleus.api.jpa.PersistenceProviderImpl</provider> 

     <class>com.cbd.shared.entities.User</class> 

    <class>com.cbd.shared.entities.AuthenticationToken</class> 

    <exclude-unlisted-classes>true</exclude-unlisted-classes> 

     <properties> 
      <property name="datanucleus.NontransactionalRead" value="true"/> 
      <property name="datanucleus.NontransactionalWrite" value="true"/> 
      <property name="datanucleus.ConnectionURL" value="appengine"/> 
     </properties> 
    </persistence-unit> 
</persistence> 

私はGWTを使用していますが、サーバー側にエンティティを移動しようとしたのではなく、共有側パッケージが、同じエラー

+0

のようにjarがないため、クラスまたはpersistence.xmlの関連性が表示されません。あなたがCLASSPATHに持っているジャーを見せてもらえますか? – DataNucleus

答えて

3

は、エラーがゆえJPAライブラリのいくつかが明確に定義されていませんでしたeclipseDataNucleusプラグインを追加することではない.was発見しましたプロジェクトランタイム

関連する問題