使用DataNucleus + JPA在Hbase中保留带有集合的对象

时间:2016-05-03 13:23:55

标签: jpa hbase datanucleus

我正在使用DataNucleus和JPA来持久化Hbase中的对象。

我有2个班级

import javax.persistence.*;
import java.util.List;
import javax.persistence.Entity;

@Entity
@IdClass(ComposedIdKey.class)
@Table(name="bolha")
public class Customer_test2 {

    @Id
    @Column(name = "data:_firstName")
    public String firstName;

    @Id
    @Column(name = "data:_lastName")
    public String lastName;

    @Id
    @Column(name = "data:_dateOfBirth")
    public String dateOfBirth;

    @Basic
    @Lob
    @Column(name="data:Telephones")
    public List<TelephoneNumber> telephones;

    public Customer_test2() {
    }

public class TelephoneNumber implements Serializable  {

 public CharSequence phoneType;
 public CharSequence phone;


  public TelephoneNumber() {}

当我持久存在该对象时,会出现此错误:

Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: Failed 1 action: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: Column family bolha does not exist in region bolha,,1462285108381.a5453201be241f6601cfdb2714b802ea. in table 'bolha',

但该专栏存在。任何帮助

0 个答案:

没有答案