java - Play Framework PersistenceException -


i'm trying use play framework (java) read data few oracle tables, use few complex queries later on. i'm following tutorial i'm having issues retrieving data.

my model class this:

    package models;      import java.util.arraylist;     import java.util.list;     import play.libs.f;     import javax.persistence.*;     import com.avaje.ebean.*;     import play.db.ebean.*;      @entity     @table(name="tablespace.cat_bonds")     public class cat_bond extends model {      @id     public string symbol;      public string database;      public string ticktype;      public string assetclass;      public string sourceplatform;      public string sourceexchange;      public static finder<string, cat_bond> find = new finder<string, cat_bond>(string.class,cat_bond.class);      public cat_bond(){}      public cat_bond(string symbol, string database, string ticktype, string assetclass,                      string sourceplatform, string sourceexchange) {          this.symbol = symbol;         this.database = database;         this.ticktype = ticktype;         this.assetclass = assetclass;         this.sourceplatform = sourceplatform;         this.sourceexchange = sourceexchange;      }      /*      * retrieve rows 'cat_bonds' table      */       public static list<cat_bond> findall(){         //return new arraylist<cat_bond>(cat_bond);              return find.all();     }      /*      * find ean      */     public static cat_bond findbyean(string symbol){         return find.where().eq("symbol", symbol).findunique();     }    } 

my controller class:

package controllers;  import java.util.list;  import views.html.*; import models.cat_bond; import play.data.form; import play.mvc.*;  public class cat_bonds extends controller {  private static final form<cat_bond> cat_bondform = form.form(cat_bond.class);  public static result list(){     list<cat_bond> cat_bond = cat_bond.findall();     return ok(list.render(cat_bond)); } 

and application.conf entry looks like:

#oracle  db.default.driver=oracle.jdbc.oracledriver  db.default.url="jdbc:oracle:thin:@server.uk.net.intra:port/alias"  db.default.user=user  db.default.password=pass   # evolutions # ~~~~~ # can disable evolutions if needed  evolutionplugin=disabled 

problem when call list made in controller findall() in model error:

**[persistenceexception: query threw sqlexception:ora-00904: "t0"."source_exchange": invalid identifier bind values:[] query was: select t0.symbol c0, t0.database c1, t0.tick_type c2, t0.asset_class c3, t0.source_platform c4, t0.source_exchange c5 tablespace.cat_bonds t0 ]** 

@column(name="xx")

was required above each variable defined in model class mapped table column.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -