Hibernate 4.3需要Websphere RASWsLoggerFactory吗?

时间:2016-10-05 07:39:02

标签: spring hibernate tomcat websphere

我试图在我现有的spring 4.3 web-mvc应用程序中使用Hibernate 4.3。

我已经包含了分发列表中所需的jar。 enter image description here

我的应用程序环境中的Bean。

<orcl:pooling-datasource id="dataSource"  connection-properties-prefix="conn" properties-location="WEB-INF/orcl.properties"/> 
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
</bean>

在创建sessionFactory bean时,spring bean正在尝试解析jtaplatform并期望Websphere app server特定的记录器类。

但有趣的部分是我在tomcat上运行我的应用程序,它没有那些bootstrap.jar或websphere类。

我的问题是为什么我们需要Websphere jar,我进入StandardJtaPlatformResolver并发现最后一个可能的(if else或try catch方法)jta提供者将是websphere。 不知道为什么我应该在这种情况下提供jta提供商?

以下是实际错误输出。enter image description here

1 个答案:

答案 0 :(得分:1)

终于找到了罪魁祸首。很久以前这个应用程序在websphere服务器上运行,然后迁移到jboss。

这未使用过 enter image description here jar误导了hibernate,认为有可用的websphere jtaplatform。

所以,删除这个垃圾罐解决了它。