Hi,
I am new to Ebean and want to make an easy setup with Spring 4, Ebean 4.5.5, running on Wildfly 8.
Currently there is one Class org.test.models.User, which has Annotations @Entity and @Table(name="user").
My ebean.properties look as follows:
ebean.classes=org.test.models.User
ebean.debug.sql=true
ebean.debug.lazyload=false
ebean.logging=all
ebean.logging.logfilesharing=all
ebean.logging.directory=${catalina.base}/logs/trans
ebean.logging.iud=sql
ebean.logging.query=sql
ebean.logging.sqlquery=sql
ebean.logging.txnCommit=none
datasource.default=mysql
datasource.mysql.username=ebeanuser
datasource.mysql.password=123456
datasource.mysql.databaseUrl=jdbc:mysql://localhost/ebeantest
datasource.mysql.databaseDriver=com.mysql.jdbc.Driver
datasource.mysql.minConnections=1
datasource.mysql.maxConnections=25
#datasource.mysql.heartbeatsql=select 1
datasource.mysql.isolationlevel=read_committed
ebean.ddl.generate=true
ebean.ddl.run=true
I know that I need enhancing for entities and thus have included the mavenenhancer plugin:
<plugin>
<groupId>org.avaje.ebeanorm</groupId>
<artifactId>avaje-ebeanorm-mavenenhancer</artifactId>
<version>4.5.2</version>
<executions>
<execution>
<id>main</id>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
<configuration>
<packages>org.test.**</packages>
<transformArgs>debug=9</transformArgs>
<classpath>${project.build.outputDirectory}</classpath>
<classSource>${project.build.outputDirectory}</classSource>
<classDestination>${project.build.outputDirectory}</classDestination>
</configuration>
</execution>
</executions>
</plugin>
When calling Ebean.save(user) I get the exception:
22:47:27,401 ERROR [com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager] (default task-2) Error in deployment: java.lang.IllegalStateException: Bean class org.test.models.User is not enhanced?