You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pavel B (JIRA)" <ji...@apache.org> on 2013/05/17 18:59:16 UTC

[jira] [Created] (FELIX-4068) Restarting Felix from Web Console throwing a NullPointerException and wouldn't restart (2 fixes/work-arounds required in org.apache.felix.framework.BundleRevisionImpl)

Pavel B created FELIX-4068:
------------------------------

             Summary: Restarting Felix from Web Console throwing a NullPointerException and wouldn't restart (2 fixes/work-arounds required in org.apache.felix.framework.BundleRevisionImpl)
                 Key: FELIX-4068
                 URL: https://issues.apache.org/jira/browse/FELIX-4068
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: framework-4.0.0
         Environment: I am running OSGi Felix 4.2.0, and when re-starting from Web console - following error created for pax-web-jetty-bundle-2.1.2.jar
java.lang.NullPointerException
                at org.apache.felix.framework.BundleRevisionImpl.getResourceLocal(BundleRevisionImpl.java:498)
                at org.apache.felix.framework.Felix.getBundleResource(Felix.java:1595)
                at org.apache.felix.framework.BundleImpl.getResource(BundleImpl.java:639)
                at org.ops4j.pax.swissbox.core.BundleClassLoader.findResource(BundleClassLoader.java:210)
                at org.ops4j.pax.swissbox.core.BundleClassLoader.getResource(BundleClassLoader.java:142)
                at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1193)
                at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)
                at java.security.AccessController.doPrivileged(Native Method)
                at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)
                at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)
                at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
                at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
                at org.ops4j.util.xml.ElementHelper.getRootElement(ElementHelper.java:68)
                at org.ops4j.pax.web.service.internal.DefaultPropertyResolver.getDefaltProperties(DefaultPropertyResolver.java:64)
                at org.ops4j.pax.web.service.internal.DefaultPropertyResolver.<init>(DefaultPropertyResolver.java:55)
                at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:289)
                at org.ops4j.pax.web.service.internal.Activator$4.run(Activator.java:258)
                at org.ops4j.pax.web.service.internal.Executor$Future.run(Executor.java:45)
                at org.ops4j.pax.web.service.internal.Executor$Worker.run(Executor.java:122)

Following is the set of my bundles:
cd /Felix/felix-framework-4.2.0
java -Dorg.osgi.framework.bootdelegation=sun.misc -jar bin/felix.jar

install file:bin/logging/slf4j-api-1.7.2.jar
install file:bin/logging/logback-core-1.0.9.jar
install file:bin/logging/logback-classic-1.0.9.jar

install file:bin/console/org.apache.felix.configadmin-1.6.0.jar

install file:bin/base/pax-web-jetty-bundle-2.1.2.jar
install file:bin/base/commons-io-2.4.jar
install file:bin/base/commons-codec-1.7.jar
install file:bin/base/commons-collections-3.2.1.jar
install file:bin/base/commons-httpclient-3.1.0.jar
install file:bin/base/commons-fileupload-1.2.2.jar
install file:bin/base/commons-logging-1.1.1.jar
install file:bin/base/org.ow2.chameleon.commons.json-20090911-0002.jar

install file:bin/console/org.apache.felix.webconsole-4.0.0.jar
install file:bin/console/org.apache.felix.metatype-1.0.6.jar
install file:bin/console/org.apache.felix.log-1.0.1.jar

            Reporter: Pavel B


Same fix/work-around in 2 methods of class: org.apache.felix.framework.BundleRevisionImpl
    URL getResourceLocal(String name)
    Enumeration getResourcesLocal(String name)

Instead of:                if (contentPath.get(i).hasEntry(name))
Should be:                if (contentPath.get(i) != null && contentPath.get(i).hasEntry(name))


--
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