Search code examples
springspring-mvcspring-roo

Roo automatic delete _Roo_DbManaged.aj of DBRE Add-On


My project use DBRE Add-On to reverse from database. After that, I run roo command and roo update the content of all .aj file. But roo delete the _Roo_DbManaged.aj so that my project can not work. My question is how to prevent roo delete the _Roo_DbManaged.aj . Here is my entityManagerFactory Beab Thank for any help.

<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/something"/>

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
    <property name="persistenceUnitName" value="persistenceUnit" />
    <property name="dataSource" ref="dataSource"/>
</bean>

Solution

  • Spring Roo doesn't uses the DB all the times (this could be too much expensive on system resource). So, DBRE command generates a file called dbre.xml which stores db schema info got from DB.

    Check dbre.xml exists and hasn't been modified by anybody.

    Good luck!