users@glassfish.java.net

Re: Failure to deploy a webapp / NEP in ResolverImpl.permutateIfNeeded

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Wed, 04 May 2011 09:45:50 -0400

Not that it makes a difference in this case, but GF 3.1 uses Felix
framework 3.0.8...

Overall, this sounds like a bug in the Felix resolver, but without a
better understanding I cannot say for sure I understand why it is
getting into this situation. I have not seen an NPE at this point in the
resolver code before.

I will try to investigate the code on my end. Perhaps you could open up
a GF bug report on this. Additionally, if there is any way you can help
me recreate the issue, that would greatly assist in getting to the root
cause of the issue and a proper fix.

Thanks.

-> richard

On 5/4/11 8:33, forums_at_java.net wrote:
> I am facing a strange error preventing my webapp to deploy on Glassfish
> 3.1.0/windows/JDK1.6.
> There are multiple 3rd party OSGi services deployed as well. The webbapp
> uses SCR and resource injection
> to obtain some of these but the deployment breaks, in case those
> services
> are installed as well. Any explanation
> on this error message and its possible cause is highly appreciated:
>
> [#|2011-05-04T14:26:55.857+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-1;|Exception
>
> while deploying the app [webda]|#]
> [#|2011-05-04T14:26:55.857+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-1;|The
>
> log message is null.
> java.lang.NullPointerException
> at
> org.apache.felix.framework.resolver.ResolverImpl.permutateIfNeeded(ResolverImpl.java:1140)
>
> at
> org.apache.felix.framework.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1066)
>
> at
> org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:176)
>
> at
> org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4100)
> at
> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1412)
>
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
>
> at
> org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>
> When looking into ResolverImpl#permutateIfNeeded() method of the used
> felix-version 3.0.9 the NEP
> is thrown when accessing the (service?) capability set:
>
> Set<Capability> candidates = candidateMap.get(req);
> if (candidates.size() > 1) // <- bang
>
> Thank you very much
> Jaro
>
>
> --
>
> [Message sent by forum member 'jpullmann']
>
> View Post: http://forums.java.net/node/798063
>
>