[cas-user] Error during Maven build of CAS 3.5.2

已查看 104 次
跳至第一个未读帖子

David Jelinek

未读,
2013年6月20日 10:22:322013/6/20
收件人 cas-...@lists.jasig.org
When I attempt a Maven build of CAS 3.5.2 I get an Error on the JBossCacheTicketRegistryTests. The command I executed was:
mvn package install
in the cas-server-3.5.2 directory. This is cas-server-3.5.2 right out of the distribution no changes made. I must have forgotten something, but I am not fluent with JAVA yet. Would anyone be willing to tell me what I am missing? Thanks in advance.

The environment:
CentOS 6.4 64 kernel.x86_64 2.6.32-358.11.1.el6
centos-release.x86_64   6-4.el6.centos.10
jdk-7u17-linux-x64
apache-tomcat-7.0.41
log4j-1.2.15
cas-server-3.5.2
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)

JAVA_HOME=/usr/java/jdk1.7.0_17
CLASSPATH="/usr/java/classes;/usr/java/jdk1.7.0_17"
M2_HOME=/usr/local/apache-maven/apache-maven-2.2.1
M2=$M2_HOME/bin

from file cas-server-3.5.2/cas-server-integration-jboss/target/surefire-reports/org.jasig.cas.ticket.registry.JBossCacheTicketRegistryTests.txt :

testDeleteNonExistingTicket(org.jasig.cas.ticket.registry.JBossCacheTicketRegistryTests)  Time elapsed: 0.905 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistry' defined in class path resource [jbossTestContext.xml]: Cannot resolve reference to bean 'cache' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cache' defined in class path resource [jbossTestContext.xml]: Invocation of init method failed; nested exception is org.jboss.cache.CacheException: Unable to invoke method public void org.jboss.cache.RPCManagerImpl.start() on object instance org.jboss.cache.RPCManagerImpl@a083524
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at org.jasig.cas.ticket.registry.JBossCacheTicketRegistryTests.getNewTicketRegistry(JBossCacheTicketRegistryTests.java:75)
        at org.jasig.cas.ticket.registry.JBossCacheTicketRegistryTests.setUp(JBossCacheTicketRegistryTests.java:63)
        at junit.framework.TestCase.runBare(TestCase.java:132)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cache' defined in class path resource [jbossTestContext.xml]: Invocation of init method failed; nested exception is org.jboss.cache.CacheException: Unable to invoke method public void org.jboss.cache.RPCManagerImpl.start() on object instance org.jboss.cache.RPCManagerImpl@a083524
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
        ... 34 more
Caused by: org.jboss.cache.CacheException: Unable to invoke method public void org.jboss.cache.RPCManagerImpl.start() on object instance org.jboss.cache.RPCManagerImpl@a083524
        at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:127)
        at org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(ComponentRegistry.java:932)
        at org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegistry.java:718)
        at org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java:582)
        at org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocationDelegate.java:279)
        at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:95)
        at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:79)
        at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:146)
        at org.jasig.cas.util.JBossCacheFactoryBean.afterPropertiesSet(JBossCacheFactoryBean.java:62)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
        ... 41 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:123)
        ... 51 more
Caused by: org.jboss.cache.CacheException: org.jgroups.ChannelException: unable to setup the protocol stack: failed determining bind address
        at org.jboss.cache.RPCManagerImpl.initialiseChannelAndRpcDispatcher(RPCManagerImpl.java:268)
        at org.jboss.cache.RPCManagerImpl.start(RPCManagerImpl.java:139)
        ... 56 more
Caused by: org.jgroups.ChannelException: unable to setup the protocol stack: failed determining bind address
        at org.jgroups.JChannel.init(JChannel.java:1514)
        at org.jgroups.JChannel.<init>(JChannel.java:247)
        at org.jgroups.JChannel.<init>(JChannel.java:230)
        at org.jboss.cache.RPCManagerImpl.initialiseChannelAndRpcDispatcher(RPCManagerImpl.java:263)
        ... 57 more
Caused by: java.lang.IllegalArgumentException: failed determining bind address
        at org.jgroups.protocols.TP.setProperties(TP.java:804)
        at org.jgroups.protocols.UDP.setProperties(UDP.java:156)
-- 
Have a wonderful day,
David Jelinek

Misagh Moayyed

未读,
2013年6月20日 12:06:492013/6/20
收件人 cas-...@lists.jasig.org

David,

 

To build CAS, it’s recommended that you start out with the Maven overlay method:

http://bit.ly/12dCFZ7

 

With the overlay, you only get to choose what you actually plan to deploy, which I am guessing would not involve the JBoss ticket registry.

 

Misagh

-- 
You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

David Jelinek

未读,
2013年6月20日 14:48:482013/6/20
收件人 cas-...@lists.jasig.org
On 06/20/2013 12:06 PM, Misagh Moayyed wrote:

David,

 

To build CAS, it’s recommended that you start out with the Maven overlay method:

http://bit.ly/12dCFZ7

Thank you!!!! I had been looking for that documentation and had not figured out where to look! (OK so best practices looked like someplace I'd look after I got some of it figured out)  I'd had everything else set up and figured I had to download the cas-server-3.5.2-release.tar.gz file and work from the directory extracted from that. This all makes a lot more sense now!

 

With the overlay, you only get to choose what you actually plan to deploy, which I am guessing would not involve the JBoss ticket registry.

 

Well, it was between that and Ehcache. After lurking for a while I'd kinda decided on Ehcache, so you are right. Thanks again!
回复全部
回复作者
转发
0 个新帖子