JBoss Community

Netty + Google protobuf causing class loader issue?

created by Michael Erdmann in JBoss Web Services - View the full discussion

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

the netty part can be found in  the package site.boavista.view.jboss.

 

Regards

   /Michael

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community