浏览 11798 次
锁定老帖子 主题:一个spring+activemq的例子
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-08-08
需要jar包: activemq-core-4.1.1.jar apache-activemq-4.1.1.jar backport-util-concurrent-2.1.jar commons-lang-2.1.jar commons-logging-1.0.4.jar geronimo-j2ee-management_1.0_spec-1.0.jar log4j-1.2.11.jar spring.jar xbean-spring-2.8.jar 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-11-21
使用你的例子的时候出现了下面的异常,我使用的是activemq4.1.1
[ERROR] org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://activemq.org/config/1.0] |
|
返回顶楼 | |
发表时间:2007-12-25
你缺少了jar包:xbean-spring jar
|
|
返回顶楼 | |
发表时间:2008-03-31
在哪可以下载到xbean-spring.jar
|
|
返回顶楼 | |
发表时间:2008-05-08
发生了异常现象: [ERROR] org.apache.activemq.broker.BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: java.lang.NullPointerException java.lang.NullPointerException at org.apache.activemq.command.ActiveMQDestination.hashCode(ActiveMQDestination.java:296) at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:160) at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:767) at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:248) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142) at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:142) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142) at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:152) at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1429) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:383) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:957) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:924) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:304) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at com.caucho.server.webapp.Application.start(Application.java:1647) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670) at com.caucho.server.host.Host.start(Host.java:420) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) at com.caucho.server.host.HostContainer.start(HostContainer.java:504) at com.caucho.server.resin.ServletServer.start(ServletServer.java:971) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) at com.caucho.server.deploy.DeployController.start(DeployController.java:517) at com.caucho.server.resin.ResinServer.start(ResinServer.java:551) at com.caucho.server.resin.Resin.init(Resin.java) at com.caucho.server.resin.Resin.main(Resin.java:625) [INFO ] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [org.apache.activemq.xbean.XBeanBrokerService,jmsConnectionFactory,destination,jmsTemplate,resourceMessageConverter,resourceMessageProducer,resourceMessageListener,listenerContainer]; root of BeanFactory hierarchy} [ERROR] org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in URL [file:.../applicationContext-activemq-embedded.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException Caused by: java.lang.NullPointerException at org.apache.activemq.command.ActiveMQDestination.hashCode(ActiveMQDestination.java:296) at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:160) at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:767) at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:248) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142) at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:142) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142) at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:152) at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1429) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:383) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:957) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:924) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:304) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at com.caucho.server.webapp.Application.start(Application.java:1647) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670) at com.caucho.server.host.Host.start(Host.java:420) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) at com.caucho.server.host.HostContainer.start(HostContainer.java:504) at com.caucho.server.resin.ServletServer.start(ServletServer.java:971) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) at com.caucho.server.deploy.DeployController.start(DeployController.java:517) at com.caucho.server.resin.ResinServer.start(ResinServer.java:551) at com.caucho.server.resin.Resin.init(Resin.java) at com.caucho.server.resin.Resin.main(Resin.java:625)
|
|
返回顶楼 | |
发表时间:2008-06-17
crazyox 写道 自己写的一个spring+activemq的example,p2p的
需要jar包: activemq-core-4.1.1.jar apache-activemq-4.1.1.jar backport-util-concurrent-2.1.jar commons-lang-2.1.jar commons-logging-1.0.4.jar geronimo-j2ee-management_1.0_spec-1.0.jar log4j-1.2.11.jar spring.jar xbean-spring-2.8.jar |
|
返回顶楼 | |