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

https://issues.apache.org/jira/browse/DELTASPIKE-198

The code is not correct and should be :

@Override
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(),
filter,
qualifiers,
timeout);
// Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(),
// new Class[] {getBeanClass()},
// handler);

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

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: http://www.atlassian.com/software/jira