spring - Hibernate 4.3 需要 Websphere RASWsLoggerFactory 吗?

标签 spring hibernate tomcat websphere

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

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

我的应用程序上下文中的 Beans。

<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>

在创建 sessionFactorybean 时,spring bean 正在尝试解析 jtaplatform 并期望 Websphere 应用程序服务器特定的记录器类。

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

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

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

最佳答案

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

这个没用 enter image description here jar 误导 hibernate 认为有可用的 websphere jtaplatform。

所以,删除这个垃圾 jar 解决了这个问题。

关于spring - Hibernate 4.3 需要 Websphere RASWsLoggerFactory 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39868057/

相关文章:

java - 应用程序属性 "server.servlet.session.timeout"在 Spring Boot 项目中不起作用

java - Spring Security hasPermission 不起作用

java - 如何处理库所需的Spring bean?

java - @Autowired 和静态方法

angular - 带有 Angular 和 Spring 的 Websocket

java - 寻找让Web框架在服务器端更加面向对象的最佳方式

mysql - 使用 maria DB、JPA 和 Spring Boot 1.5.4 基于架构的 Multi-Tenancy

hibernate - 如何使用 Hibernate 比较两个不同表中的字段?

web-services - Tomcat 中的有状态进程(守护进程?)?

java - Log4j2 创建日志文件但不写入它