PersistenceException: The default EbeanServer has not been defined? This is normally set via the ebean.datasource.default property. Otherwise it should be registered programatically via registerServer()
Hi, I am getting above exception.i am trying to write sql query like
String sql = "select r.cpu as cpu, r.ram as ram, r.core as core"+"from res r,env e,env_reser"+"where e.node =1 and e.host= 1 and e.apps= 1 and er.eid=e.eid and r.rid=er.rid";
SqlRow bug = Ebean.createSqlQuery(sql)
.setParameter("h",1)
.setParameter("n",1 )
.setParameter("a",1 )
.findUnique();
in Models package res.java file.
If i comment above code error disappears. Can anybody plz help me.
Thanku
As said in the docs under the section Persist Tasks in the Database (the section is about 3/4's down the page), the ebean default server can be connected to the models packages by adding the following line to you conf/application.conf file:
ebean.default = "models.*"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With