Error Message: Bean is not enhanced

969 views
Skip to first unread message

Tobias Bod

unread,
Apr 5, 2015, 5:04:55 PM4/5/15
to eb...@googlegroups.com

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?

Rob Bygrave

unread,
Apr 6, 2015, 3:16:20 PM4/6/15
to ebean@googlegroups
You can have a look at the basic example app at: 

What you should see (with debug=9 on the enhancement) is output to system out showing the entity beans being enhanced.  If you are not seeing that (after the compile of the classes) then the maven plugin is not being fired.


Cheers, Rob.

--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages