[jira] [Commented] (FELIX-3763) Add exception context information for java.lang.NullPointerException at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.jav
[ https://issues.apache.org/jira/browse/FELIX-3763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13508716#comment-13508716 ] Tomas Forsman commented on FELIX-3763: -- Related to https://issues.apache.org/jira/browse/FELIX-3477 Add exception context information for java.lang.NullPointerException at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432) --- Key: FELIX-3763 URL: https://issues.apache.org/jira/browse/FELIX-3763 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.0.3 Environment: Karaf Karaf version 2.3.0 Karaf home /home/ceefour/git/bippo-commerce5/karaf Karaf base /home/ceefour/git/bippo-commerce5/karaf OSGi Framework org.apache.felix.framework - 4.0.3 JVM Java Virtual MachineOpenJDK 64-Bit Server VM version 23.2-b09 Version 1.7.0_07 Vendor Oracle Corporation Uptime 7 minutes Total compile time 41.656 seconds Threads Live threads130 Daemon threads 115 Peak140 Total started 311 Memory Current heap size 145,684 kbytes Maximum heap size 466,048 kbytes Committed heap size 298,496 kbytes Pending objects 0 Garbage collector Name = 'PS Scavenge', Collections = 67, Time = 0.539 seconds Garbage collector Name = 'PS MarkSweep', Collections = 2, Time = 0.347 seconds Classes Current classes loaded 13,475 Total classes loaded13,477 Total classes unloaded 2 Operating system NameLinux version 3.2.0-32-generic Architectureamd64 Processors 8 Reporter: Hendy Irawan Sometimes it's possible to get Felix into an inconsistent state so that restart-ing a bundle will cause this Exception. Asking for a fix might be far and difficult, so if Felix can check for null and provide more detailed context information around this exception, it would be more helpful for app developers and also for future bug report in Felix. {code} 2012-11-16 17:09:33,546 | DEBUG | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 140 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Removing 2 EObjects provided by org.soluvas.web.nav.ui [2605] 2012-11-16 17:09:33,546 | DEBUG | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 161 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Removing Contributor org.soluvas.web.bootstrap.BootstrapPage/sidebarColumn:sidebarBlocks from org.soluvas.web.nav.ui [2605] 2012-11-16 17:09:33,546 | DEBUG | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 161 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Removing Contributor org.soluvas.web.bootstrap.BootstrapPage/navbar:navbarChild from org.soluvas.web.nav.ui [2605] 2012-11-16 17:09:33,546 | INFO | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 169 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Removed 2 EObjects from org.soluvas.web.nav.ui [2605] 2012-11-16 17:09:33,547 | DEBUG | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 172 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Notifying 12 contributors that bundle org.soluvas.web.nav.ui [2605] is removed 2012-11-16 17:09:33,547 | DEBUG | lixDispatchQueue | ui | ? ? | 2605 - org.soluvas.web.nav.ui - 1.0.0.SNAPSHOT | BundleEvent STOPPED - org.soluvas.web.nav.ui 2012-11-16 17:09:33,547 | INFO | l Console Thread | PaxWicketBundleListener | extender.PaxWicketBundleListener 40 | 2734 - org.ops4j.pax.wicket.service - 1.1.1 | org.soluvas.web.nav.ui is STARTED and relevant for pax wicket 2012-11-16 17:09:33,549 | DEBUG | l Console Thread | ComposeCatalogXmiTracker | compose.ComposeCatalogXmiTracker 65 | 2973 - org.soluvas.web.site - 1.0.0.SNAPSHOT | Getting org.soluvas.web.site.compose.ComposeCatalog from bundle://2605.129:0/org/soluvas/web/nav/ui/nav-ui.ComposeCatalog.xmi 2012-11-16 17:09:33,549 | DEBUG | l Console Thread | XmiObjectLoader | .soluvas.commons.XmiObjectLoader 87 | 2882 - org.soluvas.commons - 2.0.0.SNAPSHOT | Loading XMI from URI:
[jira] [Commented] (FELIX-3407) Imports are missed for generics
[ https://issues.apache.org/jira/browse/FELIX-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13501822#comment-13501822 ] Tomas Forsman commented on FELIX-3407: -- Is there a new version of bnd available? If so, when could this be available in the maven-bundle-plugin? Imports are missed for generics --- Key: FELIX-3407 URL: https://issues.apache.org/jira/browse/FELIX-3407 Project: Felix Issue Type: Bug Components: Maven Bundle Plugin Affects Versions: maven-bundle-plugin-2.3.7 Reporter: Tomas Forsman Attachments: example.zip The bundle plugin miss to add imports to classes/interfaces that are used in generic blocks due to type erasure. Consider the following (the code is in the attached zip): bundle-a: package example.a.one; public interface ExampleInterfaceAT extends ExampleInterfaceB { String getGreeting(T example); } package example.a.two; public interface ExampleInterfaceB { } bundle-b: package example.b.two; import example.a.two.ExampleInterfaceB; public interface ExampleImplementationB extends ExampleInterfaceB { } bundle-c: package example.c; import example.a.one.ExampleInterfaceA; import example.b.two.ExampleImplementationB; public interface ExampleExtendedInterfaceA extends ExampleInterfaceAExampleImplementationB { } package example.c; public class ExampleReferenceListener { public void register(final ExampleExtendedInterfaceA example) { } public void unregister(final ExampleExtendedInterfaceA example) { } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; reference-list id=exampleReferenceListener interface=example.c.ExampleExtendedInterfaceA availability=optional reference-listener bind-method=register unbind-method=unregister bean class=example.c.ExampleReferenceListener/ /reference-listener /reference-list /blueprint bundle-d: package example.d; import example.b.two.ExampleImplementationB; import example.c.ExampleExtendedInterfaceA; public class ExampleExtendedImplementation implements ExampleExtendedInterfaceA { public String getGreeting(final ExampleImplementationB example) { return Hello World; } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; bean id=exampleBean class=example.d.ExampleExtendedImplementation/ service id=exampleService interface=example.c.ExampleExtendedInterfaceA ref=exampleBean/ /blueprint Since the bundle plugin uses byte-code to find out which imports to add to the manifest, the bundle-c manifest look like this: Manifest-Version: 1.0 Bnd-LastModified: 1332925553008 Build-Jdk: 1.6.0_26 Built-By: tofo01 Bundle-ManifestVersion: 2 Bundle-Name: example.bundle-c Bundle-SymbolicName: example.bundle-c Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: example.c;uses:=example.a.one;version=1.0.0.SNAPSHOT Import-Package: example.a.one;version=[1.0,2),org.osgi.service.blueprint;version=[1.0.0,2.0.0) Import-Service: example.c.ExampleExtendedInterfaceA;multiple:=true;availability:=optional Tool: Bnd-1.50.0 The example.a.two package import is missing since type-erasure removes the generic part of ExampleInterfaceA in the bundle-c interface. This results in a NoClassDefFondError of example.a.two.ExampleInterfaceB from bundle-c when trying to deploy bundle-d. Error tracking new service reference java.lang.NoClassDefFoundError: example.a.two.ExampleInterfaceB not found by example.bundle-c [159] -- 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
[jira] [Commented] (FELIX-3195) Allow definition of multiple auto-deploy directories w/ run levels per directory
[ https://issues.apache.org/jira/browse/FELIX-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13285522#comment-13285522 ] Tomas Forsman commented on FELIX-3195: -- This would be a very good feature. Allow definition of multiple auto-deploy directories w/ run levels per directory Key: FELIX-3195 URL: https://issues.apache.org/jira/browse/FELIX-3195 Project: Felix Issue Type: Improvement Components: Main Distribution Affects Versions: framework-4.0.0 Environment: any Reporter: Andreas Schlosser Priority: Minor We put a slight addition into the launcher to get the bundle setup easier to handle. We added start levels to auto-deploy directory configurations; this allows you to configure multiple auto-deploy directories and have all of the bundles in a single directory deployed and started with the defined run level. This makes configuration easier compared to listing all bundles for each start level explicitly. We used the same syntax you already use for autostart, i.e. felix.auto.deploy.dir.N=/some/bundle/dir Maybe you want to consider adding this to the default distribution. The only change we did is really do add an additional loop into the AutoProcessor. In case you want to put it in maybe you want to add some more in there around auto-deploy actions per run level... -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3407) Imports are missed for generics
[ https://issues.apache.org/jira/browse/FELIX-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13285043#comment-13285043 ] Tomas Forsman commented on FELIX-3407: -- Perfect, thank you for taking your time to look in to it! If I've to report any more bugs I'll try to make the example more minimalistic and without blueprint. Imports are missed for generics --- Key: FELIX-3407 URL: https://issues.apache.org/jira/browse/FELIX-3407 Project: Felix Issue Type: Bug Components: Maven Bundle Plugin Affects Versions: maven-bundle-plugin-2.3.7 Reporter: Tomas Forsman Attachments: example.zip The bundle plugin miss to add imports to classes/interfaces that are used in generic blocks due to type erasure. Consider the following (the code is in the attached zip): bundle-a: package example.a.one; public interface ExampleInterfaceAT extends ExampleInterfaceB { String getGreeting(T example); } package example.a.two; public interface ExampleInterfaceB { } bundle-b: package example.b.two; import example.a.two.ExampleInterfaceB; public interface ExampleImplementationB extends ExampleInterfaceB { } bundle-c: package example.c; import example.a.one.ExampleInterfaceA; import example.b.two.ExampleImplementationB; public interface ExampleExtendedInterfaceA extends ExampleInterfaceAExampleImplementationB { } package example.c; public class ExampleReferenceListener { public void register(final ExampleExtendedInterfaceA example) { } public void unregister(final ExampleExtendedInterfaceA example) { } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; reference-list id=exampleReferenceListener interface=example.c.ExampleExtendedInterfaceA availability=optional reference-listener bind-method=register unbind-method=unregister bean class=example.c.ExampleReferenceListener/ /reference-listener /reference-list /blueprint bundle-d: package example.d; import example.b.two.ExampleImplementationB; import example.c.ExampleExtendedInterfaceA; public class ExampleExtendedImplementation implements ExampleExtendedInterfaceA { public String getGreeting(final ExampleImplementationB example) { return Hello World; } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; bean id=exampleBean class=example.d.ExampleExtendedImplementation/ service id=exampleService interface=example.c.ExampleExtendedInterfaceA ref=exampleBean/ /blueprint Since the bundle plugin uses byte-code to find out which imports to add to the manifest, the bundle-c manifest look like this: Manifest-Version: 1.0 Bnd-LastModified: 1332925553008 Build-Jdk: 1.6.0_26 Built-By: tofo01 Bundle-ManifestVersion: 2 Bundle-Name: example.bundle-c Bundle-SymbolicName: example.bundle-c Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: example.c;uses:=example.a.one;version=1.0.0.SNAPSHOT Import-Package: example.a.one;version=[1.0,2),org.osgi.service.blueprint;version=[1.0.0,2.0.0) Import-Service: example.c.ExampleExtendedInterfaceA;multiple:=true;availability:=optional Tool: Bnd-1.50.0 The example.a.two package import is missing since type-erasure removes the generic part of ExampleInterfaceA in the bundle-c interface. This results in a NoClassDefFondError of example.a.two.ExampleInterfaceB from bundle-c when trying to deploy bundle-d. Error tracking new service reference java.lang.NoClassDefFoundError: example.a.two.ExampleInterfaceB not found by example.bundle-c [159] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3407) Imports are missed for generics
[ https://issues.apache.org/jira/browse/FELIX-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13267009#comment-13267009 ] Tomas Forsman commented on FELIX-3407: -- On the row starting with const #5 there is a reference to example.b.two.ExampleImplementationB, this in turn extends the example.a.two.ExampleInterfaceB. Neither of those are imported in bundle-c. I don't know which one of the packages (or both) that must be imported for the example to work, but I can try it out if you like. Imports are missed for generics --- Key: FELIX-3407 URL: https://issues.apache.org/jira/browse/FELIX-3407 Project: Felix Issue Type: Bug Components: Maven Bundle Plugin Affects Versions: maven-bundle-plugin-2.3.7 Reporter: Tomas Forsman Attachments: example.zip The bundle plugin miss to add imports to classes/interfaces that are used in generic blocks due to type erasure. Consider the following (the code is in the attached zip): bundle-a: package example.a.one; public interface ExampleInterfaceAT extends ExampleInterfaceB { String getGreeting(T example); } package example.a.two; public interface ExampleInterfaceB { } bundle-b: package example.b.two; import example.a.two.ExampleInterfaceB; public interface ExampleImplementationB extends ExampleInterfaceB { } bundle-c: package example.c; import example.a.one.ExampleInterfaceA; import example.b.two.ExampleImplementationB; public interface ExampleExtendedInterfaceA extends ExampleInterfaceAExampleImplementationB { } package example.c; public class ExampleReferenceListener { public void register(final ExampleExtendedInterfaceA example) { } public void unregister(final ExampleExtendedInterfaceA example) { } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; reference-list id=exampleReferenceListener interface=example.c.ExampleExtendedInterfaceA availability=optional reference-listener bind-method=register unbind-method=unregister bean class=example.c.ExampleReferenceListener/ /reference-listener /reference-list /blueprint bundle-d: package example.d; import example.b.two.ExampleImplementationB; import example.c.ExampleExtendedInterfaceA; public class ExampleExtendedImplementation implements ExampleExtendedInterfaceA { public String getGreeting(final ExampleImplementationB example) { return Hello World; } } OSGI-INF/blueprint/services.xml ?xml version=1.0 encoding=UTF-8? blueprint xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; bean id=exampleBean class=example.d.ExampleExtendedImplementation/ service id=exampleService interface=example.c.ExampleExtendedInterfaceA ref=exampleBean/ /blueprint Since the bundle plugin uses byte-code to find out which imports to add to the manifest, the bundle-c manifest look like this: Manifest-Version: 1.0 Bnd-LastModified: 1332925553008 Build-Jdk: 1.6.0_26 Built-By: tofo01 Bundle-ManifestVersion: 2 Bundle-Name: example.bundle-c Bundle-SymbolicName: example.bundle-c Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: example.c;uses:=example.a.one;version=1.0.0.SNAPSHOT Import-Package: example.a.one;version=[1.0,2),org.osgi.service.blueprint;version=[1.0.0,2.0.0) Import-Service: example.c.ExampleExtendedInterfaceA;multiple:=true;availability:=optional Tool: Bnd-1.50.0 The example.a.two package import is missing since type-erasure removes the generic part of ExampleInterfaceA in the bundle-c interface. This results in a NoClassDefFondError of example.a.two.ExampleInterfaceB from bundle-c when trying to deploy bundle-d. Error tracking new service reference java.lang.NoClassDefFoundError: example.a.two.ExampleInterfaceB not found by example.bundle-c [159] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira