ActiveMQ,master/slave模式.关闭master,slave自动重启后,访问报错

INFO | Using Persistence Adapter: JDBCPersistenceAdapter(org.apache.commons.dbcp.BasicDataSource@683d57c4)
INFO | Database adapter driver override recognized for : [oracle_jdbc_driver] - adapter: class org.apache.activemq.store.jdbc.adapter.OracleJDBCAdapter
INFO | Database lock driver override not found for : [oracle_jdbc_driver]. Will use default implementation.
INFO | Attempting to acquire the exclusive lock to become the Master broker
INFO | Becoming the master on dataSource: org.apache.commons.dbcp.BasicDataSource@683d57c4
INFO | ActiveMQ 5.5.0 JMS Message Broker (testBroker) is starting
INFO | For help or more information please see: http://activemq.apache.org/
INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO | Listening for connections at: tcp://ck:20002
INFO | Connector openwire Started
INFO | ActiveMQ JMS Message Broker (testBroker, ID:ck-2430-1511311173619-0:1) started
INFO | jetty-7.1.6.v20100715
INFO | ActiveMQ WebConsole initialized.
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | ActiveMQ Console at http://0.0.0.0:10002/admin
INFO | Initializing Spring root WebApplicationContext
INFO | OSGi environment not detected.
INFO | Apache Camel 2.7.0 (CamelContext: camel) is starting
INFO | JMX enabled. Using ManagedManagementStrategy.
INFO | Found 5 packages with 16 @Converter classes to load
INFO | Loaded 152 type converters in 0.509 seconds
WARN | Broker localhost not started so using testBroker instead
INFO | Connector vm://localhost Started
INFO | Route: route1 started and consuming from: Endpoint[activemq://example.A]
INFO | Total 1 routes, of which 1 is started.
INFO | Apache Camel 2.7.0 (CamelContext: camel) started in 1.265 seconds
INFO | Camel Console at http://0.0.0.0:10002/camel
INFO | ActiveMQ Web Demos at http://0.0.0.0:10002/demo
INFO | RESTful file access application at http://0.0.0.0:10002/fileserver
INFO | Started SelectChannelConnector@0.0.0.0:10002
WARN | /admin/topics.jsp
javax.el.ELException: java.lang.reflect.UndeclaredThrowableException
at javax.el.BeanELResolver.getValue(BeanELResolver.java:298)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1001)
at org.apache.jsp.topics_jsp._jspx_meth_c_out_1(org.apache.jsp.topics_jsp:218)
at org.apache.jsp.topics_jsp._jspx_meth_c_forEach_0(org.apache.jsp.topics_jsp:162)
at org.apache.jsp.topics_jsp._jspService(org.apache.jsp.topics_jsp:104)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:527)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1216)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:45)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:421)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:456)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1042)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy68.getName(Unknown Source)
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:606)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:293)
... 47 more
Caused by: javax.management.InstanceNotFoundException: org.apache.activemq:BrokerName=testBroker,Type=Topic,Destination=ActiveMQ.Advisory.MasterBroker
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:267)
... 53 more

1个回答

这是mq配置,三个节点除了端口都是一样的
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
    </property>      
</bean>

<broker deleteAllMessagesOnStartup="false" xmlns="http://activemq.apache.org/schema/core" brokerName="testBroker" dataDirectory="${activemq.base}/data" >

    <persistenceAdapter>
          <jdbcPersistenceAdapter dataSource="#oracle-ds" createTablesOnStartup="true"/>
    </persistenceAdapter>

<!--    <persistenceAdapter>
        <kahaDB directory="${activemq.base}/data/kahadb"/>
    </persistenceAdapter>
     -->

    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://0.0.0.0:20002"/>
    </transportConnectors>

</broker>

<import resource="jetty.xml"/>

<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
      <property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
      <property name="username" value="gx"/>
      <property name="password" value="gx"/>
      <property name="maxActive" value="200"/>
      <property name="poolPreparedStatements" value="true"/>
</bean>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
急!ActiveMQ集群启动失败 No IOExceptionHandler registered, ignoring IO exception

ActiveMQ是最新5.15的版本,结合zookeeper搭的集群,搭建好第一次用时很正常,然后关机第二天重启以后发现启动失败了,控制台也打不开,大家能帮忙看看问题在哪么? ``` 2019-10-30 19:28:09,199 | INFO | No IOExceptionHandler registered, ignoring IO exception | org.apache.activemq.broker.BrokerService | LevelDB IOException handler. java.io.IOException: com/google/common/util/concurrent/internal/InternalFutureFailureAccess at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:40)[activemq-client-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.LevelDBClient.might_fail(LevelDBClient.scala:552)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.LevelDBClient.replay_init(LevelDBClient.scala:667)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.LevelDBClient.start(LevelDBClient.scala:558)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.DBManager.start(DBManager.scala:648)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.LevelDBStore.doStart(LevelDBStore.scala:312)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.replicated.MasterLevelDBStore.doStart(MasterLevelDBStore.scala:110)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[activemq-client-5.15.10.jar:5.15.10] at org.apache.activemq.leveldb.replicated.ElectingLevelDBStore$$anonfun$start_master$1.apply$mcV$sp(ElectingLevelDBStore.scala:230)[activemq-leveldb-store-5.15.10.jar:5.15.10] at org.fusesource.hawtdispatch.package$$anon$4.run(hawtdispatch.scala:330)[hawtdispatch-scala-2.11-1.22.jar:1.22] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_191] at java.lang.Thread.run(Thread.java:748)[:1.8.0_191] 2019-10-30 19:28:09,207 | INFO | Stopped LevelDB[/usr/local/activemq/apache-activemq-5.15.10/data/leveldb] | org.apache.activemq.leveldb.LevelDBStore | LevelDB IOException handler. ``` 查了网上的解决方案 一种是让删除lib文件夹下的一个jar包,但是我看了文件夹里面并没有 另一种让把配置文件xml里面的日志配置注释掉,我注释后再运行,日志内容如下: 2019-10-30 21:09:25,810 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@598067a5: startup date [Wed Oct 30 21:09:25 CST 2019]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main 2019-10-30 21:09:26,471 | INFO | Using Persistence Adapter: Replicated LevelDB[/usr/local/activemq/apache-activemq-5.15.10/data/leveldb, 211.67.17.205:2181,211.67.19.187:2181,211.67.16.224:2181//activemq/leveldb-stores] | org.apache.activemq.broker.BrokerService | main 2019-10-30 21:09:26,572 | INFO | Starting StateChangeDispatcher | org.apache.activemq.leveldb.replicated.groups.ZKClient | ZooKeeper state change dispatcher thread 2019-10-30 21:09:26,578 | INFO | Client environment:zookeeper.version=3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:host.name=admin1 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.version=1.8.0_191 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.vendor=Oracle Corporation | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.home=/usr/java/jdk1.8.0_191/jre | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.class.path=/usr/local/activemq/apache-activemq-5.15.10/bin/activemq.jar | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.io.tmpdir=/usr/local/activemq/apache-activemq-5.15.10/tmp | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:java.compiler=<NA> | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:os.name=Linux | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:os.arch=amd64 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:os.version=3.13.0-24-generic | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,578 | INFO | Client environment:user.name=admin1 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,579 | INFO | Client environment:user.home=/home/admin1 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,579 | INFO | Client environment:user.dir=/usr/local/activemq/zookeeper-3.4.10/bin | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,579 | INFO | Initiating client connection, connectString=211.67.17.205:2181,211.67.19.187:2181,211.67.16.224:2181 sessionTimeout=2000 watcher=org.apache.activemq.leveldb.replicated.groups.ZKClient@dc7df28 | org.apache.zookeeper.ZooKeeper | main 2019-10-30 21:09:26,591 | WARN | SASL configuration failed: javax.security.auth.login.LoginException: No JAAS configuration section named 'Client' was found in specified JAAS configuration file: '/usr/local/activemq/apache-activemq-5.15.10/conf/login.config'. Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. | org.apache.zookeeper.ClientCnxn | main-SendThread(211.67.19.187:2181) 2019-10-30 21:09:26,592 | INFO | Opening socket connection to server 211.67.19.187/211.67.19.187:2181 | org.apache.zookeeper.ClientCnxn | main-SendThread(211.67.19.187:2181) 2019-10-30 21:09:26,593 | WARN | unprocessed event state: AuthFailed | org.apache.activemq.leveldb.replicated.groups.ZKClient | main-EventThread 2019-10-30 21:09:26,595 | INFO | Socket connection established to 211.67.19.187/211.67.19.187:2181, initiating session | org.apache.zookeeper.ClientCnxn | main-SendThread(211.67.19.187:2181) 2019-10-30 21:09:26,611 | INFO | Session establishment complete on server 211.67.19.187/211.67.19.187:2181, sessionid = 0x26e1bcd90df0005, negotiated timeout = 4000 | org.apache.zookeeper.ClientCnxn | main-SendThread(211.67.19.187:2181)

配置好url之后,提示无法连接到url,试过更换为ip、本机的方式

javax.jms.JMSException: Could not connect to broker URL: tcp://192.168.1.137:61616. Reason: java.net.ConnectException: Connection refused: connect at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:358) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:303) at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:243) at com.hanthink.framework.client.jms.MessageTransceiver.initialize(MessageTransceiver.java:91) at com.hanthink.framework.client.jms.MessageTransceiver.<init>(MessageTransceiver.java:86) at com.hanthink.framework.client.jms.MessageSender.<init>(MessageSender.java:15) at jms.Sender.<init>(Sender.java:74) at jms.Sender.main(Sender.java:29) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:501) at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:464) at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:138) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:338) ... 7 more

下载的apache-activemq-5.2.0-bin.zip这个压缩文件为什么不能解压

我从apache网站上下载的apache-activemq-5.2.0-bin.zip这个压缩文件为什么不能解压开?我下载apache-activemq-5.1.0-bin.zip以及apache-activemq-5.0.0-bin.zip这两个版本也都打不开,不知道为什么,在解压缩的时候提示:这个压缩文件格式未知或者数据已经被损坏!大家有没有遇到这个问题,是什么原因呢?大家知道的 请告诉小弟!非常谢谢谢!

ActiveMQ提示重新连接出错

2016-03-29 21:52:03,136 | WARN | Transport Connection to: MQTTSocket_621347941 failed: java.io.IOException: Broker: localhost - Client: cy already connected from MQTTSocket_475507959 | org.apache.activemq.broker.TransportConnection.Transport | qtp1907161685-36 2016-03-29 21:55:19,990 | WARN | Failed to add Connection ID:iZ94bx4ng7iZ-58865-1459258343193-2:22 | org.apache.activemq.broker.TransportConnection | qtp1907161685-37 javax.jms.InvalidClientIDException: Broker: localhost - Client: cy already connected from MQTTSocket_475507959 at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:255)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.jmx.ManagedRegionBroker.addConnection(ManagedRegionBroker.java:231)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:92)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:87)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:102)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:809)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)[activemq-client-5.11.3.jar:5.11.3] at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:334)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)[activemq-broker-5.11.3.jar:5.11.3] at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)[activemq-client-5.11.3.jar:5.11.3] at org.apache.activemq.transport.ws.jetty8.MQTTSocket.sendToActiveMQ(MQTTSocket.java:122)[activemq-http-5.11.3.jar:5.11.3] at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.sendToActiveMQ(MQTTProtocolConverter.java:173)[activemq-mqtt-5.11.3.jar:5.11.3] at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTConnect(MQTTProtocolConverter.java:275)[activemq-mqtt-5.11.3.jar:5.11.3] at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTCommand(MQTTProtocolConverter.java:196)[activemq-mqtt-5.11.3.jar:5.11.3] at org.apache.activemq.transport.ws.jetty8.MQTTSocket.onMessage(MQTTSocket.java:62)[activemq-http-5.11.3.jar:5.11.3] at org.eclipse.jetty.websocket.WebSocketConnectionRFC6455$WSFrameHandler.onFrame(WebSocketConnectionRFC6455.java:878)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.websocket.WebSocketParserRFC6455.parseNext(WebSocketParserRFC6455.java:349)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.handle(WebSocketConnectionRFC6455.java:225)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[jetty-all-8.1.16.v20140903.jar:8.1.16.v20140903] at java.lang.Thread.run(Thread.java:745)[:1.7.0_76] 2016-03-29 21:55:19,993 | WARN | Transport Connection to: MQTTSoc 大家帮我看看,activemq同一个clientID=cy,提示已经连接了,不能再连接。如何解决?

spring整合activemq时候出现的一个问题,望好心人解答

[code="java"]<amq:broker useJmx="false" persistent="true"> <amq:persistenceAdapter> <amq:amqPersistenceAdapter directory="G:/amq" /> <!-- 使用数据库持久化 --> <!--<amq:jdbcPersistenceAdapter dataSource="#mysql-ds" />--> </amq:persistenceAdapter> <amq:transportConnectors> <amq:transportConnector uri="tcp://localhost:61616" /> </amq:transportConnectors> </amq:broker>[/code] 以上这段是声明的一个broker,我现在想要修改activemq.xml里面的内容,但是由于是用内置的activemq而不是下载的activemq完整客户端,所以现在不知道要到哪儿去找xml文件。 网上搜了下,有如下的声明方法可以指定xml文件路径: [code="java"]<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"> <property name="config" value="classpath:activemq.xml" /> <property name="start" value="true" /> </bean>[/code] 但我想要的是用<amq:broker>这个标签,我翻看了amq的xsd,但是没有找到合适的标签。不知有没人知道,能够告诉我一下,万分感谢!!!

spring activemq 关闭时报错

javax.jms.JMSException: Peer (vm://localhost#3) disposed. at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1292) at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1284) at org.apache.activemq.AdvisoryConsumer.dispose(AdvisoryConsumer.java:57) at org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:632) at org.springframework.jms.connection.SingleConnectionFactory.closeConnection(SingleConnectionFactory.java:456) at org.springframework.jms.connection.SingleConnectionFactory.resetConnection(SingleConnectionFactory.java:345) at org.springframework.jms.connection.CachingConnectionFactory.resetConnection(CachingConnectionFactory.java:205) at org.springframework.jms.connection.SingleConnectionFactory.destroy(SingleConnectionFactory.java:335) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:258) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:540) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:516) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:827) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:485) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:921) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:809) Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#3) disposed. at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:89) at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68) at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60) at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1290) ... 15 more 10:01:29 [org.apache.activemq.util.ThreadPoolUtils:136] [DEBUG] - Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@5294755d[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] is shutdown: true and terminated: true took: 0.000 seconds. 10:01:29 [org.apache.activemq.util.ThreadPoolUtils:54] [DEBUG] - Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@6f902c71[Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 6] 10:01:29 [org.springframework.jms.connection.CachingConnectionFactory:463] [DEBUG] - Could not close shared JMS Connection javax.jms.JMSException: Peer (vm://localhost#3) disposed. at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at org.apache.activemq.ActiveMQConnection.doSyncSendPacket(ActiveMQConnection.java:1431) at org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:675) at org.springframework.jms.connection.SingleConnectionFactory.closeConnection(SingleConnectionFactory.java:456) at org.springframework.jms.connection.SingleConnectionFactory.resetConnection(SingleConnectionFactory.java:345) at org.springframework.jms.connection.CachingConnectionFactory.resetConnection(CachingConnectionFactory.java:205) at org.springframework.jms.connection.SingleConnectionFactory.destroy(SingleConnectionFactory.java:335) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:258) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:540) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:516) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:827) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:485) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:921) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:809) Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://localhost#3) disposed. at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:89) at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68) at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81) at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:91) at org.apache.activemq.ActiveMQConnection.doSyncSendPacket(ActiveMQConnection.java:1418) ... 13 more 10:01:29 [org.springframework.beans.factory.support.DisposableBeanAdapter:323] [DEBUG] - Invoking destroy method 'close' on bean with name 'dataSource'

activeMQ创建连接抛空指针

javax.jms.JMSException: java.lang.NullPointerException at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1287) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1384) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:504) ~[activemq-all-5.4.2.jar:5.4.2] at com.catt.pub.net.jms.service.JMSCommon.connectio.createSessn(JMSCommon.java:192) ~[catt-pub-net.jar:na] at com.catt.pub.net.jms.service.Consumerion(Consumer.java:300) ~[catt-pub-net.jar:na] at com.catt.pub.net.jms.service.Consumer.createConsumerByTopic(Consumer.java:221) ~[catt-pub-net.jar:na] at com.catt.pub.net.jms.JMSUtils.getConsumer(JMSUtilJMSManageImpl.createConsumerss.java:137) ~[catt-pub-net.jar:na] at com.catt.zhwg.jms.services.collect.(JMSManageImpl.java:174) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] at com.catt.zhwg.jms.services.collect.JMSManageImpl.launch(JMSManageImpl.java:132) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] at com.catt.zhwg.jms.ManageThread.launch(ManageThread.java:106) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] at com.catt.zhwg.jms.utils.swing.Console.start(Console.java:172) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] at com.catt.zhwg.jms.utils.swing.Console.start(Console.java:153) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] at com.catt.zhwg.jms.utils.swing.SwingMain.main(SwingMain.java:50) [JMSCollectModule-1.0.0.0-SNAPSHOT.jar:na] java.lang.NullPointerException: null at com.huawei.imanager.nbi.activemq.security.CustomAuthenticate.addConnection(CustomAuthenticate.java:92) ~[na:na] at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229) ~[na:na] at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222) ~[activemq-all-5.4.2.jar:5.4.2] at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204) ~[activemq-all-5.4.2.jar:5.4.2] at java.lang.Thread.run(Unknown Source) ~[na:1.6.0_23]

ActiveMQ后台中多次出现一个警告 求原因和解决方案

![图片为我的接收消息的方法关闭session和结束连接的方式](https://img-ask.csdn.net/upload/201512/25/1451031420_952713.png)图片为我的接收消息的方法关闭session和结束连接的方式 在ActiveMQ的后台中多次出现 2015-12-25 15:55:39,271 | WARN | Transport Connection to: tcp://127.0.0.1:14720 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:14720@61616 2015-12-25 15:55:43,395 | WARN | Transport Connection to: tcp://127.0.0.1:14712 failed: java.net.SocketException: Connection reset | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:14712@61616 2015-12-25 15:56:16,830 | WARN | Transport Connection to: tcp://127.0.0.1:14725 failed: java.net.SocketException: Connection reset | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:14725@61616 这种警告,每次警告的端口都不一样 ,求帮我分析下原因和给个处理方案 MQ采用的是5.9版本 最近看才开始学习使用 ```

关于使用ActiveMQPooledConnectionFactory的一下问题

``` import javax.jms.Connection; import javax.jms.JMSException; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.jms.pool.PooledConnectionFactory; /** * 内部类的方式实现对connection的单例获取 */ public class JMSConnectionUtill { private PooledConnectionFactory pooledConnectionFactory = null; private static class CreateConnUtil{ private static JMSConnectionUtill instance = new JMSConnectionUtill(); } private JMSConnectionUtill (){ // ConnectionFactory :连接工厂,JMS 用它创建连接 ActiveMQConnectionFactory connectionFactory = null; // 构造ConnectionFactory实例对象,此处采用ActiveMq的实现jar connectionFactory = new ActiveMQConnectionFactory( ActiveMQConnection.DEFAULT_USER, ActiveMQConnection.DEFAULT_PASSWORD, "tcp://localhost:61616"); pooledConnectionFactory = new PooledConnectionFactory(); pooledConnectionFactory.setConnectionFactory(connectionFactory); //设置最大连接数 pooledConnectionFactory.setMaxConnections(200); //设置最小 pooledConnectionFactory.setMaximumActiveSessionPerConnection(50); //后台对象清理时,休眠时间超过了3000毫秒的对象为过期 pooledConnectionFactory.setTimeBetweenExpirationCheckMillis(3000); } //获取链接 public Connection getConnection(){ Connection connection = null; try { connection = pooledConnectionFactory.createConnection(); } catch (JMSException e) { e.printStackTrace(); } return connection; } public static final JMSConnectionUtill getInstance(){ return CreateConnUtil.instance; } } ``` 我所想问的是,我通过内部类获取PooledConnectionFactory的单例,每次获取连接从这里面获取,避免每次都创建新的连接而消耗大量的资源,但是这样写有没有问题,单就这个获取连接的工具类,有没有不恰当的地方,或者说这样做跟直接创建连接的效果是一直的,另外,求一份关于这方面的优化方案(经过实际检验的),在线等

Linux 下 activeMQ 读取远程activemq.xml

项目要求 Linux下部署ActiveMQ,原本ActiveMQ读取的是/conf下的activemq.xml, 现在要求好多机器读取一个机器上的xml文件,想修改ActiveMQ读取其他机器上生成的activemq.xml文件,不知道linux下ActiveMQ是在哪里读取的?如何修改?有人知道吗?

如何激活ActiveMQ持久性以抵抗重启?

<div class="post-text" itemprop="text"> <p>I do get ActiveMQ supports data persistence (<a href="http://activemq.apache.org/persistence.html" rel="nofollow noreferrer">http://activemq.apache.org/persistence.html</a>), but i cannot understand how to make it work, the result is when i restart ActiveMQ all the messages disappear, while queues and topics remain. </p> <p>I've read about to enable persistence on a database but i want to keep data on the filesystem since my system is facing database perfomance issues.</p> <p>This is my activemq.xml</p> <pre><code>&lt;!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --&gt; &lt;!-- START SNIPPET: example --&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"&gt; &lt;!-- Allows us to use system properties as variables in this configuration file --&gt; &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; &lt;property name="locations"&gt; &lt;value&gt;file:${activemq.conf}/credentials.properties&lt;/value&gt; &lt;/property&gt; &lt;/bean&gt; &lt;!-- Allows accessing the server log --&gt; &lt;bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery" lazy-init="false" scope="singleton" init-method="start" destroy-method="stop"&gt; &lt;/bean&gt; &lt;!-- The &lt;broker&gt; element is used to configure the ActiveMQ broker. --&gt; &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"&gt; &lt;destinationPolicy&gt; &lt;policyMap&gt; &lt;policyEntries&gt; &lt;policyEntry topic="&gt;" &gt; &lt;!-- The constantPendingMessageLimitStrategy is used to prevent slow topic consumers to block producers and affect other consumers by limiting the number of messages that are retained For more information, see: http://activemq.apache.org/slow-consumer-handling.html --&gt; &lt;pendingMessageLimitStrategy&gt; &lt;constantPendingMessageLimitStrategy limit="1000"/&gt; &lt;/pendingMessageLimitStrategy&gt; &lt;/policyEntry&gt; &lt;/policyEntries&gt; &lt;/policyMap&gt; &lt;/destinationPolicy&gt; &lt;!-- The managementContext is used to configure how ActiveMQ is exposed in JMX. By default, ActiveMQ uses the MBean server that is started by the JVM. For more information, see: http://activemq.apache.org/jmx.html --&gt; &lt;managementContext&gt; &lt;managementContext createConnector="false"/&gt; &lt;/managementContext&gt; &lt;!-- Configure message persistence for the broker. The default persistence mechanism is the KahaDB store (identified by the kahaDB tag). For more information, see: http://activemq.apache.org/persistence.html --&gt; &lt;persistenceAdapter&gt; &lt;kahaDB directory="${activemq.data}/kahadb"/&gt; &lt;/persistenceAdapter&gt; &lt;!-- The systemUsage controls the maximum amount of space the broker will use before disabling caching and/or slowing down producers. For more information, see: http://activemq.apache.org/producer-flow-control.html --&gt; &lt;systemUsage&gt; &lt;systemUsage&gt; &lt;memoryUsage&gt; &lt;memoryUsage percentOfJvmHeap="70" /&gt; &lt;/memoryUsage&gt; &lt;storeUsage&gt; &lt;storeUsage limit="100 gb"/&gt; &lt;/storeUsage&gt; &lt;tempUsage&gt; &lt;tempUsage limit="50 gb"/&gt; &lt;/tempUsage&gt; &lt;/systemUsage&gt; &lt;/systemUsage&gt; &lt;!-- The transport connectors expose ActiveMQ over a given protocol to clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html --&gt; &lt;transportConnectors&gt; &lt;!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --&gt; &lt;transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt; &lt;transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt; &lt;transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt; &lt;transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt; &lt;transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt; &lt;/transportConnectors&gt; &lt;!-- destroy the spring context on shutdown to stop jetty --&gt; &lt;shutdownHooks&gt; &lt;bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /&gt; &lt;/shutdownHooks&gt; &lt;/broker&gt; &lt;!-- Enable web consoles, REST and Ajax APIs and demos The web consoles requires by default login, you can disable this in the jetty.xml file Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details --&gt; &lt;import resource="jetty.xml"/&gt; </code></pre> <p> </p> </div>

有没有熟悉ActiveMQ的大神!??困扰很久了,准备学习JMS,求帮助!

不知道是哪里配置不对,跟着网上码的一个例子,求大神指教! INFO | Successfully connected to tcp://localhost:61616 javax.jms.JMSSecurityException: User name [null] or password is invalid. at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1398) at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1501) at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:522) at com.whitewind.activemq.JMSProducer.main(JMSProducer.java:42) Caused by: java.lang.SecurityException: User name [null] or password is invalid. at org.apache.activemq.security.JaasAuthenticationBroker.authenticate(JaasAuthenticationBroker.java:89) at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:68) at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:97) at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:102) at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:817) at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:77) at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:338) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188) at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:300) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196) at java.lang.Thread.run(Unknown Source) Caused by: javax.security.auth.login.FailedLoginException: user name is null at org.apache.activemq.jaas.PropertiesLoginModule.login(PropertiesLoginModule.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.security.auth.login.LoginContext.invoke(Unknown Source) at javax.security.auth.login.LoginContext.access$000(Unknown Source) at javax.security.auth.login.LoginContext$4.run(Unknown Source) at javax.security.auth.login.LoginContext$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(Unknown Source) at javax.security.auth.login.LoginContext.login(Unknown Source) at org.apache.activemq.security.JaasAuthenticationBroker.authenticate(JaasAuthenticationBroker.java:84) ... 15 more

activemq-web报错,activemq版本为5.9

**错误代码** java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations. at org.apache.catalina.connector.Request.startAsync(Request.java:1675) at org.apache.catalina.connector.Request.startAsync(Request.java:1668) at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1022) at org.eclipse.jetty.continuation.Servlet3Continuation.suspend(Servlet3Continuation.java:202) at org.apache.activemq.web.MessageListenerServlet.doMessages(MessageListenerServlet.java:349) at org.apache.activemq.web.MessageListenerServlet.doGet(MessageListenerServlet.java:250) at org.apache.activemq.web.AjaxServlet.doGet(AjaxServlet.java:47) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:137) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) ** 我的web.xml配置** <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>mqajax</display-name> <context-param> <description>Whether we should include an embedded broker or not</description> <param-name>org.apache.activemq.brokerURL</param-name> <param-value>tcp://127.0.0.1:61616</param-value> <!-- 这里可以写tcp://192.168.1.111:61616的形式连接其他服务器上的ActiveMQ服务器 --> </context-param> <servlet> <servlet-name>AjaxServlet</servlet-name> <servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class> <load-on-startup>1</load-on-startup> <async-supported>true</async-supported> </servlet> <servlet> <servlet-name>MessageServlet</servlet-name> <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>QueueBrowseServlet</servlet-name> <servlet-class>org.apache.activemq.web.QueueBrowseServlet</servlet-class> </servlet> <servlet> <servlet-name>PortfolioPublishServlet</servlet-name> <servlet-class>org.apache.activemq.web.PortfolioPublishServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>AjaxServlet</servlet-name> <url-pattern>/amq/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>MessageServlet</servlet-name> <url-pattern>/message/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>QueueBrowseServlet</servlet-name> <url-pattern>/queueBrowse/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>PortfolioPublishServlet</servlet-name> <url-pattern>/portfolioPublish</url-pattern> </servlet-mapping> <!-- 这种方式是在tomcat7版本以下运行,因为ajax+activemq需要servlet3.0的支持,而servlet3.0又只有在tomcat7中得到支持,所有加上jetty此包,就能在tomcat6运行了 --> <filter> <filter-name>session</filter-name> <filter-class>org.eclipse.jetty.continuation.ContinuationFilter</filter-class> </filter> <filter-mapping> <filter-name>session</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> **JS代码** <script type="text/javascript"> var amq = org.activemq.Amq; amq.init({ uri: 'amq', logging: true, timeout: 20 }); var myHandler = function(message){ $("#msgDiv").append(message); $("#msgDiv").append("<br>"); } amq.addListener("smeguangdong","topic://FirstTopic",myHandler); function send(){ var nickname = $("#nickname").val(); var content = $("#content").val(); var msg = nickname + " : " +content; //alert(msg); amq.sendMessage("topic://FirstTopic","<message>"+msg+"</message>"); } </script>

activeMQ 报错not initialized - call 'refresh'

activeMQ5.13.3版本启动报错,也 找一些资料,说是主机名的问题而我的主机名是没有待下划线啥的乱七八糟的啊,那个大神遇到过嘛?请教了。。。 2016-11-17 09:17:23,015 | INFO | Apache ActiveMQ 5.13.3 (localhost, ID:linjiexianserver-3840-1479345442777-0:1) is shutdown | org.apache.activemq.broker.BrokerService | main 2016-11-17 09:17:23,016 | INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@71f80d51: startup date [Thu Nov 17 09:17:21 CST 2016]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main 2016-11-17 09:17:23,019 | WARN | Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@71f80d51: startup date [Thu Nov 17 09:17:21 CST 2016]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:357)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:884)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:843)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)[activemq-spring-5.13.3.jar:5.13.3] at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:873)[activemq-broker-5.13.3.jar:5.13.3] at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)[activemq-spring-5.13.3.jar:5.13.3] at org.apache.activemq.broker.BrokerService.start(BrokerService.java:627)[activemq-broker-5.13.3.jar:5.13.3] at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)[activemq-spring-5.13.3.jar:5.13.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1700)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE] at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)[xbean-spring-3.18.jar:3.18] at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)[xbean-spring-3.18.jar:3.18] at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3] at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3] at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.13.3.jar:5.13.3] at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.13.3.jar:5.13.3] at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.13.3.jar:5.13.3] at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.13.3.jar:5.13.3] at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3] at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)[activemq-console-5.13.3.jar:5.13.3] at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3] at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.13.3.jar:5.13.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80] at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.13.3] at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.13.3] 2016-11-17 09:17:23,025 | WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main

使用activeMQ监听,调用mapper时为null怎么解决,请大神帮忙看看

**spring文件配置如下:** <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd http://www.springframework.org/schema/jms"> <context:annotation-config/> <context:component-scan base-package="com.lizx" /> <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/> <!-- 定义事务管理器 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <!-- 定义事务策略 --> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <!--所有以query开头的方法都是只读的 --> <tx:method name="query*" read-only="true" /> <tx:method name="get*" read-only="true" /> <!--其他方法使用默认事务策略 --> <tx:method name="delete*" propagation="REQUIRED" read-only="false"/> <tx:method name="edit*" propagation="REQUIRED" read-only="false"/> <tx:method name="add*" propagation="REQUIRED" read-only="false"/> </tx:attributes> </tx:advice> <aop:config> <!--pointcut元素定义一个切入点,execution中的第一个星号 用以匹配方法的返回类型, 这里星号表明匹配所有返回类型。 com.bw.service.*.*(..)表明匹配com.bw.service包下的所有类的所有 方法 --> <aop:pointcut id="myPointcut" expression="execution(* com.lizx.app.service.*.*(..))" /> <!--将定义好的事务处理策略应用到上述的切入点 --> <aop:advisor advice-ref="txAdvice" pointcut-ref="myPointcut" /> </aop:config> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"></property> <!-- 加载mybatis.cfg.xml文件 --> <property name="configLocation" value="classpath:conf/SqlMapConfig.xml"></property> <!-- 自动扫描需要定义类别名的包,将包内的JAVA类的类名作为类别名 --> <property name="typeAliasesPackage" value="com.lizx.app"></property> </bean> <!-- 自动扫描所有的Mapper接口与文件 --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.lizx.app.mapper"></property> </bean> <import resource="classpath*:conf/spring-ActiveMQ.xml" /> </beans> ------------------------------------ **activemq配置如下:** <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-4.1.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.12.1.xsd"> <mvc:annotation-driven /> <amq:connectionFactory id="amqConnectionFactory" brokerURL="tcp://127.0.0.1:61616" userName="admin" password="admin" /> <!-- 配置JMS连接工长 --> <bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"> <constructor-arg ref="amqConnectionFactory" /> <property name="sessionCacheSize" value="100" /> </bean> <!-- 定义消息队列(Queue) --> <bean id="demoQueueDestination" class="org.apache.activemq.command.ActiveMQQueue"> <!-- 设置消息队列的名字 --> <constructor-arg> <value>Jaycekon</value> </constructor-arg> </bean> <!-- 配置JMS模板(Queue),Spring提供的JMS工具类,它发送、接收消息。 --> <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <property name="connectionFactory" ref="connectionFactory" /> <property name="defaultDestination" ref="demoQueueDestination" /> <property name="receiveTimeout" value="10000" /> <!-- true是topic,false是queue,默认是false,此处显示写出false --> <property name="pubSubDomain" value="false" /> </bean> <!-- 配置消息队列监听者(Queue) --> <bean id="queueMessageListener" class="com.lizx.app.MQListener" /> <bean id="queueListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="demoQueueDestination" /> <property name="messageListener" ref="queueMessageListener" /> </bean> </beans> ------------------------------------ **在监听中使用为null时的情况** ![图片说明](https://img-ask.csdn.net/upload/201802/25/1519561067_682041.png) **在其它地方调用,不为null时的情况:** ![图片说明](https://img-ask.csdn.net/upload/201802/25/1519561131_923727.png)

【防火墙已关闭】帮看下JMX本地Main方法连接取Broker报错

# **帮我看下JMX本地Main方法连接取Broker报错 # (No broker is found at any of the 1 configured urls)** **JConsole通过jmxrmi连接 service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi本地正常** ![JConsole本地连接截图](https://img-ask.csdn.net/upload/201603/11/1457682430_510156.png) **activemq.xml配置** ``` <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- START SNIPPET: example --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- Allows us to use system properties as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>file:${activemq.conf}/credentials.properties</value> </property> </bean> <!-- Allows accessing the server log --> <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery" lazy-init="false" scope="singleton" init-method="start" destroy-method="stop"> </bean> <!-- The <broker> element is used to configure the ActiveMQ broker. --> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="wwwwww" dataDirectory="${activemq.data}" useJmx="true"> <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" > <!-- The constantPendingMessageLimitStrategy is used to prevent slow topic consumers to block producers and affect other consumers by limiting the number of messages that are retained For more information, see: http://activemq.apache.org/slow-consumer-handling.html --> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <!-- The managementContext is used to configure how ActiveMQ is exposed in JMX. By default, ActiveMQ uses the MBean server that is started by the JVM. For more information, see: http://activemq.apache.org/jmx.html --> <managementContext> <managementContext createConnector="true"/> </managementContext> <!-- Configure message persistence for the broker. The default persistence mechanism is the KahaDB store (identified by the kahaDB tag). For more information, see: http://activemq.apache.org/persistence.html <kahaDB directory="${activemq.data}/kahadb"/> --> <persistenceAdapter> <kahaDB directory="${activemq.data}/kahadb"/> <!--<jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#derby-ds"/> <jdbcPersistenceAdapter dataSource="#mysql-ds" createTablesOnStartup="true" />--> </persistenceAdapter> <!-- The systemUsage controls the maximum amount of space the broker will use before disabling caching and/or slowing down producers. For more information, see: http://activemq.apache.org/producer-flow-control.html --> <systemUsage> <systemUsage> <memoryUsage> <memoryUsage percentOfJvmHeap="70" /> </memoryUsage> <storeUsage> <storeUsage limit="100 gb"/> </storeUsage> <tempUsage> <tempUsage limit="50 gb"/> </tempUsage> </systemUsage> </systemUsage> <!-- The transport connectors expose ActiveMQ over a given protocol to clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html --> <transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnector name="openwire" uri="tcp://127.0.0.1:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> </transportConnectors> <!-- destroy the spring context on shutdown to stop jetty --> <shutdownHooks> <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /> </shutdownHooks> <plugins> <simpleAuthenticationPlugin> <users> <authenticationUser username="user" password="user123" groups="users" /> </users> </simpleAuthenticationPlugin> </plugins> </broker> <!--<bean id="derby-ds" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://10.0.10.66/activemq?relaxAutoCommit=true"/> <property name="username" value="root"/> <property name="password" value="123456"/> <property name="maxTotal" value="200"/> <property name="poolPreparedStatements" value="true"/> </bean> Enable web consoles, REST and Ajax APIs and demos The web consoles requires by default login, you can disable this in the jetty.xml file Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details --> <import resource="jetty.xml"/> </beans> <!-- END SNIPPET: example --> ``` **main方法报错 -----No broker is found at any of the 1 configured urls** ``` String ip = "127.0.0.1"; RemoteJMXBrokerFacade createConnector = new RemoteJMXBrokerFacade(); System.out.println("service:jmx:rmi:///jndi/rmi://"+ip+":1099/jmxrmi"); System.setProperty("webconsole.jmx.url", "service:jmx:rmi:///jndi/rmi://"+ip+":1099/jmxrmi"); System.setProperty("webconsole.jmx.user","admin"); System.setProperty("webconsole.jmx.password","activemq"); SystemPropertiesConfiguration configuration = new SystemPropertiesConfiguration(); createConnector.setConfiguration(configuration); System.out.println(configuration); System.out.println(ip+"执行开始-------"+configuration.getJmxUser()); try { BrokerViewMBean brokerAdmin = createConnector.getBrokerAdmin(); String brokerName =brokerAdmin.getBrokerName(); System.out.println("BrokerName ="+brokerName ); long messages =brokerAdmin.getTotalMessageCount(); System.out.println("messages ="+messages ); long consumerCount=brokerAdmin.getTotalConsumerCount(); System.out.println("consumerCount ="+consumerCount ); long dequeueCount=brokerAdmin.getTotalDequeueCount(); System.out.println("dequeueCount ="+dequeueCount ); long enqueueCount=brokerAdmin.getTotalEnqueueCount(); System.out.println("enqueueCount ="+enqueueCount ); System.out.println(brokerAdmin.getBrokerName()); //获取Topic相关的ObjectName ObjectName[] topicList=brokerAdmin.getTopics(); System.out.println("topic ="+topicList.length); //获取Queue相关的ObjectName ObjectName[] queueList=brokerAdmin.getQueues(); System.out.println("queue ="+queueList.length); //根据ObjectName创建相关的JMX对象获取相关的信息。 } catch (Exception e) { e.printStackTrace(); } System.out.println(ip+"执行结束-------"); } ``` **Console 信息** ``` service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/jmxrmi org.apache.activemq.web.config.SystemPropertiesConfiguration@4fccd51b 127.0.0.1执行开始-------admin 15:34:03.993 [main] DEBUG o.a.a.web.RemoteJMXBrokerFacade - Creating a new JMX-Connection to the broker 15:34:04.017 [main] DEBUG org.eclipse.jetty.util.log - Logging to Logger[org.eclipse.jetty.util.log] via org.eclipse.jetty.util.log.Slf4jLog 15:34:04.022 [main] INFO org.eclipse.jetty.util.log - Logging initialized @283ms 15:34:04.023 [main] DEBUG jndi - InitialContextFactory.getInitialContext() 15:34:04.027 [main] DEBUG jndi - supportDeepBinding=false 15:34:04.027 [main] DEBUG jndi - Created initial context delegate for local namespace:org.eclipse.jetty.jndi.local.localContextRoot@233c0b17 java.lang.IllegalStateException: No broker is found at any of the 1 configured urls at org.apache.activemq.web.RemoteJMXBrokerFacade.createConnection(RemoteJMXBrokerFacade.java:168) at org.apache.activemq.web.RemoteJMXBrokerFacade.getMBeanServerConnection(RemoteJMXBrokerFacade.java:114) at org.apache.activemq.web.RemoteJMXBrokerFacade.getBrokerAdmin(RemoteJMXBrokerFacade.java:88) at com.generateid.ActiveMQJMX.main(ActiveMQJMX.java:45) 127.0.0.1执行结束------- ```

activemq的集群负载均衡

ZooKeeper + LevelDB + Static discovery 做activemq的集群负载均衡 在activemq.xml中已经添加了如下的配置 集群a: ``` <networkConnectors> <networkConnector uri="static:(tcp://10.1.60.32:53531,tcp://10.1.60.32:53532,tcp://10.1.60.32:53533)" duplex="false"/> </networkConnectors> ``` 集群b: ``` <networkConnectors> <networkConnector uri="static:(tcp://10.1.60.41:51511,tcp://10.1.60.42:51512,tcp://10.1.60.43:51513)" duplex="false"/> </networkConnectors> ``` 如上是我的配置,我是2个集群各3台activemq,每个单点都做了另外一个集群的networkConnnetor配置,activemq实例启动都是正常的,但是启动后无法通过桥接互相消费消息,报如下的错误,2边的日志中都有: A端的日志报: 2016-05-13 17:24:17,238 | WARN | Failed to add Connection Broker->Broker2-48906-1463129863611-233:1 | org.apache.activemq.broker.TransportConnection | triggerStartAsyncNetworkBridgeCreation: remoteBroker=tcp:///10.1.60.32:53531@51183, localBroker= vm://Broker#346 java.lang.SecurityException: User name [null] or password is invalid. at b端的日志报: 2016-05-13 17:25:25,671 | WARN | Failed to add Connection Broker2->Broker-50573-1463130022715-221:1 | org.apache.activemq.broker.TransportConnection | triggerStartAsyncNetworkBridgeCreation: remoteBroker=tcp:///10.1.60.43:51513@37179, localBroker= vm://Broker2#328 java.lang.SecurityException: User name [null] or password is invalid. at 百度了很久都没有类似的问题得到解决,不知道有没有谁碰到过此类问题?

activeMQ启动时出错,导致安装失败

这是在启动activeMQ运行bin/win32/activemq.bat时,出现错误图片,求大神看看到底是什么原因导致的,跪求 ![图片说明](https://img-ask.csdn.net/upload/201604/14/1460621288_831623.png)

activemq从节点获取不了主节点的队列内容?

activemq以jdbc持久化master+slave的方式配置(没有用zookeeper),启动时已看到链接成功 ``` 2019-05-14 11:15:28,562 | INFO | Network connection between vm://slave#0 and tcp://0.0.0.0:61616 (master) has been established. | org.apache.activemq.network.DemandForwardingBridgeSupport | triggerStartAsyncNetworkBridgeCreation: remoteBroker=unconnected, localBroker= vm://slave#0 ``` 链接url,因为开发电脑虚拟出了两台虚机,所以都是61616端口,下面的ip实际上是不一样的 ``` private String brokerURL = "failover://(tcp://0.0.0.0:61616,tcp://0.0.0.0:61616)"; ``` 两个节点启动完成后,程序发送信息 ``` public static void main(String[] args) { TestContro send = new TestContro(); send.start(); } // public static void main(String[] args) { // TestContro cons = new TestContro(); // cons.consum(); // } // public void start(){ try { //根据用户名,密码,url创建一个连接工厂 factory = new ActiveMQConnectionFactory(userName, password, brokerURL); //从工厂中获取一个连接 connection = factory.createConnection(); //测试过这个步骤不写也是可以的,但是网上的各个文档都写了 connection.start(); //创建一个session //第一个参数:是否支持事务,如果为true,则会忽略第二个参数,被jms服务器设置为SESSION_TRANSACTED //第二个参数为false时,paramB的值可为Session.AUTO_ACKNOWLEDGE,Session.CLIENT_ACKNOWLEDGE,DUPS_OK_ACKNOWLEDGE其中一个。 //Session.AUTO_ACKNOWLEDGE为自动确认,客户端发送和接收消息不需要做额外的工作。哪怕是接收端发生异常,也会被当作正常发送成功。 //Session.CLIENT_ACKNOWLEDGE为客户端确认。客户端接收到消息后,必须调用javax.jms.Message的acknowledge方法。jms服务器才会当作发送成功,并删除消息。 //DUPS_OK_ACKNOWLEDGE允许副本的确认模式。一旦接收方应用程序的方法调用从处理消息处返回,会话对象就会确认消息的接收;而且允许重复确认。 session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); //创建一个到达的目的地,其实想一下就知道了,activemq不可能同时只能跑一个队列吧,这里就是连接了一个名为"text-msg"的队列,这个会话将会到这个队列,当然,如果这个队列不存在,将会被创建 destination = session.createQueue("test"); //从session中,获取一个消息生产者 producer = session.createProducer(destination); //设置生产者的模式,有两种可选 //DeliveryMode.PERSISTENT 当activemq关闭的时候,队列数据将会被保存 //DeliveryMode.NON_PERSISTENT 当activemq关闭的时候,队列里面的数据将会被清空 producer.setDeliveryMode(DeliveryMode.PERSISTENT); //创建一条消息,当然,消息的类型有很多,如文字,字节,对象等,可以通过session.create..方法来创建出来 TextMessage textMsg = session.createTextMessage("呵呵"); for(int i = 0 ; i < 3 ; i ++){ //发送一条消息 producer.send(textMsg); } System.out.println("发送消息成功"); //即便生产者的对象关闭了,程序还在运行哦 producer.close(); } catch (JMSException e) { e.printStackTrace(); } } ``` 在主节点控制台能看到待消费数量增加,但是从节点看不到数量变化,而且杀死主节点后,程序自动连接从节点发送,mq报数据库主键冲突 配置文件 ``` <networkConnectors> <networkConnector uri="static:(tcp://x.x.x.x:61616)" duplex="false"/> </networkConnectors> ``` 求大神帮忙看看。

程序员的兼职技能课

获取讲师答疑方式: 在付费视频第一节(触摸命令_ALL)片头有二维码及加群流程介绍 限时福利 原价99元,今日仅需39元!购课添加小助手(微信号:csdn590)按提示还可领取价值800元的编程大礼包! 讲师介绍: 苏奕嘉&nbsp;前阿里UC项目工程师 脚本开发平台官方认证满级(六级)开发者。 我将如何教会你通过【定制脚本】赚到你人生的第一桶金? 零基础程序定制脚本开发课程,是完全针对零脚本开发经验的小白而设计,课程内容共分为3大阶段: ①前期将带你掌握Q开发语言和界面交互开发能力; ②中期通过实战来制作有具体需求的定制脚本; ③后期将解锁脚本的更高阶玩法,打通任督二脉; ④应用定制脚本合法赚取额外收入的完整经验分享,带你通过程序定制脚本开发这项副业,赚取到你的第一桶金!

Windows版YOLOv4目标检测实战:训练自己的数据集

课程演示环境:Windows10; cuda 10.2; cudnn7.6.5; Python3.7; VisualStudio2019; OpenCV3.4 需要学习ubuntu系统上YOLOv4的同学请前往:《YOLOv4目标检测实战:训练自己的数据集》 课程链接:https://edu.csdn.net/course/detail/28745 YOLOv4来了!速度和精度双提升! 与 YOLOv3 相比,新版本的 AP (精度)和 FPS (每秒帧率)分别提高了 10% 和 12%。 YOLO系列是基于深度学习的端到端实时目标检测方法。本课程将手把手地教大家使用labelImg标注和使用YOLOv4训练自己的数据集。课程实战分为两个项目:单目标检测(足球目标检测)和多目标检测(足球和梅西同时检测)。 本课程的YOLOv4使用AlexyAB/darknet,在Windows系统上做项目演示。包括:安装软件环境、安装YOLOv4、标注自己的数据集、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算)和先验框聚类分析。还将介绍改善YOLOv4目标检测性能的技巧。 除本课程《Windows版YOLOv4目标检测实战:训练自己的数据集》外,本人将推出有关YOLOv4目标检测的系列课程。请持续关注该系列的其它视频课程,包括: 《Windows版YOLOv4目标检测实战:人脸口罩佩戴检测》 《Windows版YOLOv4目标检测实战:中国交通标志识别》 《Windows版YOLOv4目标检测:原理与源码解析》

lena全身原图(非256*256版本,而是全身原图)

lena全身原图(非256*256版本,而是全身原图) lena原图很有意思,我们通常所用的256*256图片是在lena原图上截取了头部部分的256*256正方形得到的. 原图是花花公子杂志上的一个

快速入门Android开发 视频 教程 android studio

这是一门快速入门Android开发课程,顾名思义是让大家能快速入门Android开发。 学完能让你学会如下知识点: Android的发展历程 搭建Java开发环境 搭建Android开发环境 Android Studio基础使用方法 Android Studio创建项目 项目运行到模拟器 项目运行到真实手机 Android中常用控件 排查开发中的错误 Android中请求网络 常用Android开发命令 快速入门Gradle构建系统 项目实战:看美图 常用Android Studio使用技巧 项目签名打包 如何上架市场

Java调用微信支付

Java 使用微信支付 一. 准备工作 1.

汽车租赁管理系统需求分析规格说明书

汽车租赁管理系统需求分析规格说明书,这只是一个模板,如果有不会的可以借鉴一下,还是蛮详细的。。。。

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

程序员的算法通关课:知己知彼(第一季)

【超实用课程内容】 程序员对于算法一直又爱又恨!特别是在求职面试时,算法类问题绝对是不可逃避的提问点!本门课程作为算法面试系列的第一季,会从“知己知彼”的角度,聊聊关于算法面试的那些事~ 【哪些人适合学习这门课程?】 求职中的开发者,对于面试算法阶段缺少经验 想了解实际工作中算法相关知识 在职程序员,算法基础薄弱,急需充电 【超人气讲师】 孙秀洋&nbsp;| 服务器端工程师 硕士毕业于哈工大计算机科学与技术专业,ACM亚洲区赛铜奖获得者,先后在腾讯和百度从事一线技术研发,对算法和后端技术有深刻见解。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/27272 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程无限观看时长,但是大家可以抓紧时间学习后一起讨论哦~

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

Python入门视频精讲

Python入门视频培训课程以通俗易懂的方式讲解Python核心技术,Python基础,Python入门。适合初学者的教程,让你少走弯路! 课程内容包括:1.Python简介和安装 、2.第一个Python程序、PyCharm的使用 、3.Python基础、4.函数、5.高级特性、6.面向对象、7.模块、8.异常处理和IO操作、9.访问数据库MySQL。教学全程采用笔记+代码案例的形式讲解,通俗易懂!!!

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

Java62数据提取代码

利用苹果手机微信下面的wx.data文件提取出62数据,通过62可以实现不同设备直接登陆,可以通过文件流的方式用脚本上传到服务器进行解析

Python代码实现飞机大战

文章目录经典飞机大战一.游戏设定二.我方飞机三.敌方飞机四.发射子弹五.发放补给包六.主模块 经典飞机大战 源代码以及素材资料(图片,音频)可从下面的github中下载: 飞机大战源代码以及素材资料github项目地址链接 ————————————————————————————————————————————————————————— 不知道大家有没有打过飞机,喜不喜欢打飞机。当我第一次接触这个东西的时候,我的内心是被震撼到的。第一次接触打飞机的时候作者本人是身心愉悦的,因为周边的朋友都在打飞机, 每

2018年全国大学生计算机技能应用大赛决赛 大题

2018年全国大学生计算机技能应用大赛决赛大题,程序填空和程序设计(侵删)

Lena图像处理测试专业用图,高清完整全身原图

Lena图像处理测试专业用图,高清完整全身原图,该图片很好的包含了平坦区域、阴影和纹理等细节,这些都有益于测试各种不同的图像处理算法。它是一幅很好的测试照片!其次,由于这是一个非常有魅力女人的照片。

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

verilog实现地铁系统售票

使用 verilog 实现地铁售票

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉系统全面的介绍。

Python可以这样学(第四季:数据分析与科学计算可视化)

董付国老师系列教材《Python程序设计(第2版)》(ISBN:9787302436515)、《Python可以这样学》(ISBN:9787302456469)配套视频,在教材基础上又增加了大量内容,通过实例讲解numpy、scipy、pandas、statistics、matplotlib等标准库和扩展库用法。

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

获取Linux下Ftp目录树并逐步绑定到treeview

在linux下抓取目录树,双击后获取该节点子节点(逐步生成)。另外有两个类,一个是windows下的(一次性获取目录树),一个是linux下的(足部获取目录树)

YOLOv3目标检测实战系列课程

《YOLOv3目标检测实战系列课程》旨在帮助大家掌握YOLOv3目标检测的训练、原理、源码与网络模型改进方法。 本课程的YOLOv3使用原作darknet(c语言编写),在Ubuntu系统上做项目演示。 本系列课程包括三门课: (1)《YOLOv3目标检测实战:训练自己的数据集》 包括:安装darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 (2)《YOLOv3目标检测:原理与源码解析》讲解YOLOv1、YOLOv2、YOLOv3的原理、程序流程并解析各层的源码。 (3)《YOLOv3目标检测:网络模型改进方法》讲解YOLOv3的改进方法,包括改进1:不显示指定类别目标的方法 (增加功能) ;改进2:合并BN层到卷积层 (加快推理速度) ; 改进3:使用GIoU指标和损失函数 (提高检测精度) ;改进4:tiny YOLOv3 (简化网络模型)并介绍 AlexeyAB/darknet项目。

手把手实现Java图书管理系统(附源码)

【超实用课程内容】 本课程演示的是一套基于Java的SSM框架实现的图书管理系统,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的java人群。详细介绍了图书管理系统的实现,包括:环境搭建、系统业务、技术实现、项目运行、功能演示、系统扩展等,以通俗易懂的方式,手把手的带你从零开始运行本套图书管理系统,该项目附带全部源码可作为毕设使用。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/27513 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化

微信小程序开发实战之番茄时钟开发

微信小程序番茄时钟视频教程,本课程将带着各位学员开发一个小程序初级实战类项目,针对只看过官方文档而又无从下手的开发者来说,可以作为一个较好的练手项目,对于有小程序开发经验的开发者而言,可以更好加深对小程序各类组件和API 的理解,为更深层次高难度的项目做铺垫。

Java 最常见的 200+ 面试题:面试必备

这份面试清单是从我 2015 年做了 TeamLeader 之后开始收集的,一方面是给公司招聘用,另一方面是想用它来挖掘在 Java 技术栈中,还有那些知识点是我不知道的,我想找到这些技术盲点,然后修复它,以此来提高自己的技术水平。虽然我是从 2009 年就开始参加编程工作了,但我依旧觉得自己现在要学的东西很多,并且学习这些知识,让我很有成就感和满足感,那所以何乐而不为呢? 说回面试的事,这份面试...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

微信小程序 实例汇总 完整项目源代码

微信小程序 实例汇总 完整项目源代码

基于西门子S7—1200的单部六层电梯设计程序,1部6层电梯

基于西门子S7—1200的单部六层电梯设计程序,1部6层电梯。 本系统控制六层电梯, 采用集选控制方式。 为了完成设定的控制任务, 主要根据电梯输入/输出点数确定PLC 的机型。 根据电梯控制的要求,

相关热词 c#分级显示数据 c# 不区分大小写替换 c#中调用就java c#正则表达式 验证小数 c# vscode 配置 c#三维数组能存多少数据 c# 新建excel c#多个文本框 c#怎么创建tcp通讯 c# mvc 电子病例
立即提问