title: Play : bean class is not enhanced, using EbeanServerFactory
body: <p>using play framework 2.4.2, I have to connect to a distant database  wich can be offline.</p>
  
  <p>I am trying to avoid the "Cannot connect to database [distantdatabase]" exception at startup.</p>
  
  <p>After trying lots of methods, I decided to create manually an EbeanServerFactory to access this distant database.</p>
  
  <p>This is my model :</p>
  
  <pre><code>@Entity
  @Table(name="vehicules")
  public class Vehicule {
      @Id
      public Long id;
      public Long noParc;
      public Long etat;
  }
  </code></pre>
  
  <p>And this is how I try to access data</p>
  
  <pre><code>// Classes of distant database
  List&lt;Class&lt;?&gt;&gt; saetrClasses = new ArrayList&lt;Class&lt;?&gt;&gt;();
  saetrClasses.add(Vehicule.class);
  
  // Access configuration to distant database
  DataSourceConfig ds = new DataSourceConfig();
  ds.setDriver("com.mysql.jdbc.Driver");
  ds.setUrl("jdbc:mysql://localhost/distantdatabase");
  ds.setUsername("stack");
  ds.setPassword("overflow");
  
  ServerConfig saetrServerConfig = new ServerConfig();
  saetrServerConfig.setName("distantdatabase");
  saetrServerConfig.setDefaultServer(false);
  saetrServerConfig.setClasses(saetrClasses);
  saetrServerConfig.setRegister(false);
  saetrServerConfig.setDataSourceConfig(ds);
  
  Logger.warn("EbeanServerFactory.create...");
  
  EbeanServer saetrServer = EbeanServerFactory.create(saetrServerConfig);
  
  saetrServer.find(Vehicule.class).where().gt("lastMaj", lastRequestTime).findList();
  </code></pre>
  
  <p>build.sbt</p>
  
  <pre><code>lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean, PlayEnhancer)
  </code></pre>
  
  <p>plugins.sbt</p>
  
  <pre><code>addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>[warn] - application - EbeanServerFactory.create...
  [error] - com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager - Error in deployment
  java.lang.IllegalStateException: Bean class models.distantdatabase.Vehicule is not enhanced?
  [...]
  </code></pre>
  
  <p>I do not understand this error. I've looked a lot of examples and did not find what i'm missing. Any idea ?</p>
  
  <p>Edit : I looked into source code of ebean, and I get this error because my model does not implements EntityBean interface.
  How can I force implementation of this interface ?</p>