<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Done a comparaison between beanTypes
resolved when running a junit test using weld 2.1.0.Final +
DeltaSpike + camel vs Weld 2.1.0.Final + Camel + PaxCDI on Karaf
and it appears that my class CamelContextBean is not listed. This
is why I get a NPE. So I supect again a classloading issue when
WeldContainer loads the classes of a bundle including also classes
to be imported from another bundle ....<br>
<br>
<meta charset="utf-8">
<a href="https://gist.github.com/7384007" target="_blank"
style="color: rgb(17, 85, 204); font-family: arial, sans-serif;
font-size: 12.727272033691406px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">https://gist.github.com/<wbr>7384007</a><br>
<br>
On 08/11/13 19:15, Charles Moulliard wrote:<br>
</div>
<blockquote cite="mid:527D2A57.6070002@redhat.com" type="cite">FYI
<br>
<br>
<br>
-------- Original Message --------
<br>
Subject: Issue with weld 2.1.0.Final on OSGI
<br>
Date: Fri, 08 Nov 2013 19:11:59 +0100
<br>
From: Charles Moulliard <a class="moz-txt-link-rfc2396E" href="mailto:cmoulliard@redhat.com"><cmoulliard@redhat.com></a>
<br>
To: <a class="moz-txt-link-abbreviated" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a>, Antoine Sabot-Durand
<a class="moz-txt-link-rfc2396E" href="mailto:asabotdu@redhat.com"><asabotdu@redhat.com></a>, Jason Porter
<a class="moz-txt-link-rfc2396E" href="mailto:jporter@redhat.com"><jporter@redhat.com></a>, Peter Muir <a class="moz-txt-link-rfc2396E" href="mailto:pmuir@redhat.com"><pmuir@redhat.com></a>
<br>
<br>
<br>
<br>
Hi,
<br>
<br>
The following code which is working fine and returns a bean when
we run
<br>
Junit Test with DeltaSpike does not work when Weld 2.1.0.Final is
<br>
deployed on Karaf (OSGI v4.3) with Pax-CDI. Apparently the bean is
not
<br>
retrieved when we call "beanManager.getBeans("
<br>
<br>
<br>
protected CamelContext getCamelContext(String context,
BeanManager
<br>
beanManager) {
<br>
if (camelContextMap == null) {
<br>
Set<Bean<?>> beans =
<br>
beanManager.getBeans(CamelContextMap.class, new AnyLiteral()); //
return
<br>
null
<br>
Bean<?> bean = beanManager.resolve(beans); //
return null
<br>
CreationalContext<?> creationalContext =
<br>
beanManager.createCreationalContext(bean);
<br>
camelContextMap = (CamelContextMap)
<br>
beanManager.getReference(bean, bean.getBeanClass(),
creationalContext);
<br>
ObjectHelper.notNull(camelContextMap, "Could not
resolve
<br>
CamelContextMap");
<br>
}
<br>
return camelContextMap.getCamelContext(context);
<br>
}
<br>
<br>
Question : How does WeldContainer loads the class when we use
getBeans
<br>
as I suspect that we have a problem with the classloader used ?
<br>
<br>
Regards,
<br>
<br>
Charles
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>