Reputation: 1
i want to create a project, which contains a play 2 Java application and a plain Java Application for the administrator. In the play app i'm using the ebean orm (play.db.ebean) and i would like to use the same model classes in my Java app. Is it possible? When I want to use them, i get this Exception: "Caused by: java.lang.RuntimeException: There is no started application"
Upvotes: 0
Views: 98
Reputation: 131
In order to use ebean outside of play, you have to start the ebean agent
AgentLoader.loadAgentFromClasspath("avaje-ebeanorm-agent","debug=1;packages=org.yourclass.data.models.**")
and connect to a server as configured programmatically or through an ebean.properties file in much the same way you do in the play framework application.conf file.
This page gives more details and should get you there.
Upvotes: 1