[jboss-jira] [JBoss JIRA] (WFLY-4968) ClassNotFoundException sun.misc.Unsafe from Module "io.netty:main" when connection from different WildFly instance

Carlos Martins (Jira) issues at jboss.org
Wed Nov 21 08:00:05 EST 2018


    [ https://issues.jboss.org/browse/WFLY-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13664550#comment-13664550 ] 

Carlos Martins commented on WFLY-4968:
--------------------------------------

[~mnovak]

hi Miroslav. 

Thank you for your message.

It’s been a long time, I moved to another job are am not using Wildfly at the moment.
So I can’t answer your question, sorry.

Kind regards
Carlos


> ClassNotFoundException sun.misc.Unsafe from Module "io.netty:main" when connection from different WildFly instance
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-4968
>                 URL: https://issues.jboss.org/browse/WFLY-4968
>             Project: WildFly
>          Issue Type: Bug
>          Components: JMS
>    Affects Versions: 8.2.0.Final
>         Environment: WildFly 8.2.Final on AIX
>            Reporter: Carlos Martins
>            Assignee: Jason Greene
>            Priority: Major
>
> My instance configures the messaging section for HornetQ which is supposed to accept external connections in the following manner:
> {code:xml}
>         <subsystem xmlns="urn:jboss:domain:messaging:2.0">
>             <hornetq-server>
>                 <persistence-enabled>true</persistence-enabled>
>                 <security-enabled>false</security-enabled>
>                 <journal-file-size>102400</journal-file-size>
>                 <journal-min-files>2</journal-min-files>
>                 <connectors>
>                     <http-connector name="http-connector" socket-binding="http">
>                         <param key="http-upgrade-endpoint" value="http-acceptor"/>
>                     </http-connector>
>                     <http-connector name="http-connector-throughput" socket-binding="http">
>                         <param key="http-upgrade-endpoint" value="http-acceptor-throughput"/>
>                         <param key="batch-delay" value="50"/>
>                     </http-connector>
>                     <in-vm-connector name="in-vm" server-id="0"/>
>                 </connectors>
>                 <acceptors>
>                     <http-acceptor http-listener="default" name="http-acceptor"/>
>                     <http-acceptor http-listener="default" name="http-acceptor-throughput">
>                         <param key="batch-delay" value="50"/>
>                         <param key="direct-deliver" value="false"/>
>                     </http-acceptor>
>                     <netty-acceptor name="netty-norma" socket-binding="norma-jms-broker"/>
> 					<netty-acceptor name="netty-norma-throughput" socket-binding="norma-jms-broker-throughput">
> 						<param key="batch-delay" value="50"/>
> 					</netty-acceptor>
>                     <in-vm-acceptor name="in-vm" server-id="0"/>
>                 </acceptors>
>                 <security-settings>
>                     <security-setting match="#">
>                         <permission type="send" roles="guest"/>
>                         <permission type="consume" roles="guest"/>
>                         <permission type="createDurableQueue" roles="guest"/>
>                         <permission type="deleteDurableQueue" roles="guest"/>
>                         <permission type="createNonDurableQueue" roles="guest"/>
>                         <permission type="deleteNonDurableQueue" roles="guest"/>
>                     </security-setting>
>                 </security-settings>
>                 <address-settings>
>                     <address-setting match="#">
>                         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
>                         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
>                         <redelivery-delay>0</redelivery-delay>
>                         <max-size-bytes>10485760</max-size-bytes>
>                         <page-size-bytes>2097152</page-size-bytes>
>                         <address-full-policy>PAGE</address-full-policy>
>                         <message-counter-history-day-limit>10</message-counter-history-day-limit>
>                     </address-setting>
>                 </address-settings>
>                 <jms-connection-factories>
>                     <connection-factory name="InVmConnectionFactory">
>                         <connectors>
>                             <connector-ref connector-name="in-vm"/>
>                         </connectors>
>                         <entries>
>                             <entry name="java:/ConnectionFactory"/>
>                         </entries>
>                     </connection-factory>
>                     <connection-factory name="RemoteConnectionFactory">
>                         <connectors>
>                             <connector-ref connector-name="http-connector"/>
>                         </connectors>
>                         <entries>
>                             <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
>                         </entries>
>                     </connection-factory>
>                     <connection-factory name="DurableSubscribersConnectionFactory">
>                         <connectors>
>                             <connector-ref connector-name="http-connector"/>
>                         </connectors>
>                         <entries>
>                             <entry name="java:/DurableSubscribersConnectionFactory"/>
>                             <entry name="java:jboss/exported/DurableSubscribersConnectionFactory"/>
>                         </entries>
>                     </connection-factory>
>                     <pooled-connection-factory name="hornetq-ra">
>                         <transaction mode="xa"/>
>                         <connectors>
>                             <connector-ref connector-name="in-vm"/>
>                         </connectors>
>                         <entries>
>                             <entry name="java:/JmsXA"/>
>                             <entry name="java:jboss/DefaultJMSConnectionFactory"/>
>                         </entries>
>                     </pooled-connection-factory>
>                 </jms-connection-factories>
>                 <jms-destinations>
>                     <jms-topic name="SunsetEventsTopic">
>                         <entry name="jms/topic/SunsetEventsTopic"/>
>                         <entry name="java:jboss/exported/jms/topic/SunsetEventsTopic"/>
>                     </jms-topic>
>                 </jms-destinations>
>             </hornetq-server>
>         </subsystem>
> {code}
> and
> {code:xml}
>     <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
>         <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
>         <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
>         <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
>         <socket-binding name="http" port="${jboss.http.port:8080}"/>
>         <socket-binding name="https" port="${jboss.https.port:8443}"/>
>         <socket-binding name="txn-recovery-environment" port="4712"/>
>         <socket-binding name="txn-status-manager" port="4713"/>
>         <!-- CONNECT TO IBM HORNETQ BROKER -->
>         <socket-binding name="norma-jms-broker" port="${norma.broker.port:5445}"/>
>         <socket-binding name="norma-jms-broker-throughput" port="${norma.broker.port:5445}"/>
>     </socket-binding-group>
> {code}
> Throws the following exception when a different WildFly instance tries to connect to this HornetQ:
> {code}
> 2015-07-15 18:43:41,223 WARNING [io.netty.channel.ChannelOutboundBuffer] (Thread-1 (hornetq-netty-threads--170443211)) Failed to release a message.: java.lang.NoClassDefFoundError: sun.misc.Unsafe
>         at io.netty.util.internal.PlatformDependent.freeDirectBuffer(PlatformDependent.java:234) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.buffer.UnpooledDirectByteBuf.freeDirect(UnpooledDirectByteBuf.java:112) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.buffer.UnpooledDirectByteBuf.deallocate(UnpooledDirectByteBuf.java:596) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:120) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:68) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.ChannelOutboundBuffer.safeRelease(ChannelOutboundBuffer.java:509) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:268) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.nio.AbstractNioByteChannel.doWrite(AbstractNioByteChannel.java:216) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:231) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:682) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:283) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:651) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelPipeline$HeadHandler.flush(DefaultChannelPipeline.java:1038) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelHandlerContext.invokeFlush(DefaultChannelHandlerContext.java:675) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelHandlerContext.flush(DefaultChannelHandlerContext.java:656) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.ChannelDuplexHandler.flush(ChannelDuplexHandler.java:117) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelHandlerContext.invokeFlush(DefaultChannelHandlerContext.java:675) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelHandlerContext.access$1600(DefaultChannelHandlerContext.java:29) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.DefaultChannelHandlerContext$WriteTask.run(DefaultChannelHandlerContext.java:908) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.15.Final.jar:4.0.15.Final]
>         at java.lang.Thread.run(Thread.java:853) [vm.jar:1.7.0]
> Caused by: java.lang.ClassNotFoundException: sun.misc.Unsafe from [Module "io.netty:main" from local module loader @7be7a114 (finder: local module finder @4861e893 (roots: /norma/wildfly/modules,/norma/wildfly/modules/system/layers/base))]
>         at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
>         at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
>         at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
>         at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
>         at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
>         ... 23 more
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list