我有一个 Infinispan Server ,版本6.0.x,它是从JBoss 7.2派生的版本,它可以很好地用于缓存。
但是,当我尝试通过JMX监控时,我不能。这是网址我输入jconsole.bat
:
service:jmx:remoting-jmx://MY.IP.ADDRESS.HERE:9999
但是我收到了这个错误:
Exception in thread "VMPanel.connect" java.util.ServiceConfigurationError: javax.management.remote.JMXConnectorProvider: Provider org.jboss.remotingjmx.RemotingConnectorProvider could not be instantiated: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:472)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:341)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:370)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292)
Caused by: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jboss.remotingjmx.RemotingConnectorProvider.<clinit>(RemotingConnectorProvider.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 14 more
Exception in thread "VMPanel.connect" java.util.ServiceConfigurationError: javax.management.remote.JMXConnectorProvider: Provider org.jboss.remotingjmx.RemotingConnectorProvider could not be instantiated: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.remotingjmx.RemotingConnectorProvider
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:472)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:341)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:357)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.remotingjmx.RemotingConnectorProvider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 7 more
也许我应该在某处创建一些托管bean?我该如何解决这个问题?
备注1 :在文档中,它们包含<global></global>
之间的necearry配置,但在我的情况下,设置应该尊重JBoss Schema ......
备注2 :我尝试使用JBoss 7.2,它可以向我展示图表等等,并且按照我使用相同网址的方式。不同之处在于我使用了JBoss的jconsole.bat
而不是Infinispan。
请问,有关必要配置的任何想法吗?
谢谢。
答案 0 :(得分:0)
我是Windows 7用户,这是对我有用的修复程序。 打开 jconsole.bat 进行编辑。 在顶部,打开回声。
@echo on
然后下去找到这一行
call :SearchForJars "%JBOSS_MODULEPATH%\system\layers\base\org\jboss\logging\main"
在它之前插入以下行:
echo "%JBOSS_MODULEPATH%\system\layers\base\org\jboss\logging\main"
我不确定为什么会这样,但确实如此。如果您获得不同的ClassNotFound异常,请尝试在其他jar搜索之上的echo语句。