使用Spring Data JPA库不反映Websphere自由概要文件JSP更改 [英] Websphere liberty profile jsp changes are not reflected using Spring data jpa library

查看:57
本文介绍了使用Spring Data JPA库不反映Websphere自由概要文件JSP更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常奇怪的问题.我正在研究一个使用 Spring 4.2.4 Hibernate 5 WebSphere Liberty Profile 8.5.5 作为应用程序服务器的项目.当我更改jsp文件的内容时,此更改不会反映出来,并且每次都必须重新启动服务器.而是反映对CSS或Java文件所做的更改,并且我不需要重新启动服务器.

Hi i have a really strange problem. I work on a project that uses Spring 4.2.4, Hibernate 5 and WebSphere Liberty Profile 8.5.5 as application server. When i change the content of jsp files, this changes are not reflected and i have to restart the server every time. Instead changes made to css or java files are reflected and i do not need to restart the server.

我创建了一个只有一个jsp和spring库的小项目来隔离问题,并且我注意到,如果我从类路径中删除了 spring-data-jpa 库,则服务器会反映出jsp变化,一切正常.不幸的是我需要那个图书馆.

I created a little project with only one jsp and the spring libraries to isolate the problem and i noticed that if i remove the spring-data-jpa library from the classpath, the server reflects the jsp changes and everything works fine. Unfortunately i need that library.

我试图将spring库升级到4.3.1版本,并将 spring-data-jpa 升级到1.10.2版本,但是没有任何变化.

I tried to upgrade the spring libraries to 4.3.1 version, and the spring-data-jpa to 1.10.2 version but nothing changes.

这些是我使用的spring库:

These are the spring libraries i use:

spring-aop-4.2.4.RELEASE.jar
spring-aspects-4.2.4.RELEASE.jar
spring-beans-4.2.4.RELEASE.jar
spring-context-4.2.4.RELEASE.jar
spring-context-support-4.2.4.RELEASE.jar
spring-core-4.2.4.RELEASE.jar
spring-data-commons-1.12.1.RELEASE.jar
spring-data-commons-core-1.4.1.RELEASE.jar
spring-data-jpa-1.10.1.RELEASE.jar
spring-data-oracle-1.2.1.RELEASE.jar
spring-expression-4.2.4.RELEASE.jar
spring-instrument-4.2.4.RELEASE.jar
spring-jdbc-4.2.4.RELEASE.jar
spring-orm-4.2.4.RELEASE.jar
spring-oxm-4.2.4.RELEASE.jar
spring-tx-4.2.4.RELEASE.jar
spring-web-4.2.4.RELEASE.jar
spring-webmvc-4.2.4.RELEASE.jar

以及我的 server.xml

<featureManager>
    <feature>javaee-7.0</feature>
    <feature>localConnector-1.0</feature>
    <feature>distributedMap-1.0</feature>
    <feature>ejbRemote-3.2</feature>
</featureManager>

<applicationManager autoExpand="true"/>

<applicationMonitor updateTrigger="mbean"/>

我不了解 Liberty spring-data-jpa 之间的关联是什么,为什么这个库会干扰服务器功能?我必须在 server.xml web.xml 中设置任何参数吗?

I don't understand which is the correlation between Liberty and spring-data-jpa, why this library interferes with the server functionalities? Is there any parameter i have to set in the server.xml or in web.xml?

我还尝试添加所有Liberty功能(

I also tried to add all the Liberty features (http://www.ibm.com/support/knowledgecenter/en/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/rwlp_feat.html) to the server.xml but nothing changes.

请帮助我,每次服务器重启大约需要3分钟.

Please help me, every server restart takes about 3 minutes.

提前谢谢!

推荐答案

这里的问题很可能与该APAR中解决的问题有关,该问题已包含在WebSphere Liberty 16.0.0.2中:

It's likely that the issue here is related to the one resolved in this APAR, which was included in WebSphere Liberty 16.0.0.2: PI58316: Changes to JSP in EAR or WAR not picked up if CDI-1.2 feature enabled

该问题与启用cdi-1.2功能时无法正确重新加载JSP文件有关.在这种情况下,javaee-7.0功能启用cdi-1.2.如果可能,将Liberty服务器升级到16.0.0.2修订包应该可以解决此问题.或者,删除javaee-7.0功能并仅启用非cdi-1.2功能(例如jsp-2.3)也可以解决此问题.

That issue deals with JSP files not reloading correctly when the cdi-1.2 feature is enabled. In the case here, the javaee-7.0 feature enables cdi-1.2. If it's possible, upgrading the Liberty server to the 16.0.0.2 fixpack should resolve this issue. Alternatively, removing the javaee-7.0 feature and only enabling non cdi-1.2 features (eg. jsp-2.3) may also resolve the issue.

这篇关于使用Spring Data JPA库不反映Websphere自由概要文件JSP更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆