In Dropwizard I use Couchbase' Bucket.counter(...) method to generate unique IDs for my documents:
JsonLongDocument counter = bucket.counter("taskID", 1);
int id = (int) counter.content().intValue();
These lines work often but sometimes I get an Exception:
ERROR [2015-04-27 07:36:00,340] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: 8916c444f0cd508a
! rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.kv.CounterResponse.class
! at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:98) ~[rxjava-1.0.4.jar:1.0.4]
! at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:58) ~[rxjava-1.0.4.jar:1.0.4]
! ... 11 common frames omitted
! Causing: com.couchbase.client.core.CouchbaseException: INVALID_ARGUMENTS
! at com.couchbase.client.java.CouchbaseAsyncBucket$26.call(CouchbaseAsyncBucket.java:949) ~[java-client-2.1.2-dp.jar:2.1.1-7-g63629c6-dirty]
! at com.couchbase.client.java.CouchbaseAsyncBucket$26.call(CouchbaseAsyncBucket.java:931) ~[java-client-2.1.2-dp.jar:2.1.1-7-g63629c6-dirty]
! at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55) ~[rxjava-1.0.4.jar:1.0.4]
! at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224) ~[rxjava-1.0.4.jar:1.0.4]
! at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:101) ~[rxjava-1.0.4.jar:1.0.4]
! at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:199) ~[core-io-1.1.2-dp.jar:1.1.1-17-gf6d5dd3-dirty]
! at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:47) ~[rxjava-1.0.4.jar:1.0.4]
! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_31]
! at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_31]
! at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_31]
! at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_31]
! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_31]
! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_31]
! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]
Am I supposed to implement some kind of exception mapper or what is the reason for this? The seemingly randomness of the error is quite puzzling.
Related
when I try to use a File Reader I have (often) this error Error while creating node dialog for 'File Reader': URI is not hierarchical.
Do you have any idea of what is causing this problem?
Thank you very much
Here is my log:
2018-01-09 18:50:31,599 : DEBUG : main : Node : File Reader : 0:206:208 : Error while creating node dialog for 'File Reader': URI is not hierarchical
java.lang.IllegalArgumentException: URI is not hierarchical
at sun.nio.fs.WindowsUriSupport.fromUri(WindowsUriSupport.java:122)
at sun.nio.fs.WindowsFileSystemProvider.getPath(WindowsFileSystemProvider.java:92)
at java.nio.file.Paths.get(Paths.java:138)
at org.knime.core.util.FileUtil.resolveToPath(FileUtil.java:1127)
at org.knime.core.node.util.FilesHistoryPanel$FileReaderCheckLabel.checkLocation(FilesHistoryPanel.java:328)
at org.knime.core.node.util.FilesHistoryPanel.fileLocationChanged(FilesHistoryPanel.java:952)
at org.knime.core.node.util.FilesHistoryPanel.access$2(FilesHistoryPanel.java:946)
at org.knime.core.node.util.FilesHistoryPanel$4.insertUpdate(FilesHistoryPanel.java:513)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669)
at javax.swing.plaf.basic.BasicComboBoxEditor$BorderlessTextField.setText(BasicComboBoxEditor.java:144)
at javax.swing.plaf.basic.BasicComboBoxEditor.setItem(BasicComboBoxEditor.java:87)
at com.sun.java.swing.plaf.windows.WindowsComboBoxUI$WindowsComboBoxEditor.setItem(WindowsComboBoxUI.java:507)
at javax.swing.JComboBox.configureEditor(JComboBox.java:1404)
at javax.swing.plaf.basic.BasicComboBoxUI$Handler.contentsChanged(BasicComboBoxUI.java:1864)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118)
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:93)
at javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:131)
at org.knime.core.node.util.FilesHistoryPanel.updateHistory(FilesHistoryPanel.java:844)
at org.knime.core.node.util.FilesHistoryPanel.<init>(FilesHistoryPanel.java:631)
at org.knime.base.node.io.filereader.FileReaderNodeDialog.createFileNamePanel(FileReaderNodeDialog.java:283)
at org.knime.base.node.io.filereader.FileReaderNodeDialog.<init>(FileReaderNodeDialog.java:261)
at org.knime.base.node.io.filereader.FileReaderNodeFactory.createNodeDialogPane(FileReaderNodeFactory.java:126)
at org.knime.core.node.Node$1.run(Node.java:2069)
at org.knime.core.node.util.ViewUtils$3.run(ViewUtils.java:353)
at org.knime.core.node.util.ViewUtils$2.run(ViewUtils.java:155)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2018-01-09 18:50:36,581 : DEBUG : main : NodeContainerEditPart : : : File Reader 0:206:208 (IDLE)
please find your answere here in our forum: https://www.knime.com/forum/knime-users/error-while-creating-node-dialog-for-file-reader-uri-is-not-hierarchical#comment-28960
To resolve this, please go to the following folder: \knime-workspace.metadata\knime
and delete the files named history_ASCIIfile
I've just update PhpStorm to v2016.1 and I can't start it, it is crashing from start...
Here is the error log.
Internal error. Please report to http://jb.gg/ide/critical-startup-errors
com.intellij.diagnostic.PluginException: cannot create class 'com.jetbrains.php.actions.PhpStormNewProjectStep' [Plugin: com.intellij]
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:194)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:166)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:511)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:491)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:484)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActions(ActionManagerImpl.java:1263)
at com.intellij.openapi.actionSystem.impl.ActionPreloader.preload(ActionPreloader.java:31)
at com.intellij.openapi.application.Preloader$2$1.run(Preloader.java:78)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.application.Preloader$2.run(Preloader.java:74)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.intellij.util.ReflectionUtil.newInstance(ReflectionUtil.java:520)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:154)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.intellij.util.ReflectionUtil.newInstance(ReflectionUtil.java:484)
... 17 more
Caused by: java.lang.IllegalStateException: #NotNull method io/j99/idea/vue/module/VueProjectGenerator.getName must not return null
at io.j99.idea.vue.module.VueProjectGenerator.getName(VueProjectGenerator.java:26)
at com.intellij.ide.util.projectWizard.ProjectSettingsStepBase.<init>(ProjectSettingsStepBase.java:62)
at com.jetbrains.php.actions.PhpStormProjectSpecificSettingsStep.<init>(PhpStormProjectSpecificSettingsStep.java:16)
at com.jetbrains.php.actions.PhpStormNewProjectStep$Customization.createProjectSpecificSettingsStep(PhpStormNewProjectStep.java:42)
at com.intellij.ide.util.projectWizard.AbstractNewProjectStep$Customization.getActions(AbstractNewProjectStep.java:112)
at com.intellij.ide.util.projectWizard.AbstractNewProjectStep$Customization.getActions(AbstractNewProjectStep.java:99)
at com.intellij.ide.util.projectWizard.AbstractNewProjectStep.<init>(AbstractNewProjectStep.java:65)
at com.jetbrains.php.actions.PhpStormNewProjectStep.<init>(PhpStormNewProjectStep.java:15)
... 22 more
Any idea
One of your plugins is incompatible with new 2006.1 version -- please either disable it or remove the plugin file completely.
The faulty plugin is vue-for-idea.
Given that db is a database value, the following query throws an exception:
(d/q
'[:find ?concert (count-distinct ?demand)
:in $ ?campaignId
:with ?concert
:where
[?c :campaign/id ?campaignId]
[?concert :crowd-concert/campaign ?c]
[?demand :demand/concert ?concert]
]
db "546b7e0f2348f10200abf5ea")
(The information model is that there are several concerts belonging to a campaign, and demands that , and we want to fetch the concert fields and the number of demands for each concert).
The stacktrace is here:
java.lang.Exception: processing rule: (q__25764 ?concert ?demand ?concert), message: processing clause: [?demand :demand/concert ?concert], message: java.lang.ArrayIndexOutOfBoundsException: 2
at datomic.datalog$eval_rule$fn__6161.invoke(datalog.clj:1441)
at datomic.datalog$eval_rule.invoke(datalog.clj:1421)
at datomic.datalog$eval_query.invoke(datalog.clj:1464)
at datomic.datalog$qsqr.invoke(datalog.clj:1553)
at datomic.datalog$qsqr.invoke(datalog.clj:1510)
at datomic.query$q.invoke(query.clj:674)
at datomic.api$q.doInvoke(api.clj:35)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at bs.routes.campaigns$eval25762.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6745)
at clojure.core$eval.invoke(core.clj:3081)
at clojure.main$repl$read_eval_print__7099$fn__7102.invoke(main.clj:240)
at clojure.main$repl$read_eval_print__7099.invoke(main.clj:240)
at clojure.main$repl$fn__7108.invoke(main.clj:258)
at clojure.main$repl.doInvoke(main.clj:258)
at clojure.lang.RestFn.invoke(RestFn.java:1523)
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1025.invoke(interruptible_eval.clj:53)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:51)
at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1067$fn__1070.invoke(interruptible_eval.clj:183)
at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1060.invoke(interruptible_eval.clj:152)
at clojure.lang.AFn.run(AFn.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: processing clause: [?demand :demand/concert ?concert], message: java.lang.ArrayIndexOutOfBoundsException: 2
at datomic.datalog$eval_clause$fn__6135.invoke(datalog.clj:1387)
at datomic.datalog$eval_clause.invoke(datalog.clj:1350)
at datomic.datalog$eval_rule$fn__6161.invoke(datalog.clj:1436)
... 29 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 2
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at clojure.core$deref_future.invoke(core.clj:2186)
at clojure.core$deref.invoke(core.clj:2207)
at clojure.core$mapv$fn__6727.invoke(core.clj:6616)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.core$mapv.invoke(core.clj:6616)
at datomic.datalog$fn__5678.invoke(datalog.clj:588)
at datomic.datalog$fn__5536$G__5508__5551.invoke(datalog.clj:51)
at datomic.datalog$join_project_coll.invoke(datalog.clj:116)
at datomic.datalog$fn__5607.invoke(datalog.clj:219)
at datomic.datalog$fn__5515$G__5510__5530.invoke(datalog.clj:51)
at datomic.datalog$eval_clause$fn__6135.invoke(datalog.clj:1356)
... 31 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at clojure.lang.RT.aset(RT.java:2326)
at datomic.datalog$fn__5678$project__5749.invoke(datalog.clj:480)
at datomic.datalog$fn__5678$join__5767.invoke(datalog.clj:578)
at datomic.datalog$fn__5678$fn__5772$fn__5773.invoke(datalog.clj:588)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:634)
at clojure.core$bound_fn_STAR_$fn__4439.doInvoke(core.clj:1890)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Am I doing something wrong ?
Removing the :with clause solved the problem.
I don't know Datalog enough to know why exactly, but I assume that's because there's some redundancy in ?concert being in both :find and :with clauses.
I've updated my Elastic Search from 0.19.4 to 0.20.6 and I'm not getting the desired results.. I'm doing a dynamic search after key presses and the code that was working fine before acts different now.
The Search:
'' = (empty field) fine
a = 9400 hits
ab = 126 hits ERROR
abc = 2 hits ERROR
abcd 0 hits fine
Dependencies I've changed:
runtime 'org.elasticsearch:elasticsearch-lang-groovy:1.1.0' --> runtime 'org.elasticsearch:elasticsearch-lang-groovy:1.3.0'
runtime 'org.elasticsearch:elasticsearch:0.19.4' --> runtime 'org.elasticsearch:elasticsearch:0.20.6'
runtime 'org.xerial.snappy:snappy-java:1.0.4.1' (new)
Stack:
2013-04-09 10:47:58,130 [http-bio-8080-exec-2] DEBUG xxxx.SearchController - result stuff is: [hits:org.elasticsearch.search.internal.InternalSearchHits#9b0d61b]
2013-04-09 10:47:58,137 [http-bio-8080-exec-2] ERROR xxxx.SearchController - Problem...
org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.elasticsearch.search.internal.InternalSearchHit
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.render(JSON.java:134)
at grails.converters.JSON.render(JSON.java:150)
at xxx.xxxx.xxxx.SearchController.autocomplete(SearchController.groovy:514)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
... 13 more
Caused by: java.lang.NullPointerException
at org.elasticsearch.common.compress.lzf.LZFCompressor.isCompressed(LZFCompressor.java:76)
at org.elasticsearch.common.compress.CompressorFactory.compressor(CompressorFactory.java:124)
at org.elasticsearch.common.compress.CompressorFactory.uncompressIfNeeded(CompressorFactory.java:174)
at org.elasticsearch.search.internal.InternalSearchHit.sourceRef(InternalSearchHit.java:172)
at org.elasticsearch.search.internal.InternalSearchHit.getSourceRef(InternalSearchHit.java:181)
... 13 more
Where the code fails:
try {
log.debug("result stuff is: ${results}");
render results as JSON
}
catch ( Exception e ) {
log.error("Problem...",e);
}
This was due to a slight change in ES structure, had to rewrite my conversion method :)
I'm using a fresh ActiveMQ 5.8.0 installation, where I have a message in a queue called 'testing'. I also replaced the ACTIVEMQ_SUNJMX line in bin/activemq to enable JMX:
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
Then I query JMX via the following code:
try {
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"));
connector.connect();
MBeanServerConnection connection = connector.getMBeanServerConnection();
ObjectName mbeanName = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Broker");
BrokerViewMBean mbean = MBeanServerInvocationHandler.newProxyInstance(connection, mbeanName, BrokerViewMBean.class, true);
System.out.println("Id:" + mbean.getBrokerId()); // here the exception will be thrown
}
catch (Exception x) {
x.printStackTrace();
}
The Exception is thrown when accessing the mbean.
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getBrokerId(Unknown Source)
at testing.TestJmx.main(TestJmx.java:25)
Caused by: javax.management.InstanceNotFoundException: org.apache.activemq:BrokerName=localhost,Type=Broker
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:668)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1424)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:89)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1292)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1380)
at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:621)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:901)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:280)
... 2 more
I checked that that port is listening, VisualVM also shows me the mbeans, ideas?
The fact that bean names have changed is documented on the 5.8.0 release page.
So your ObjectName should be of the form:
ObjectName mbeanName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost");
Excellent answer. Here you have an example of use: API Docs
There is also something important that changes from 5.7 to 5.8. The default URL for JMX services goes from:
service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxrmi
to:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Lovely question and answer too, I was having a hard time configuring JMX. ActiveMQ docs isn't up-to-date in this regard. Eg : http://activemq.apache.org/jmx.html doesn't say that from 5.8.0 onwards "SUNJMX" becomes "ACTIVEMQ_SUNJMX_START".
The config provided by OP , ie :
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
, and the corresponding code is the one that really worked for me. Thanks ! ( I am using ActiveMQ 5.8)