1 Reply Latest reply on Mar 10, 2008 6:09 AM by Sascha Hoffmann

    ORA-00904

    Sascha Hoffmann Newbie

      Hi

      I have a problem with my EntityBean but i don't know why. I hapoe somebody can help me.

      Ouput in the JBoss-Console

      10:43:14,296 WARN [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
      10:43:14,296 ERROR [JDBCExceptionReporter] ORA-00904: Ungültiger Spaltenname
      
      
      My EntityBean "LOV_User.java"
      
      package tcejb;
      
      import javax.persistence.*;
      
      @Entity
      @NamedQueries({
       @NamedQuery(name="LOV_USER.findByName",
       query="SELECT l FROM LOV_User l WHERE l.user = ?1 ")
      })
      @Table(name="LOV_USER")
      public class LOV_User implements java.io.Serializable {
      
       private static final long serialVersionUID = 1;
      
       private String user;
       private String user_name;
       private String user_password;
       private int admin_sign;
       private String status_sign;
       private String new_date;
       private String update_date;
       private String last_user;
      
       @Id
       @Column(name="LOV_USR_USER")
       public String getUser() {return user;}
       public void setUser(String user) {this.user = user;}
      
       @Column(name="LOV_USR_USER_NAME")
       public String getUserName() {return user_name;}
       public void setUserName(String user_name) {this.user_name = user_name;}
      
       @Column(name="LOV_USR_USER_PASSWORD")
       public String getUserPassword() {return user_password;}
       public void setUserPassword(String user_password) {this.user_password = user_password;}
      
       @Column(name="LOV_USR_ADMIN_SIGN")
       public int getAdminSign() {return admin_sign;}
       public void setAdminSign(int admin_sign) {this.admin_sign = admin_sign;}
      
       @Column(name="LOV_USR_STAUS_SIGN")
       public String getStatusSign() {return status_sign;}
       public void setStatusSign(String status_sign) {this.status_sign = status_sign;}
      
       @Column(name="LOV_USR_NEW_DATE")
       public String getNewDate() {return new_date;}
       public void setNewDate(String new_date) {this.new_date = new_date;}
      
       @Column(name="LOV_USR_UPDATE_DATE")
       public String getUpdateDate() {return update_date;}
       public void setUpdateDate(String update_date) {this.update_date = update_date;}
      
       @Column(name="LOV_USR_LAST_USER")
       public String getLastUser() {return last_user;}
       public void setLastUser(String last_user) {this.last_user = last_user;}
      }
      
      
      
      My StatefulBean
      
      package tcejb;
      
      import java.util.List;
      import java.util.Vector;
      import javax.ejb.*;
      import javax.persistence.*;
      
      @Stateful
      public class LoginBean implements LoginRemote {
       @PersistenceContext(unitName="tcdb")
       private EntityManager manager;
      
       private String user;
      
       @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
       public void initialisieren(String key) {
       Query query = manager.createNamedQuery("LOV_USER.findByName");
       query.setParameter(1, key);
       List liste = query.getResultList();
       Vector<LOV_User> erg = new Vector<LOV_User>();
       for(Object o : liste)
       {
       erg.add((LOV_User) o);
       }
       user = erg.toString();
       }
      
       @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
       public String getUser() {return user;}
      
       @Remove
       public void remove() {
      
       }
      
      }
      
      
      
      Please somebody get me a solution. I have no idea why the Column name is not ok. If i write the column-name from the database-table the same message pop up.