Q:

Composite PK with JPA in ORACLE gives ORA-00904 error

I have to map a composite PK with JPA in an Oracle DB.
I've followed other SO questions with relation to this tutorial but I'm still getting the following error:
java.sql.SQLSyntaxErrorException: ORA-00904: "COMPOSITEI0_"."NAME_1": Invalid Identifier (where NAME_1 relates to the name of one of the columns which are part of the PK)
This is my entity (real names not mentioned for data protection reasons):
  @Entity
@Table(schema = "SCHEMA", name = "TABLE")
public class CompositeIdEntity {

  @Column(name = "NAME1")
  private String name1;

  @Column(name = "NAME2")
  private String name2;

  @Column(name = "NAME3")
  private String name3;

  @EmbeddedId
  CompositePrimaryKeyTableEmbeddable id;

  public CompositePrimaryKeyTableEmbeddable getId() {

    return this.id;
  }

      public void setId(CompositePrimaryKeyTableEmbeddable id) {

        this.id = id;
      }

  // other getters and setters

My @Embeddable id class:
@Embeddable
public class CompositePrimaryKeyTableEmbeddable implements Serializable{

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

    @Column(name="name1")
    private String name1;

    @Column(name="name2")
    private String name2;

    public CompositePrimaryKeyTableEmbeddable() {
        super();
    }

    public CompositePrimaryKeyTableEmbeddable(String name1, String name2) {
        this.name1 = name1;
        this.name2 = name2;
    }

My @Repository:
 @Repository
public interface CompositeIdDao extends JpaRepository<CompositeIdEntity, CompositePrimaryKeyTableEmbeddable> {

}

And finally call to the DB, which only returns null because it's just a test to see if it all works together:
public CompositeIdEto saveCompositeId() {

    CompositeIdEntity compositeIdEto = new CompositeIdEntity();
    compositeIdEto.setname3("New");
    compositeIdEto.setId(new CompositePrimaryKeyTableEmbeddable("ERR", "ER"));

    this.compositeIdDao.save(compositeIdEto);

    return null;
  }

A:

It seems you are duplicating the name1 and name2 columns by declaring them once
in the entity itself and later in the embeddable.
You seem to only need the id embeddable and the name3 declaration in the entity:
   @Entity
   @Table(schema = "SCHEMA", name = "TABLE")
   public class CompositeIdEntity {

   @EmbeddedId
   CompositePrimaryKeyTableEmbeddable id;

   @Column(name = "NAME3")
   private String name3;

