创建名称为'sessionfactory'的bean时出错(java.lang.NoClassDefFoundError:javax / xml / bind / JAXBException)

时间:2019-05-06 10:45:37

标签: java jaxb

发生以下错误:

  

创建名称为“ sessionFactory”的bean时出错   ServletContext资源[/WEB-INF/spring-servlet.xml]:的调用   初始化方法失败;嵌套异常为   java.lang.NoClassDefFoundError:javax / xml / bind / JAXBException

配置:

<beans:bean id="sessionFactory"
        class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"> 
    <beans:property name="dataSource" ref="dataSource" /> 
    <beans:property name="packagesToScan" value="com.work.entity" /> 
    <beans:property name="hibernateProperties"> 
        <beans:props> 
            <beans:prop key="hibernate.dialect">${jdbc.dialect}</beans:prop> 
        </beans:props> 
    </beans:property> 
</beans:bean>

0 个答案:

没有答案