You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Wayne Zhang (JIRA)" <ji...@apache.org> on 2013/12/04 06:06:35 UTC

[jira] [Created] (FELIX-4340) Flex iPOJO online manipulator error if metadata.xml file not supplied

Wayne Zhang created FELIX-4340:
----------------------------------

             Summary: Flex iPOJO online manipulator error if metadata.xml file not supplied
                 Key: FELIX-4340
                 URL: https://issues.apache.org/jira/browse/FELIX-4340
             Project: Felix
          Issue Type: Bug
          Components: iPOJO
    Affects Versions: ipojo-manipulator-1.11.0
            Reporter: Wayne Zhang


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



--
This message was sent by Atlassian JIRA
(v6.1#6144)