Announcement Announcement Module
Collapse
No announcement yet.
Roo, Hibernate, MYSQL and JBoss AS 7 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo, Hibernate, MYSQL and JBoss AS 7

    I have not had much luck running any samples on JBoss AS 7 server using hibernate and mysql.

    for example, i run the following commands in roo shell

    Code:
    project --topLevelPackage com.mackeweb.example.solarsystem
    jpa setup --provider HIBERNATE --database MYSQL
    entity jpa --class ~.domain.Planet
    field string --fieldName name --notNull
    field number --fieldName orderFromSun --type java.lang.Integer
    web mvc setup
    web mvc all --package ~.web
    JBoss throws exception java.lang.UnsupportedOperationException: The application must supply JDBC connections

    so I changed to use JNDI resource and get past exception.

    Code:
    jpa setup --provider HIBERNATE --database MYSQL --jndiDataSource java:jboss/datasources/SolarDS
    it gets me past the exception, but when running web application get errors about entity not being mapped. I usually can edit persistence.xml and add the entity objects manually to the XML.

    Code:
    <class>com.mackeweb.example.solarsystem.domain.Planet</class>
    Is JBoss AS 7 the problem? Am I missing a step in my setup? Is roo not ready to handle MySQL and JBoss?
Working...
X