felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: NoClassDefFoundError after update, caused by NPE in BundleRevisionImpl.calculateContentPath ?
Date Thu, 09 Aug 2012 10:19:15 GMT
Hi

I would assume you need to call PackageAdmin.refreshPackages() after updating the bundles,
such that all providers and consumers get to know the latest updates.

If you just to Bundle.update the call to PackageAdmin.refreshPackages must also be done explicitly.
If you are using installation tools such as File Install this call would be done automatically
by the installation tool along with updating the bundles.

Regards
Felix

Am 09.08.2012 um 11:59 schrieb Dan Gravell:

> Hi all. I'm getting some NoClassDefFoundErrors and other exceptions/errors
> after updating some bundles. The bundles work fine before. Restarting Felix
> clears the problem (no more NCDFE) and the newly updating bundles work fine
> once again.
> 
> I'd like to be able to support updating while running, if possible.
> 
> Here's a sample stacktrace:
> 
> 2012-08-09 10:44:56,095 [ERROR]  Error while executing
> AutomaticFixerCoverArtCommand (AggregatedPolic
> yCommand.java:65, thread policy pool 0)
> java.lang.ExceptionInInitializerError
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.dimensionsOf(CoverArtUtils.java
> :163)
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.openImageDimension(CoverArtUtil
> s.java:187)
>        [...]
> Caused by: java.lang.NullPointerException
>        at
> org.apache.felix.framework.BundleRevisionImpl.getResourcesLocal(BundleRevisionImpl.java:510)
>        at
> org.apache.felix.framework.BundleWiringImpl.findResourcesByDelegation(BundleWiringImpl.java:1127)
>        at
> org.apache.felix.framework.BundleWiringImpl.getResourcesByDelegation(BundleWiringImpl.java:1037)
>        at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5.getResources(BundleWiringImpl.java:1778)
>        at
> org.eclipse.jetty.osgi.boot.internal.webapp.OSGiWebappClassLoader.getResources(OSGiWebappClassLoader.java:115)
>        at
> java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:340)
>        at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:432)
>        at
> javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:206)
>        at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
>        at
> javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
>        at javax.imageio.ImageIO.<clinit>(ImageIO.java:64)
> 
> 2012-08-09 10:44:57,061 [ERROR]  Error while executing
> AutomaticFixerCoverArtCommand (AggregatedPolicyCommand.java:65, thread
> policy pool 1)
> java.lang.NoClassDefFoundError: Could not initialize class
> javax.imageio.ImageIO
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.dimensionsOf(CoverArtUtils.java:163)
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.openImageDimension(CoverArtUtils.java:187)
>        [... no caused by trace here...]
> 
> Immediately before that I get something I only see once I enable Felix
> debug logging:
> 
> ERROR: Bundle com.elsten.bliss.ui [34] Unable to get module class path.
> (java.lang.NullPointerExcepti
> on)
> java.lang.NullPointerException
>        at
> org.apache.felix.framework.BundleRevisionImpl.calculateContentPath(BundleRevisionImpl.java
> :410)
>        at
> org.apache.felix.framework.BundleRevisionImpl.initializeContentPath(BundleRevisionImpl.jav
> a:347)
>        at
> org.apache.felix.framework.BundleRevisionImpl.getContentPath(BundleRevisionImpl.java:333)
>        at
> org.apache.felix.framework.BundleRevisionImpl.getResourcesLocal(BundleRevisionImpl.java:49
> 3)
>        at
> org.apache.felix.framework.BundleWiringImpl.findResourcesByDelegation(BundleWiringImpl.jav
> a:1127)
>        at
> org.apache.felix.framework.BundleWiringImpl.getResourcesByDelegation(BundleWiringImpl.java
> :1037)
>        at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5.getResources(BundleWiri
> ngImpl.java:1778)
>        at
> org.eclipse.jetty.osgi.boot.internal.webapp.OSGiWebappClassLoader.getResources(OSGiWebappC
> lassLoader.java:115)
>        at
> java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:340)
>        at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:432)
>        at
> javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:206)
>        at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
>        at
> javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
>        at javax.imageio.ImageIO.<clinit>(ImageIO.java:64)
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.dimensionsOf(CoverArtUtils.java
> :163)
>        at
> com.elsten.bliss.music.policy.coverartpolicy.CoverArtUtils.openImageDimension(CoverArtUtil
> s.java:187)
> 
> There are many of these NCDFEs but only one of those NPEs in
> BundleRevisionImpl. Once those have been thrown, "all hell seems to break
> loose" and I start getting NCDFEs for other classes including my own. Does
> the original exception cause these downstream ones or are they unrelated?
> 
> During the update the Import-Package statements for javax.imageio.* remain
> stable.
> 
> Let me know if more contextual logs are useful. I can provide the actual
> code that's running if it helps (it's large though).
> 
> Dan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message