[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-851?page=co...
]
Hardy Ferentschik resolved ANN-851.
-----------------------------------
Resolution: Fixed
Added jaxb profile to pom
Unable to run tests under JDK 5 - JAXB missing
----------------------------------------------
Key: ANN-851
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-851
Project: Hibernate Annotations
Issue Type: Bug
Reporter: Emmanuel Bernard
Assignee: Hardy Ferentschik
Priority: Critical
Fix For: 3.5
Because Hibernate Annotations depends optionally on Bean Validation, we cannot run tests
under JDK 5
Can you apply your magic and make sure that:
- in JDK 5, jaxb API + an impl is added as dependencies
- in JDK 6 it does nto blow up either
Exception:
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.activateBeanValidation(BeanValidationActivator.java:69)
at
org.hibernate.cfg.AnnotationConfiguration.enableBeanValidation(AnnotationConfiguration.java:887)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:810)
at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:82)
at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:94)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:94)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at
com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:22)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.activateBeanValidation(BeanValidationActivator.java:60)
... 17 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at
org.hibernate.validation.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:187)
at
org.hibernate.validation.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:116)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:109)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:299)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.activateBeanValidation(TypeSafeActivator.java:50)
... 22 more
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.activateBeanValidation(BeanValidationActivator.java:69)
at
org.hibernate.cfg.AnnotationConfiguration.enableBeanValidation(AnnotationConfiguration.java:887)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:810)
at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:82)
at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:94)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.activateBeanValidation(BeanValidationActivator.java:60)
... 17 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at
org.hibernate.validation.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:187)
at
org.hibernate.validation.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:116)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:109)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:299)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.activateBeanValidation(TypeSafeActivator.java:50)
... 22 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira