Fix for Netty wiring issue after 4.0 bump.
- After updating Netty 4.0 version,
we sometimes see java.lang.NoClassDefFoundError: io/netty/util/internal/TypeParameterMatcher
with backtrace insisting there's some dynamic class resolution inside Netty.
It might be side-effect of recent native-epoll support inside karaf?
https://github.com/netty/netty/issues/5119
- Add DynamicImport-Package for io.netty to allow deferred wiring
http://felix.apache.org/documentation/tutorials-examples-and-presentations/apache-felix-osgi-faq.html#how-to-provide-optional-services
- Add a way to pass DynamicImport-Package on BUCK build
Change-Id: I50ec3400e940c56fb52563d84659ebb30c302235
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index ecdb88c..e5e4b0a 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -103,6 +103,7 @@
description = '',
debug = False,
import_packages = '*',
+ dynamicimport_packages = '',
export_packages = '*',
package_name_root = 'org.onosproject',
include_resources = NONE,
@@ -169,6 +170,7 @@
"'%s'" % export_packages, #packages to export
include_resources, #custom includes to classpath
web_context, #web context (REST API only)
+ "'%s'" % dynamicimport_packages, #DynamicImport-Package
description, #description
)