JBoss thread/internal module by accident uses the external custom module
Issue
Occasionally, the error below is seen during the jboss start and EAR deployments. And it causes the EARs failing to deploy.
2016-06-23 19:46:20,872 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.jgroups.channel.shmcoreserv: org.jboss.msc.service.StartException in service jboss.jgroups.channel.shmcoreserv: java.lang.ClassCastException: org.jgroups.protocols.UDP cannot be cast to org.jgroups.stack.Protocol
at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:75)
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_95]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
Caused by: java.lang.ClassCastException: org.jgroups.protocols.UDP cannot be cast to org.jgroups.stack.Protocol
at org.jgroups.stack.Configurator.createLayer(Configurator.java:434) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.stack.Configurator.createProtocols(Configurator.java:388) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:55) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.stack..Configurator.setupProtocolStack(Configurator.java:88) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.stackProtocolStack.setup(ProtocolStack.java:465) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.JChannel.init(JChannel.java:786) [jgroups-3.6.1.Final.jar:3.6.1.Final]
at org.jgroups.JChannel.
at org.jboss.as.clustering.jgroups.MuxChannel.
at org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:77)
at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:70)
... 5 more
It's a jboss thread, but from the 4th last line we see it's calling the jgroups-3.6.1.Final.jar.
jgroups-3.6.1.Final.jar is packaged in our own custom module - com/xxxxxxxx/yyy/zzzz/sdk/infinispan/7.1.1.Final. And the jgroups shipped with JBoss is org/jgroups/main/jgroups-3.2.13.Final-redhat-1.jar.
Environment
Red Hat JBoss Enterprise Application Platform 6.4.0_CP06
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
