我在jasig官网上下载了CAS最新的发布包,我直接将其module内的war包拖入JBoss的deploy目录下,但是却无法发布,主要的错误有:1. persistence.xml内的错误
13:11:11,547 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#CasPersistence state=Create
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: CasPersistence2. SLF4J的错误
13:11:13,774 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
13:11:13,774 ERROR [STDERR] SLF4J: Found binding in [vfszip:/F:/ServerTools/jboss-5.1.0.GA/server/default/deploy/CST/cas.war/WEB-INF/lib/slf4j-log4j12-1.5.8.jar/org/slf4j/impl/StaticLoggerBinder.class]
13:11:13,774 ERROR [STDERR] SLF4J: Found binding in [vfszip:/F:/ServerTools/jboss-5.1.0.GA/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class]
13:11:13,774 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.3. 某个监听器由于SLF4J的错误无法正常getLogger,然后就初始化失败
13:11:13,824 ERROR [[/cas]] Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.lang.ExceptionInInitializerError
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:243)
......(省略下面的堆栈跟踪信息)然后下面就出现一连串的连锁反应导致CAS Server无法成功部署了。
我的解决办法是:
对于错误1 : persistence.xml中加入一个<non-jta-data-source/>字段,这样第一个错误就消失了,但是不知道有没有副作用;
对于错误2 : 将%jboss_home%/common/lib/slf4j-jboss-logging.jar删除就不见这个错误了。但是对于错误3,始终是在getLogger的时候出现异常。一直无法正常部署有谁成功在JBoss上部署过CAS Server的,能否告诉我应该怎么做?