基本上在JBOSS上跑一些框架都会有问题,主要是因为JBOSS使用VFS加载文件,麻烦
比如CAS
CAS的web.xml中
<context-param>
<param-name>log4jConfigLocation</param-name>
[color=red]<param-value>classpath:log4j.xml</param-value>[/color]
<param-value>/WEB-INF/classes/log4j.xml</param-value>
</context-param>
还有
[color=red]java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: CasPersistence[/color]
删除WEB-INF/classes/MET-INF/persistence.xml
或者
<persistence-unit name="CasPersistence" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source/>
</persistence-unit>
比如CAS
CAS的web.xml中
<context-param>
<param-name>log4jConfigLocation</param-name>
[color=red]<param-value>classpath:log4j.xml</param-value>[/color]
<param-value>/WEB-INF/classes/log4j.xml</param-value>
</context-param>
还有
[color=red]java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: CasPersistence[/color]
删除WEB-INF/classes/MET-INF/persistence.xml
或者
<persistence-unit name="CasPersistence" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source/>
</persistence-unit>
本文探讨了在JBOSS应用服务器上部署应用程序时遇到的问题,包括配置log4j.xml路径错误及persistence.xml中资源本地持久化上下文定义缺失等问题,并提供了具体的解决方案。
836

被折叠的 条评论
为什么被折叠?



