Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4340

Flex iPOJO online manipulator error if metadata.xml file not supplied

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ipojo-manipulator-1.11.0
    • ipojo-manipulator-1.11.1
    • iPOJO
    • None

    Description

      iPOJO online manipulator will throw NullPointer exception if no metadata.xml file supplied, by URL or in the jar:

      g! start ipojo:file:./example9.jar
      Processing URL : ipojo:file:./example9.jar
      Extracted URL : file:./example9.jar
      1834 bytes copied
      Metadata file not found, use annotations only.
      I Apache Felix iPOJO Manipulator - 1.11.0
      org.osgi.framework.BundleException: Unable to cache bundle: ipojo:file:./example9.jar
      at org.apache.felix.framework.Felix.installBundle(Felix.java:2870)
      at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
      at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
      at org.apache.felix.gogo.command.Basic.start(Basic.java:724)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      at org.apache.felix.gogo.shell.Console.run(Console.java:62)
      at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
      at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
      at org.apache.felix.ipojo.online.manipulator.IPOJOURLHandler.__M_openConnection(IPOJOURLHanler.java:144)
      at org.apache.felix.ipojo.online.manipulator.IPOJOURLHandler.openConnection(IPOJOURLHandlerjava)
      at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openConnection(URLHandlersStreaHandlerProxy.java:271)
      at java.net.URL.openConnection(Unknown Source)
      at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:150)
      at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
      at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.ava:878)
      at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
      at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
      at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
      at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
      ... 32 more
      java.lang.NullPointerException

      It should be optional, since metadata can be defined by annotations.

      Workaround is supply an empty metadata.xml file with content:

      <ipojo/>

      Attachments

        Activity

          People

            clement.escoffier Clement Escoffier
            wayen.zhang@263.net Wayne Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: