If you run netty in an applicationserver it may happen that we detect com.sun.Unsafe on the start but are not allowed to use it later. So we see something like this:
java.lang.NoClassDefFoundError: Could not initialize class org.jboss.netty.util.internal.LinkedTransferQueue
We should just catch it and use the LegacyLinkedTransferQueue in such cases as a fallback
Fallback to LegacyLinkedTransferQueue if using LinkedTransferQueue fa…
…ils. See #268
The same issue may also effect OSGI deployments
caught this issue when running an osgi app from IDEA with felix container (ClassNotFoundException: sun.misc.Unsafe not found by org.jboss.netty)
After checking the netty sources, found the workaround: -Dorg.jboss.netty.tryUnsafe=false (to IDEA launch configuration)
@yetanothercoder which version ?
3.5.1, more details: http://www.yetanothercoder.ru/2012/07/netty-35xx-from-osgi-may-get.html
@yetanothercoder ok but it should still work even without set the property as it failback to non unsafe use. See also the log message. Anyway setting the property can't harm I guess :)
should, it may be an IDEA issue only, will check on other environments this week, thanks!