[jboss-user] [JBoss Web Services] - Netty + Google protobuf causing class loader issue?

Michael Erdmann do-not-reply at jboss.com
Fri Dec 28 05:50:00 EST 2012


Michael Erdmann [https://community.jboss.org/people/merdmann] created the discussion

"Netty + Google protobuf  causing class loader issue?"

To view the discussion, visit: https://community.jboss.org/message/785191#785191

--------------------------------------------------------------
Hallo,

i am trying to use netty together with google protbuf in order to implememt a server running on the Jboss 7.1.
When the client connects to the server i get the following exception:

1:10:34,810 WARNING [org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink] (New I/O server boss #64 ([id: 0x035e9313, /0.0.0.0:8887])) Failed to accept a connection.: *java.lang.NoClassDefFoundError: com/google/protobuf/ExtensionRegistryLite*
          at site.boavista.jboss.view.NettyServer$1.getPipeline(NettyServer.java:65) [classes:]
          at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.registerAcceptedChannel(NioServerSocketPipelineSink.java:276) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:246) [netty-3.2.6.Final.jar:]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
          at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: java.lang.ClassNotFoundException: com.google.protobuf.ExtensionRegistryLite from [Module "org.jboss.netty:main" from local module loader @781f6226 (roots: /opt/jboss-as-7.1.1.Final/modules)]
          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
          ... 6 more

The exception indicates that the class loader does not see the protobuf jar i am deploying together with my application code. Is there amy
way to make my libraries kown to the server class loader?

I have put the sources here:
 https://github.com/merdmann/MyCommunityJBoss https://github.com/merdmann/MyCommunityJBoss
the netty part can be found in  the package site.boavista.view.jboss.

Regards
   /Michael
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/785191#785191]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121228/f7ebbdbc/attachment-0001.html 


More information about the jboss-user mailing list