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

framework.resolver.ResolverImpl.toStringBlame throws NullPointerException on jBPM-bpmn2 5.3.0.Final activator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: framework-3.0.9
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Karaf 2.2.8
      Ubuntu 11.10 64-bit
      java version "1.6.0_31"
      Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

      Description

      Reference:

      This is probably partially an issue with jBPM-bpmn2 5.3.0.Final bundle activator, however the error message given by Felix is also not very helpful.

      registering core  services
      core services registered
      registering compiler services
      compiler services registered
      registering api services
      registering api : org.drools.io.impl.ResourceFactoryServiceImpl@2484e723 : interface org.drools.io.ResourceFactoryService
      registering api : org.drools.marshalling.impl.MarshallerProviderImpl@ea211cf : interface org.drools.marshalling.MarshallerProvider
      registering api : org.drools.impl.KnowledgeBaseFactoryServiceImpl@37dc299 : interface org.drools.KnowledgeBaseFactoryService
      registering api : org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl@1e5003f6 : interface org.drools.builder.KnowledgeBuilderFactoryService
      registering api : org.drools.marshalling.impl.MarshallerProviderImpl@ea211cf : interface org.drools.marshalling.MarshallerProvider
      api drools services registered
      registering api : org.jbpm.process.instance.ProcessRuntimeFactoryServiceImpl@4208719e : interface org.drools.runtime.process.ProcessRuntimeFactoryService
      registering compiler : org.jbpm.process.instance.ProcessRuntimeFactoryServiceImpl@4208719e : interface org.drools.runtime.process.ProcessRuntimeFactoryService
      registering api : org.jbpm.marshalling.impl.ProcessMarshallerFactoryServiceImpl@725bcf3a : interface org.drools.marshalling.impl.ProcessMarshallerFactoryService
      registering api : org.jbpm.process.builder.ProcessBuilderFactoryServiceImpl@4ca49360 : interface org.drools.compiler.ProcessBuilderFactoryService
      ERROR: Bundle org.jbpm.bpmn2 [293] Error starting mvn:org.jbpm/jbpm-bpmn2/5.3.0.Final (org.osgi.framework.BundleException: Activator start error in bundle org.jbpm.bpmn2 [293].)
      java.lang.NullPointerException
              at org.apache.felix.framework.resolver.ResolverImpl.toStringBlame(ResolverImpl.java:1583)
              at org.apache.felix.framework.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1007)
              at org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:171)
              at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4103)
              at org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1412)
              at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
              at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
              at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
              at org.jbpm.osgi.bpmn2.Activator.start(Activator.java:35)
              at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
              at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)
              at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)
              at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
              at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
              at java.lang.Thread.run(Thread.java:679)
      

      Sometimes I have a better error:

      012-07-15 16:09:19,774 | ERROR | rint Extender: 1 | BlueprintContainerImpl           | 9 - org.apache.aries.blueprint - 0.3.2 | Unable to start blueprint container for bundle com.soluvas.com.soluvas.process.shell
      org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instanciating bean bpmRepo of class class com.soluvas.process.shell.OsgiBpmRepository
              at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:271)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:708)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:631)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:337)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:230)[9:org.apache.aries.blueprint:0.3.2]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.6.0_23]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.6.0_23]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.6.0_23]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)[:1.6.0_23]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)[:1.6.0_23]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.6.0_23]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.6.0_23]
              at java.lang.Thread.run(Thread.java:679)[:1.6.0_23]
      Caused by: java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.compiler.BPMN2ProcessProvider'
              at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:162)
              at org.drools.compiler.BPMN2ProcessFactory.loadProvider(BPMN2ProcessFactory.java:28)
              at org.drools.compiler.BPMN2ProcessFactory.getBPMN2ProcessProvider(BPMN2ProcessFactory.java:20)
              at org.drools.compiler.BPMN2ProcessFactory.configurePackageBuilder(BPMN2ProcessFactory.java:11)
              at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:687)
              at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:45)
              at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34)
              at com.soluvas.process.shell.OsgiBpmRepository.<init>(OsgiBpmRepository.java:28)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.6.0_23]
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)[:1.6.0_23]
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.6.0_23]
              at java.lang.reflect.Constructor.newInstance(Constructor.java:532)[:1.6.0_23]
              at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:257)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:842)[9:org.apache.aries.blueprint:0.3.2]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:269)[9:org.apache.aries.blueprint:0.3.2]
              ... 15 more
      Caused by: java.lang.IllegalArgumentException: Unable to instantiate 'org.jbpm.bpmn2.BPMN2ProcessProviderImpl'
              at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:213)
              at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:205)
              at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:160)
              ... 29 more
      Caused by: java.lang.NullPointerException
              at org.apache.felix.framework.resolver.ResolverImpl.toStringBlame(ResolverImpl.java:1583)
              at org.apache.felix.framework.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:924)
              at org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:171)
              at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4103)
              at org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1412)
              at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:734)
              at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
              at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)[:1.6.0_23]
              at java.lang.Class.forName0(Native Method)[:1.6.0_23]
              at java.lang.Class.forName(Class.java:186)[:1.6.0_23]
              at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:210)
              ... 31 more
      

      In Karaf 2.2.8, dev:show-tree is also not working (but I'll file this bug separately on KARAF) :

      2012-07-15 14:10:48,870 | INFO  | l Console Thread | Console                          | 36 - org.apache.karaf.shell.console - 2.2.8 | Exception caught while executing command
      java.lang.ArrayIndexOutOfBoundsException: 18
              at org.apache.karaf.shell.dev.util.Import.split(Import.java:144)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.dev.util.Import.parse(Import.java:104)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.dev.ShowBundleTree.createNodesForImports(ShowBundleTree.java:136)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.dev.ShowBundleTree.createTree(ShowBundleTree.java:128)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.dev.ShowBundleTree.doExecute(ShowBundleTree.java:58)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.dev.AbstractBundleCommand.doExecute(AbstractBundleCommand.java:61)[18:org.apache.karaf.shell.dev:2.2.8]
              at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[36:org.apache.karaf.shell.console:2.2.8]
              at org.apache.karaf.shell.console.jline.Console.run(Console.java:166)[36:org.apache.karaf.shell.console:2.2.8]
              at java.lang.Thread.run(Thread.java:679)[:1.6.0_23]
      

        Issue Links

          Activity

          Hide
          rickhall Richard S. Hall added a comment -

          The system packages extra should be commented out, but we already made a mod to support it being blank in FELIX-3372 for 4.2.0.

          Not sure about this latter issue. Looks like you are using an older OSGi API JAR than what is required for 4.0.x.

          Show
          rickhall Richard S. Hall added a comment - The system packages extra should be commented out, but we already made a mod to support it being blank in FELIX-3372 for 4.2.0. Not sure about this latter issue. Looks like you are using an older OSGi API JAR than what is required for 4.0.x.
          Hide
          ceefour Hendy Irawan added a comment -

          I've removed comments from jre.properties. I think it improves things, but same error.

          The culprit is this in config.properties :

          org.osgi.framework.system.packages.extra=

          If I comment it, it doesn't complain about the zero-length package. Should I file it as a bug?

          But even with that commented, I still get the (numerous) :

          ERROR: Bundle com.wikindonesia.com.wikindonesia.brand [335] Error starting jardir:mework.Bundle.adapt(Ljava/lang/Class;)Ljava/lang/Object;)
          java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/Class;)Lja
                  at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getFragme
                  at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.ja
                  at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819)
                  at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
                  at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
                  at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLe
                  at java.lang.Thread.run(Thread.java:679)
          

          Should I file it as a Felix 4.0.3 bug or is this one an intentional incompatibility with Karaf 2.2/Felix 3.x ?

          Show
          ceefour Hendy Irawan added a comment - I've removed comments from jre.properties. I think it improves things, but same error. The culprit is this in config.properties : org.osgi.framework.system.packages.extra= If I comment it, it doesn't complain about the zero-length package. Should I file it as a bug? But even with that commented, I still get the (numerous) : ERROR: Bundle com.wikindonesia.com.wikindonesia.brand [335] Error starting jardir:mework.Bundle.adapt(Ljava/lang/ Class ;)Ljava/lang/ Object ;) java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/ Class ;)Lja at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getFragme at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.ja at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819) at org.apache.felix.framework.Felix.startBundle(Felix.java:1868) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLe at java.lang. Thread .run( Thread .java:679) Should I file it as a Felix 4.0.3 bug or is this one an intentional incompatibility with Karaf 2.2/Felix 3.x ?
          Hide
          rickhall Richard S. Hall added a comment -

          Sorry, didn't really look closely enough. I'm not sure how this was being handled previously, but the commented out sections in your property value are not being left out of the value (i.e., you are getting "# blah" in your value). Not sure if they were being ignored before or not, but since we just use the Properties class for reading these files, I'd guess that it doesn't respect comments in the middle of a line continuation.

          We did specifically add a check at some point to throw an exception for an empty package (we didn't previously do this), so maybe before you just didn't notice that your system bundle any issues because we just didn't report anything.

          For example, if I modify my config properties to included comments on the system.packages.extra property, my system bundle ends up exporting stuff like:

          osgi.wiring.package; foo 0.0.0 [UNUSED]
          osgi.wiring.package; bar 0.0.0 [UNUSED]
          osgi.wiring.package; # baz 0.0.0 [UNUSED]
          osgi.wiring.package; woz 0.0.0 [UNUSED]

          So, perhaps the advice is, don't use comments in line-continued values for Properties. See if that helps.

          Show
          rickhall Richard S. Hall added a comment - Sorry, didn't really look closely enough. I'm not sure how this was being handled previously, but the commented out sections in your property value are not being left out of the value (i.e., you are getting "# blah" in your value). Not sure if they were being ignored before or not, but since we just use the Properties class for reading these files, I'd guess that it doesn't respect comments in the middle of a line continuation. We did specifically add a check at some point to throw an exception for an empty package (we didn't previously do this), so maybe before you just didn't notice that your system bundle any issues because we just didn't report anything. For example, if I modify my config properties to included comments on the system.packages.extra property, my system bundle ends up exporting stuff like: osgi.wiring.package; foo 0.0.0 [UNUSED] osgi.wiring.package; bar 0.0.0 [UNUSED] osgi.wiring.package; # baz 0.0.0 [UNUSED] osgi.wiring.package; woz 0.0.0 [UNUSED] So, perhaps the advice is, don't use comments in line-continued values for Properties. See if that helps.
          Hide
          ceefour Hendy Irawan added a comment -

          I'm not really sure what "no package" means.

          Here's the jre.properties (Karaf's jre.properties.cxf file) : (only the jre-1.6 since it's the JRE that I use)

          # Standard package set.  Note that:
          #   - javax.transaction* is exported with a mandatory attribute
          jre-1.6= \
           javax.accessibility, \
          # javax.activation, \
           javax.activity, \
          # javax.annotation;version="1.1", \
           javax.annotation.processing;version="1.1", \
           javax.crypto, \
           javax.crypto.interfaces, \
           javax.crypto.spec, \
           javax.imageio, \
           javax.imageio.event, \
           javax.imageio.metadata, \
           javax.imageio.plugins.bmp, \
           javax.imageio.plugins.jpeg, \
           javax.imageio.spi, \
           javax.imageio.stream, \
          # javax.jws, \
          # javax.jws.soap, \
           javax.lang.model, \
           javax.lang.model.element, \
           javax.lang.model.type, \
           javax.lang.model.util, \
           javax.management, \
           javax.management.loading, \
           javax.management.modelmbean, \
           javax.management.monitor, \
           javax.management.openmbean, \
           javax.management.relation, \
           javax.management.remote, \
           javax.management.remote.rmi, \
           javax.management.timer, \
           javax.naming, \
           javax.naming.directory, \
           javax.naming.event, \
           javax.naming.ldap, \
           javax.naming.spi, \
           javax.net, \
           javax.net.ssl, \
           javax.print, \
           javax.print.attribute, \
           javax.print.attribute.standard, \
           javax.print.event, \
           javax.rmi, \
           javax.rmi.CORBA, \
           javax.rmi.ssl, \
           javax.script, \
           javax.security.auth, \
           javax.security.auth.callback, \
           javax.security.auth.kerberos, \
           javax.security.auth.login, \
           javax.security.auth.spi, \
           javax.security.auth.x500, \
           javax.security.cert, \
           javax.security.sasl, \
           javax.sound.midi, \
           javax.sound.midi.spi, \
           javax.sound.sampled, \
           javax.sound.sampled.spi, \
           javax.sql, \
           javax.sql.rowset, \
           javax.sql.rowset.serial, \
           javax.sql.rowset.spi, \
           javax.swing, \
           javax.swing.border, \
           javax.swing.colorchooser, \
           javax.swing.event, \
           javax.swing.filechooser, \
           javax.swing.plaf, \
           javax.swing.plaf.basic, \
           javax.swing.plaf.metal, \
           javax.swing.plaf.multi, \
           javax.swing.plaf.synth, \
           javax.swing.table, \
           javax.swing.text, \
           javax.swing.text.html, \
           javax.swing.text.html.parser, \
           javax.swing.text.rtf, \
           javax.swing.tree, \
           javax.swing.undo, \
           javax.tools, \
           javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \
           javax.xml, \
          # javax.xml.bind, \
          # javax.xml.bind.annotation, \
          # javax.xml.bind.annotation.adapters, \
          # javax.xml.bind.attachment, \
          # javax.xml.bind.helpers, \
          # javax.xml.bind.util, \
           javax.xml.crypto, \
           javax.xml.crypto.dom, \
           javax.xml.crypto.dsig, \
           javax.xml.crypto.dsig.dom, \
           javax.xml.crypto.dsig.keyinfo, \
           javax.xml.crypto.dsig.spec, \
           javax.xml.datatype, \
           javax.xml.namespace, \
           javax.xml.parsers, \
          # javax.xml.soap, \
          # javax.xml.stream, \
          # javax.xml.stream.events, \
          # javax.xml.stream.util, \
           javax.xml.transform, \
           javax.xml.transform.dom, \
           javax.xml.transform.sax, \
           javax.xml.transform.stax, \
           javax.xml.transform.stream, \
           javax.xml.validation, \
          # javax.xml.ws, \
          # javax.xml.ws.handler, \
          # javax.xml.ws.handler.soap, \
          # javax.xml.ws.http, \
          # javax.xml.ws.soap, \
          # javax.xml.ws.spi, \
           javax.xml.ws.wsaddressing, \
           javax.xml.xpath, \
           org.ietf.jgss, \
           org.omg.CORBA, \
           org.omg.CORBA_2_3, \
           org.omg.CORBA_2_3.portable, \
           org.omg.CORBA.DynAnyPackage, \
           org.omg.CORBA.ORBPackage, \
           org.omg.CORBA.portable, \
           org.omg.CORBA.TypeCodePackage, \
           org.omg.CosNaming, \
           org.omg.CosNaming.NamingContextExtPackage, \
           org.omg.CosNaming.NamingContextPackage, \
           org.omg.Dynamic, \
           org.omg.DynamicAny, \
           org.omg.DynamicAny.DynAnyFactoryPackage, \
           org.omg.DynamicAny.DynAnyPackage, \
           org.omg.IOP, \
           org.omg.IOP.CodecFactoryPackage, \
           org.omg.IOP.CodecPackage, \
           org.omg.Messaging, \
           org.omg.PortableInterceptor, \
           org.omg.PortableInterceptor.ORBInitInfoPackage, \
           org.omg.PortableServer, \
           org.omg.PortableServer.CurrentPackage, \
           org.omg.PortableServer.POAManagerPackage, \
           org.omg.PortableServer.POAPackage, \
           org.omg.PortableServer.portable, \
           org.omg.PortableServer.ServantLocatorPackage, \
           org.omg.SendingContext, \
           org.omg.stub.java.rmi, \
           org.omg.stub.javax.management.remote.rmi, \
           org.w3c.dom, \
           org.w3c.dom.bootstrap, \
           org.w3c.dom.css, \
           org.w3c.dom.events, \
           org.w3c.dom.html, \
           org.w3c.dom.ls, \
           org.w3c.dom.ranges, \
           org.w3c.dom.stylesheets, \
           org.w3c.dom.traversal, \
           org.w3c.dom.views, \
           org.w3c.dom.xpath, \
           org.xml.sax, \
           org.xml.sax.ext, \
           org.xml.sax.helpers
          

          They're all named packages, no "default" package.

          The relevant part of config.properties :

          org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \
           org.osgi.framework.launch; version=1.0.0, \
           org.osgi.framework.hooks.service; version=1.0.0, \
           org.osgi.service.packageadmin; version=1.2.0, \
           org.osgi.service.startlevel; version=1.1.0, \
           org.osgi.service.url; version=1.0.0, \
           org.osgi.util.tracker; version=1.4.0, \
           org.apache.karaf.jaas.boot; version=2.2.8, \
           org.apache.karaf.version; version=2.2.8, \
           ${jre-${java.specification.version}}
          
          org.osgi.framework.system.packages.extra=
          
          Show
          ceefour Hendy Irawan added a comment - I'm not really sure what "no package" means. Here's the jre.properties (Karaf's jre.properties.cxf file) : (only the jre-1.6 since it's the JRE that I use) # Standard package set. Note that: # - javax.transaction* is exported with a mandatory attribute jre-1.6= \ javax.accessibility, \ # javax.activation, \ javax.activity, \ # javax.annotation;version= "1.1" , \ javax.annotation.processing;version= "1.1" , \ javax.crypto, \ javax.crypto.interfaces, \ javax.crypto.spec, \ javax.imageio, \ javax.imageio.event, \ javax.imageio.metadata, \ javax.imageio.plugins.bmp, \ javax.imageio.plugins.jpeg, \ javax.imageio.spi, \ javax.imageio.stream, \ # javax.jws, \ # javax.jws.soap, \ javax.lang.model, \ javax.lang.model.element, \ javax.lang.model.type, \ javax.lang.model.util, \ javax.management, \ javax.management.loading, \ javax.management.modelmbean, \ javax.management.monitor, \ javax.management.openmbean, \ javax.management.relation, \ javax.management.remote, \ javax.management.remote.rmi, \ javax.management.timer, \ javax.naming, \ javax.naming.directory, \ javax.naming.event, \ javax.naming.ldap, \ javax.naming.spi, \ javax.net, \ javax.net.ssl, \ javax.print, \ javax.print.attribute, \ javax.print.attribute.standard, \ javax.print.event, \ javax.rmi, \ javax.rmi.CORBA, \ javax.rmi.ssl, \ javax.script, \ javax.security.auth, \ javax.security.auth.callback, \ javax.security.auth.kerberos, \ javax.security.auth.login, \ javax.security.auth.spi, \ javax.security.auth.x500, \ javax.security.cert, \ javax.security.sasl, \ javax.sound.midi, \ javax.sound.midi.spi, \ javax.sound.sampled, \ javax.sound.sampled.spi, \ javax.sql, \ javax.sql.rowset, \ javax.sql.rowset.serial, \ javax.sql.rowset.spi, \ javax.swing, \ javax.swing.border, \ javax.swing.colorchooser, \ javax.swing.event, \ javax.swing.filechooser, \ javax.swing.plaf, \ javax.swing.plaf.basic, \ javax.swing.plaf.metal, \ javax.swing.plaf.multi, \ javax.swing.plaf.synth, \ javax.swing.table, \ javax.swing.text, \ javax.swing.text.html, \ javax.swing.text.html.parser, \ javax.swing.text.rtf, \ javax.swing.tree, \ javax.swing.undo, \ javax.tools, \ javax.transaction; javax.transaction.xa; partial= true ; mandatory:=partial, \ javax.xml, \ # javax.xml.bind, \ # javax.xml.bind.annotation, \ # javax.xml.bind.annotation.adapters, \ # javax.xml.bind.attachment, \ # javax.xml.bind.helpers, \ # javax.xml.bind.util, \ javax.xml.crypto, \ javax.xml.crypto.dom, \ javax.xml.crypto.dsig, \ javax.xml.crypto.dsig.dom, \ javax.xml.crypto.dsig.keyinfo, \ javax.xml.crypto.dsig.spec, \ javax.xml.datatype, \ javax.xml.namespace, \ javax.xml.parsers, \ # javax.xml.soap, \ # javax.xml.stream, \ # javax.xml.stream.events, \ # javax.xml.stream.util, \ javax.xml.transform, \ javax.xml.transform.dom, \ javax.xml.transform.sax, \ javax.xml.transform.stax, \ javax.xml.transform.stream, \ javax.xml.validation, \ # javax.xml.ws, \ # javax.xml.ws.handler, \ # javax.xml.ws.handler.soap, \ # javax.xml.ws.http, \ # javax.xml.ws.soap, \ # javax.xml.ws.spi, \ javax.xml.ws.wsaddressing, \ javax.xml.xpath, \ org.ietf.jgss, \ org.omg.CORBA, \ org.omg.CORBA_2_3, \ org.omg.CORBA_2_3.portable, \ org.omg.CORBA.DynAnyPackage, \ org.omg.CORBA.ORBPackage, \ org.omg.CORBA.portable, \ org.omg.CORBA.TypeCodePackage, \ org.omg.CosNaming, \ org.omg.CosNaming.NamingContextExtPackage, \ org.omg.CosNaming.NamingContextPackage, \ org.omg.Dynamic, \ org.omg.DynamicAny, \ org.omg.DynamicAny.DynAnyFactoryPackage, \ org.omg.DynamicAny.DynAnyPackage, \ org.omg.IOP, \ org.omg.IOP.CodecFactoryPackage, \ org.omg.IOP.CodecPackage, \ org.omg.Messaging, \ org.omg.PortableInterceptor, \ org.omg.PortableInterceptor.ORBInitInfoPackage, \ org.omg.PortableServer, \ org.omg.PortableServer.CurrentPackage, \ org.omg.PortableServer.POAManagerPackage, \ org.omg.PortableServer.POAPackage, \ org.omg.PortableServer.portable, \ org.omg.PortableServer.ServantLocatorPackage, \ org.omg.SendingContext, \ org.omg.stub.java.rmi, \ org.omg.stub.javax.management.remote.rmi, \ org.w3c.dom, \ org.w3c.dom.bootstrap, \ org.w3c.dom.css, \ org.w3c.dom.events, \ org.w3c.dom.html, \ org.w3c.dom.ls, \ org.w3c.dom.ranges, \ org.w3c.dom.stylesheets, \ org.w3c.dom.traversal, \ org.w3c.dom.views, \ org.w3c.dom.xpath, \ org.xml.sax, \ org.xml.sax.ext, \ org.xml.sax.helpers They're all named packages, no "default" package. The relevant part of config.properties : org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \ org.osgi.framework.launch; version=1.0.0, \ org.osgi.framework.hooks.service; version=1.0.0, \ org.osgi.service.packageadmin; version=1.2.0, \ org.osgi.service.startlevel; version=1.1.0, \ org.osgi.service.url; version=1.0.0, \ org.osgi.util.tracker; version=1.4.0, \ org.apache.karaf.jaas.boot; version=2.2.8, \ org.apache.karaf.version; version=2.2.8, \ ${jre-${java.specification.version}} org.osgi.framework.system.packages.extra=
          Hide
          rickhall Richard S. Hall added a comment -

          If you really are trying to export something that has no package, then it is intentional. OSGi doesn't support the default package.

          Show
          rickhall Richard S. Hall added a comment - If you really are trying to export something that has no package, then it is intentional. OSGi doesn't support the default package.
          Hide
          ceefour Hendy Irawan added a comment -

          Thank you Richard.

          One question, the latest Felix is 4.0.3, however if I replace Karaf 2.2.8 with Felix framework 4.0.3, Karaf cannot start at all:

          ERROR: Error parsing system bundle export statement: org.osgi.framework; version=1.5.0, org.osgi.framework.launch; version=1.0.0, org.osgi.framework.hooks.service; version=1.0.0, org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.startlevel; version=1.1.0, org.osgi.service.url; version=1.0.0, org.osgi.util.tracker; version=1.4.0, org.apache.karaf.jaas.boot; version=2.2.8, org.apache.karaf.version; version=2.2.8, javax.accessibility, # javax.activation, javax.activity, # javax.annotation;version="1.1", javax.annotation.processing;version="1.1", javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.imageio, javax.imageio.event, javax.imageio.metadata, javax.imageio.plugins.bmp, javax.imageio.plugins.jpeg, javax.imageio.spi, javax.imageio.stream, # javax.jws, # javax.jws.soap, javax.lang.model, javax.lang.model.element, javax.lang.model.type, javax.lang.model.util, javax.management, javax.management.loading, javax.management.modelmbean, javax.management.monitor, javax.management.openmbean, javax.management.relation, javax.management.remote, javax.management.remote.rmi, javax.management.timer, javax.naming, javax.naming.directory, javax.naming.event, javax.naming.ldap, javax.naming.spi, javax.net, javax.net.ssl, javax.print, javax.print.attribute, javax.print.attribute.standard, javax.print.event, javax.rmi, javax.rmi.CORBA, javax.rmi.ssl, javax.script, javax.security.auth, javax.security.auth.callback, javax.security.auth.kerberos, javax.security.auth.login, javax.security.auth.spi, javax.security.auth.x500, javax.security.cert, javax.security.sasl, javax.sound.midi, javax.sound.midi.spi, javax.sound.sampled, javax.sound.sampled.spi, javax.sql, javax.sql.rowset, javax.sql.rowset.serial, javax.sql.rowset.spi, javax.swing, javax.swing.border, javax.swing.colorchooser, javax.swing.event, javax.swing.filechooser, javax.swing.plaf, javax.swing.plaf.basic, javax.swing.plaf.metal, javax.swing.plaf.multi, javax.swing.plaf.synth, javax.swing.table, javax.swing.text, javax.swing.text.html, javax.swing.text.html.parser, javax.swing.text.rtf, javax.swing.tree, javax.swing.undo, javax.tools, javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, javax.xml, # javax.xml.bind, # javax.xml.bind.annotation, # javax.xml.bind.annotation.adapters, # javax.xml.bind.attachment, # javax.xml.bind.helpers, # javax.xml.bind.util, javax.xml.crypto, javax.xml.crypto.dom, javax.xml.crypto.dsig, javax.xml.crypto.dsig.dom, javax.xml.crypto.dsig.keyinfo, javax.xml.crypto.dsig.spec, javax.xml.datatype, javax.xml.namespace, javax.xml.parsers, # javax.xml.soap, # javax.xml.stream, # javax.xml.stream.events, # javax.xml.stream.util, javax.xml.transform, javax.xml.transform.dom, javax.xml.transform.sax, javax.xml.transform.stax, javax.xml.transform.stream, javax.xml.validation, # javax.xml.ws, # javax.xml.ws.handler, # javax.xml.ws.handler.soap, # javax.xml.ws.http, # javax.xml.ws.soap, # javax.xml.ws.spi, javax.xml.ws.wsaddressing, javax.xml.xpath, org.ietf.jgss, org.omg.CORBA, org.omg.CORBA_2_3, org.omg.CORBA_2_3.portable, org.omg.CORBA.DynAnyPackage, org.omg.CORBA.ORBPackage, org.omg.CORBA.portable, org.omg.CORBA.TypeCodePackage, org.omg.CosNaming, org.omg.CosNaming.NamingContextExtPackage, org.omg.CosNaming.NamingContextPackage, org.omg.Dynamic, org.omg.DynamicAny, org.omg.DynamicAny.DynAnyFactoryPackage, org.omg.DynamicAny.DynAnyPackage, org.omg.IOP, org.omg.IOP.CodecFactoryPackage, org.omg.IOP.CodecPackage, org.omg.Messaging, org.omg.PortableInterceptor, org.omg.PortableInterceptor.ORBInitInfoPackage, org.omg.PortableServer, org.omg.PortableServer.CurrentPackage, org.omg.PortableServer.POAManagerPackage, org.omg.PortableServer.POAPackage, org.omg.PortableServer.portable, org.omg.PortableServer.ServantLocatorPackage, org.omg.SendingContext, org.omg.stub.java.rmi, org.omg.stub.javax.management.remote.rmi, org.w3c.dom, org.w3c.dom.bootstrap, org.w3c.dom.css, org.w3c.dom.events, org.w3c.dom.html, org.w3c.dom.ls, org.w3c.dom.ranges, org.w3c.dom.stylesheets, org.w3c.dom.traversal, org.w3c.dom.views, org.w3c.dom.xpath, org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers, (org.osgi.framework.BundleException: Exported package names cannot be zero length.)
          org.osgi.framework.BundleException: Exported package names cannot be zero length.
                  at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:729)
                  at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:191)
                  at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:220)
                  at org.apache.felix.framework.Felix.<init>(Felix.java:374)
                  at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
                  at org.apache.karaf.main.Main.launch(Main.java:268)
                  at org.apache.karaf.main.Main.main(Main.java:429)
          ERROR: Bundle org.ops4j.pax.url.wrap [1] Error starting mvn:org.ops4j.pax.url/pax-url-wrap/1.2.8 (java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/Class;)Ljava/lang/Object;)
          java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/Class;)Ljava/lang/Object;
                  at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getFragments(StatefulResolver.java:1029)
                  at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:168)
                  at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819)
                  at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
                  at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
                  at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
                  at java.lang.Thread.run(Thread.java:679)
          ...(many more)...
          

          Is this an intentional incompatibility or is it a bug ?

          Show
          ceefour Hendy Irawan added a comment - Thank you Richard. One question, the latest Felix is 4.0.3, however if I replace Karaf 2.2.8 with Felix framework 4.0.3, Karaf cannot start at all: ERROR: Error parsing system bundle export statement: org.osgi.framework; version=1.5.0, org.osgi.framework.launch; version=1.0.0, org.osgi.framework.hooks.service; version=1.0.0, org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.startlevel; version=1.1.0, org.osgi.service.url; version=1.0.0, org.osgi.util.tracker; version=1.4.0, org.apache.karaf.jaas.boot; version=2.2.8, org.apache.karaf.version; version=2.2.8, javax.accessibility, # javax.activation, javax.activity, # javax.annotation;version= "1.1" , javax.annotation.processing;version= "1.1" , javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.imageio, javax.imageio.event, javax.imageio.metadata, javax.imageio.plugins.bmp, javax.imageio.plugins.jpeg, javax.imageio.spi, javax.imageio.stream, # javax.jws, # javax.jws.soap, javax.lang.model, javax.lang.model.element, javax.lang.model.type, javax.lang.model.util, javax.management, javax.management.loading, javax.management.modelmbean, javax.management.monitor, javax.management.openmbean, javax.management.relation, javax.management.remote, javax.management.remote.rmi, javax.management.timer, javax.naming, javax.naming.directory, javax.naming.event, javax.naming.ldap, javax.naming.spi, javax.net, javax.net.ssl, javax.print, javax.print.attribute, javax.print.attribute.standard, javax.print.event, javax.rmi, javax.rmi.CORBA, javax.rmi.ssl, javax.script, javax.security.auth, javax.security.auth.callback, javax.security.auth.kerberos, javax.security.auth.login, javax.security.auth.spi, javax.security.auth.x500, javax.security.cert, javax.security.sasl, javax.sound.midi, javax.sound.midi.spi, javax.sound.sampled, javax.sound.sampled.spi, javax.sql, javax.sql.rowset, javax.sql.rowset.serial, javax.sql.rowset.spi, javax.swing, javax.swing.border, javax.swing.colorchooser, javax.swing.event, javax.swing.filechooser, javax.swing.plaf, javax.swing.plaf.basic, javax.swing.plaf.metal, javax.swing.plaf.multi, javax.swing.plaf.synth, javax.swing.table, javax.swing.text, javax.swing.text.html, javax.swing.text.html.parser, javax.swing.text.rtf, javax.swing.tree, javax.swing.undo, javax.tools, javax.transaction; javax.transaction.xa; partial= true ; mandatory:=partial, javax.xml, # javax.xml.bind, # javax.xml.bind.annotation, # javax.xml.bind.annotation.adapters, # javax.xml.bind.attachment, # javax.xml.bind.helpers, # javax.xml.bind.util, javax.xml.crypto, javax.xml.crypto.dom, javax.xml.crypto.dsig, javax.xml.crypto.dsig.dom, javax.xml.crypto.dsig.keyinfo, javax.xml.crypto.dsig.spec, javax.xml.datatype, javax.xml.namespace, javax.xml.parsers, # javax.xml.soap, # javax.xml.stream, # javax.xml.stream.events, # javax.xml.stream.util, javax.xml.transform, javax.xml.transform.dom, javax.xml.transform.sax, javax.xml.transform.stax, javax.xml.transform.stream, javax.xml.validation, # javax.xml.ws, # javax.xml.ws.handler, # javax.xml.ws.handler.soap, # javax.xml.ws.http, # javax.xml.ws.soap, # javax.xml.ws.spi, javax.xml.ws.wsaddressing, javax.xml.xpath, org.ietf.jgss, org.omg.CORBA, org.omg.CORBA_2_3, org.omg.CORBA_2_3.portable, org.omg.CORBA.DynAnyPackage, org.omg.CORBA.ORBPackage, org.omg.CORBA.portable, org.omg.CORBA.TypeCodePackage, org.omg.CosNaming, org.omg.CosNaming.NamingContextExtPackage, org.omg.CosNaming.NamingContextPackage, org.omg.Dynamic, org.omg.DynamicAny, org.omg.DynamicAny.DynAnyFactoryPackage, org.omg.DynamicAny.DynAnyPackage, org.omg.IOP, org.omg.IOP.CodecFactoryPackage, org.omg.IOP.CodecPackage, org.omg.Messaging, org.omg.PortableInterceptor, org.omg.PortableInterceptor.ORBInitInfoPackage, org.omg.PortableServer, org.omg.PortableServer.CurrentPackage, org.omg.PortableServer.POAManagerPackage, org.omg.PortableServer.POAPackage, org.omg.PortableServer.portable, org.omg.PortableServer.ServantLocatorPackage, org.omg.SendingContext, org.omg.stub.java.rmi, org.omg.stub.javax.management.remote.rmi, org.w3c.dom, org.w3c.dom.bootstrap, org.w3c.dom.css, org.w3c.dom.events, org.w3c.dom.html, org.w3c.dom.ls, org.w3c.dom.ranges, org.w3c.dom.stylesheets, org.w3c.dom.traversal, org.w3c.dom.views, org.w3c.dom.xpath, org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers, (org.osgi.framework.BundleException: Exported package names cannot be zero length.) org.osgi.framework.BundleException: Exported package names cannot be zero length. at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:729) at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:191) at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:220) at org.apache.felix.framework.Felix.<init>(Felix.java:374) at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28) at org.apache.karaf.main.Main.launch(Main.java:268) at org.apache.karaf.main.Main.main(Main.java:429) ERROR: Bundle org.ops4j.pax.url.wrap [1] Error starting mvn:org.ops4j.pax.url/pax-url-wrap/1.2.8 (java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/ Class ;)Ljava/lang/ Object ;) java.lang.NoSuchMethodError: org.osgi.framework.Bundle.adapt(Ljava/lang/ Class ;)Ljava/lang/ Object ; at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getFragments(StatefulResolver.java:1029) at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:168) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819) at org.apache.felix.framework.Felix.startBundle(Felix.java:1868) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295) at java.lang. Thread .run( Thread .java:679) ...(many more)... Is this an intentional incompatibility or is it a bug ?
          Hide
          rickhall Richard S. Hall added a comment -

          Since this is fixed by a later version of the framework, then we should close this as not a problem. Reopen if you feel otherwise.

          Show
          rickhall Richard S. Hall added a comment - Since this is fixed by a later version of the framework, then we should close this as not a problem. Reopen if you feel otherwise.
          Hide
          ceefour Hendy Irawan added a comment -

          Workaround : Replacing Karaf's felix framework with felix.framework 3.2.2 solves the problem.

          Show
          ceefour Hendy Irawan added a comment - Workaround : Replacing Karaf's felix framework with felix.framework 3.2.2 solves the problem.

            People

            • Assignee:
              Unassigned
              Reporter:
              ceefour Hendy Irawan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development