Jedis report linkageerror Error: Javax/management/mbeanserver
When you use the Jedis client, you encounter the following exception information:
Horrible exception: java.lang.linkageerror: loading constraint violation: loader "com/ibm/ws/classloader/[email protected]" previously initiated loading for a different type with name "Javax/management/mbeanserver" defined by loader "com/ibm/oti/vm/[email protected]" At java.lang.classloader.defineclassimpl (Native method) At java.lang.classloader.defineclass (classloader.java:262) at Java.security.SecureClassLoader.defineClass (secureclassloader.java:69) at Com.ibm.ws.classloader.compoundclassloader._defineclass (compoundclassloader.java:829) at Com.ibm.ws.classloader.CompoundClassLoader.localFindClass (compoundclassloader.java:744) at Com.ibm.ws.classloader.CompoundClassLoader.loadClass (compoundclassloader.java:585) at Java.lang.ClassLoader.loadClass (classloader.java:627) at Org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister (Basegenericobjectpool.java:947) at org.apache.commons.pool2.impl.basegenericobjectpool.<init> ( basegenericobjectpool.java:132) at org.apache.commons.pool2.impl.genericobjectpool.<init> ( genericobjectpool.java:107) At redis.clients.util.pool.initpool (pool.java:43) at Redis.clients.util.pool.<init> (pool.java:31) at redis.clients.jedis.jedispool.<init> ( JEDISPOOL.JAVA:80) At redis.clients.jedis.jedisclusterinfocache.setnodeifnotexist ( jedisclusterinfocache.java:107) At redis.clients.jedis.jedisclusterinfocache.discoverclusternodesandslots ( jedisclusterinfocache.java:54) At redis.clients.jedis.jedisclusterconnectionhandler.initializeslotscache ( jedisclusterconnectionhandler.java:39) at redis.clients.jedis.jedisclusterconnectionhandler.<init> ( JEDISCLUSTERCONNECTIONHANDLER.JAVA:28) at redis.clients.jedis.jedisslotbasedconnectionhandler.<init> (jedisslotbasedconnectionhandler.java:21) at redis.clients.jedis.jedisslotbasedConnectionhandler.<init> (jedisslotbasedconnectionhandler.java:16) at Redis.clients.jedis.binaryjediscluster.<init> (binaryjediscluster.java:39) at Redis.clients.jedis.jediscluster.<init> (jediscluster.java:45) at redis.clients.jedis.jediscluster. <init> (jediscluster.java:32) At com.hc360.redis.util.redisconnection.createcluster ( redisconnection.java:65) at com.hc360.redis.redisclusterclient.<clinit> (RedisClusterClient.java:26) At java.lang.j9vminternals.initializeimpl (Native method) at java.lang.j9vminternals.initialize ( j9vminternals.java:233) At com.hc360.my.modules.screens.corcenter.company.morelogin.dobuildtemplate ( morelogin.java:104) At com.hc360.my.common.secure.mylogsecurescreen.dobuildtemplate (MyLogSecureScreen.java : At org.apache.turbine.modules.screens.templatescreen.dobuild (templatescreen.java:100) at Org.apache.turbine.modules.Screen.build (screen.java:57) At org.apache.turbine.modules.screenloaDer.eval (screenloader.java:107) At org.apache.turbine.modules.layouts.velocityonlylayout.dobuild ( velocityonlylayout.java:93) At org.apache.turbine.modules.layout.build (layout.java:53) at Org.apache.turbine.modules.LayoutLoader.exec (layoutloader.java:101) at Org.apache.turbine.modules.pages.DefaultPage.doBuild (defaultpage.java:146) at Org.apache.turbine.modules.Page.build (page.java:53) at org.apache.turbine.modules.pageloader.exec ( pageloader.java:101) At org.apache.turbine.turbine.doget (turbine.java:799) at Javax.servlet.http.HttpServlet.service (httpservlet.java:575) At javax.servlet.http.httpservlet.service ( httpservlet.java:668) At com.ibm.ws.webcontainer.servlet.servletwrapper.service (ServletWrapper.java:1214) At com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest (servletwrapper.java:774) at Com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest (servletwrapper.java:456) at Com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handlerequest (servletwrapperimpl.java:178) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget (webappfilterchain.java:125) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter (webappfilterchain.java:92) at Com.hc360.waf.filter.WafFilter.doFilter (waffilter.java:87) at Com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter (filterinstancewrapper.java:192) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter (webappfilterchain.java:89) at Com.hc360.security.authz.SecurityFilter.doFilter (securityfilter.java:161) at Com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter (filterinstancewrapper.java:192) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter (webappfilterchain.java:89) at Com.hc360.my.common.filter.ScriptFilter.doFilter (scriptfilter.java:58) at Com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter (filterinstancewrapper.java:192) at Com.ibm.ws.webcontainer.filter.WebAppFilterCHain.dofilter (webappfilterchain.java:89) At com.hc360.my.common.filter.injectrefusefilter.dofilter ( injectrefusefilter.java:58) At com.ibm.ws.webcontainer.filter.filterinstancewrapper.dofilter ( filterinstancewrapper.java:192) At com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter ( webappfilterchain.java:89) At com.hc360.mmt.j2ee.conf.persistencesessionfilter.dofilter ( persistencesessionfilter.java:73) At com.ibm.ws.webcontainer.filter.filterinstancewrapper.dofilter ( filterinstancewrapper.java:192) At com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter ( webappfilterchain.java:89) At com.hc360.sso.client.ssofilter.dofilter (ssofilter.java:674) at Com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter (filterinstancewrapper.java:192) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter (webappfilterchain.java:89) at Com.hc360.my.common.filter.CharSetFilter.doFilter (charsetfilter.java:42) at Com.ibm.ws.webcontainer.filter.FilterInstancewrapper.dofilter (filterinstancewrapper.java:192) at Com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter (webappfilterchain.java:89) at Com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter (webappfiltermanager.java:926) at Com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters (webappfiltermanager.java:1023) at Com.ibm.ws.webcontainer.webapp.WebApp.handleRequest (webapp.java:3703) at Com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest (webgroup.java:304) at Com.ibm.ws.webcontainer.WebContainer.handleRequest (webcontainer.java:962) at Com.ibm.ws.webcontainer.WSWebContainer.handleRequest (wswebcontainer.java:1662) at Com.ibm.ws.webcontainer.channel.WCChannelLink.ready (wcchannellink.java:195) at Com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination (httpinboundlink.java:452) at Com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest (httpinboundlink.java:511) at Com.ibm.ws.http.channel.inbOund.impl.HttpInboundLink.processRequest (httpinboundlink.java:305) at Com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete (httpiclreadcallback.java:83) at Com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted (aioreadcompletionlistener.java:165) at com.ibm.io.async.abstractasyncfuture.invokecallback (abstractasyncfuture.java:217) at Com.ibm.io.async.AsyncChannelFuture.fireCompletionActions (asyncchannelfuture.java:161) at Com.ibm.io.async.AsyncFuture.completed (asyncfuture.java:138) At com.ibm.io.async.resulthandler.complete ( resulthandler.java:204) At com.ibm.io.async.resulthandler.runeventprocessingloop (ResultHandler.java:775) at com.ibm.io.async.resulthandler$2.run (resulthandler.java:905) at com.ibm.ws.util.threadpool$ Worker.run (threadpool.java:1659)
The project is deployed in WebSphere, and it is obvious that class load conflicts are:
Horrible Exception:java.lang.LinkageError:loading constraint Violation:loader "Com/ibm/ws/classloader/[email Protected] "Previously initiated loading for a different type with name" Javax/management/mbeanserver "defined by loader" Com/ibm/oti/vm/[email protected] "
Searching for Javax/management/mbeanserver in the project found that the same class appeared in the Rt.jar package of the JDK and Jboss-jmx.jar;
Do not understand why Jboss-jmx.jar in the same class as the JDK, but all in use, can not add a function at the expense of other functions;
There is a doubt, the previous project exists in this package, why did not error? And now I have to report it?
Guess not used to this class before!
That is undoubtedly used in the Jedis of the class Javax/management/mbeanserver, obviously this class is JMX, in the use of Redis, I do not need this function, whether it can be removed?
View source discovery, jediscluster When you create an instance, you can pass configuration information that can be set to use JMX, as long as it is set to false:
Genericobjectpoolconfig copc = new Genericobjectpoolconfig (); copc.setjmxenabled (false); jediscluster = new Jediscluster (CLUSTERNODES,3000,1000,COPC);
Jedis report linkageerror Error: Javax/management/mbeanserver