Announcement Announcement Module
Collapse
No announcement yet.
1.1.0.M1 + Hibernate/OpenJPA problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 1.1.0.M1 + Hibernate/OpenJPA problem

    Hi,

    after switching from Roo 1.0.2 to 1.1.0.M1 Hibernate starts throwing exceptions. For example in the following script

    Code:
    project --topLevelPackage com.example
    persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
    entity --class ~.domain.Foo --testAutomatically
    field string --fieldName name
    perform tests
    quit
    the tests fail with a barrage of exceptions. The root cause seems to be

    Code:
    [Thread-4] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [META-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to get the default Bean Validation factory
    OpenJPA fails similarly, with

    Code:
    [Thread-4] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [META-INF/spring/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [META-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    Eclipselink however seems to work just fine. Am i the only one who has this problem?

  • #2
    Roo 1.1.0.M1 needs Java 6.

    I had run the tests with Java 5, that's what caused the problems.

    Now everything works.

    Comment


    • #3
      Roo is supposed to support Java 5 usage, so if you could please log a bug at https://jira.springsource.org/browse/ROO with more details (full stack trace for example) it would help us sort this out for 1.1.0.M2.

      Thanks!

      Comment


      • #4
        Originally posted by Ben Alex View Post
        Roo is supposed to support Java 5 usage, so if you could please log a bug at https://jira.springsource.org/browse/ROO with more details (full stack trace for example) it would help us sort this out for 1.1.0.M2.

        Thanks!
        Done. ROO-880.

        Comment


        • #5
          Thanks. We'll get it sorted.

          Comment


          • #6
            Added jaxb-api dependency for Java 5 environments only. Fixed in Git commit 045d725a5d2e8e2db2ac61cd73581e33aca3965a.
            Last edited by Alan Stewart; Jun 15th, 2010, 12:36 AM.

            Comment

            Working...
            X