Defect detected when testing weld osgi on Apache Karaf 2.3 and Felix 4.0.3

The code is not correct and should be :

public Object create(CreationalContext creationalContext) {
logger.trace("Entering OSGiServiceBean : create() with parameter");
try {
BundleContext context = ctx;
if (context == null) { context = FrameworkUtil.getBundle(injectionPoint.getMember() .getDeclaringClass()).getBundleContext(); }
DynamicServiceHandler handler =
new DynamicServiceHandler(context,
((Class) type).getName(),
// Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(),
// new Class[] {getBeanClass()},
// handler);

Object proxy = Proxy.newProxyInstance(getBeanClass().getClassLoader(),
new Class[] {getBeanClass()},

With this modification the problem is solved.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: