Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-8416

Cannot initiate sessionfactory using MetaDataSources in Native Hibernate API due to missing dependency to javax.xml.bind.api

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • TBD
    • EAP 6.0.0 ER 3_Beta1
    • Hibernate
    • None
    • NEW

      Please refer Hibernate4NativeAPISetupwithMetaDataTestCase using SFSBHibernatewithMetaDataSession:

      https://github.com/madhumita12/jboss-as/tree/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/hibernate

      If you run test,first you will get the following exception in server log:

      Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
      at org.hibernate.metamodel.MetadataSources.<init>(MetadataSources.java:83) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
      at org.hibernate.metamodel.MetadataSources.<init>(MetadataSources.java:75) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
      at org.jboss.as.test.integration.hibernate.SFSBHibernatewithMetaDataSession.setupConfig(SFSBHibernatewithMetaDataSession.java:91) [beans.jar:]
      ... 138 more
      Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException from [Module "org.hibernate:main" from local module loader @b01d43 (roots: /home/msadhukh/REDHAT/jbossAS7/jboss-as/testsuite/integration/basic/../../../build/target/jboss-as-7.1.1.Final-SNAPSHOT/modules)]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

      The javax.xml.bind.api dependency is missing in module.xml within /jboss-as/build/target/jboss-as-7.1.1.Final-SNAPSHOT/modules/org/hibernate/main and build should accomodate it.

              madhumita12_jira Madhumita Sadhukhan (Inactive)
              madhumita12_jira Madhumita Sadhukhan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: