Announcement Announcement Module
Collapse
No announcement yet.
Bundle name and version? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bundle name and version?

    Hi,

    I have dropped a jar file in the 'pickup' directory with the following in MANIFEST.MF:

    Code:
    Bundle-SymbolicName: dk.smaas.platform
    Bundle-Version: 1.0.0
    I would expect the bundle to be deployed with that name and version, so I can use

    Code:
    Import-Bundle: dk.smaas.platform; version="[1.0.0,1.0.0]"
    But instead the bundle seems to be deployed as the jar filename and 0.0.0 - that is "smaas-platform.jar_0.0.0".

    What am I missing?

    Thanks,

    dennis

  • #2
    But instead the bundle seems to be deployed as the jar filename and 0.0.0 - that is "smaas-platform.jar_0.0.0".
    Could you please post the fragment output of "ss" command in OSGi console that displays your bundle?
    Sample:
    Code:
    44	ACTIVE      smaas-platform.jar_0.0.0
    And then also the output of "headers <bundle-id>" command

    Comment


    • #3
      More info

      ss output:

      Code:
      69	ACTIVE      smaas-platform.jar_0.0.0
      headers output:

      Code:
      osgi> headers smaas-platform.jar
      Bundle headers:
       Bundle-ManifestVersion = 2
       Bundle-SymbolicName = smaas-platform.jar
       Class-Path = log4j-1.2.14.jar spring-core-2.5.5.jar spring-beans-2.5.5.jar jcl-over-slf4j-1.5.2.jar mina-core-2.0.0-M3.jar slf4j-log4j12-1.5.2.jar slf4j-api-1.5.2.jar ftpserver-core-1.0.0-M3.jar ftplet-api-1.0.0-M3.jar commons-vfs-1.0.jar lucene-core-2.3.0.jar hibernate-annotations.jar commons-logging-1.1.1.jar slf4j-api-1.5.2.jar hibernate3.jar dom4j-1.6.1.jar javassist-3.4.GA.jar hibernate-validator.jar hibernate-commons-annotations.jar hibernate-entitymanager.jar jta-1.1.jar hibernate-search.jar commons-collections-3.1.jar antlr-2.7.6.jar hibernate-cglib-repack-2.1_3.jar ejb3-persistence.jar javaee.jar jstl-1.2.jar jstl.jar standard.jar postgresql-8.3-603.jdbc4.jar spring.jar commons-dbcp.jar slf4j-log4j12-1.5.0.jar slf4j-api-1.5.0.jar log4j-1.2.15.jar commons-pool.jar spring-aop.jar cglib-nodep-2.1_3.jar asm-2.2.3.jar asm-commons-2.2.3.jar asm-util-2.2.3.jar
       Created-By = IntelliJ IDEA
       Import-Package = com.springsource.server.kernel.dm
       Manifest-Version = 1.0
       Module-Type = Bundle
      But note that MANIFEST.MF contains this:

      Code:
      Manifest-Version: 1.0
      Bundle-ManifestVersion: 2
      Bundle-Name: SmaaS Platform
      Bundle-SymbolicName: dk.smaas.platform
      Bundle-Version: 1.0.0
      Bundle-Vendor: Geysir IT
      Export-Package: dk.smaas.platform

      Comment


      • #4
        I reproduced this problem on dm Server v1.0.2.

        There seems to be a bug in dm Server's manifest parsing logic, or possibly even the JRE manifest parser. If my cut and paste from above post is character-accurate, the header:

        Bundle-ManifestVersion: 2

        ends with an ASCII CR (carriage return) character with hex value 0D. This is an acceptable newline delimiter according to the JAR file specification.

        I changed this so that the header ended with an ASCII LF (linefeed) character with hex value 0A and the manifest was parsed properly.

        Please would you raise a JIRA issue and attach a JAR to reproduce the problem (I could do it but then you wouldn't be notified when it's fixed)? Meanwhile, try ensuring you end each line with a LF or a CR+LF combination.

        Comment


        • #5
          Thanks for the help. I'll raise the issue.

          -dennis

          Comment


          • #6
            is it possible this has regressed in 2.x? I see similar behaviour on Linux - every bundle I create is deployed under the name of the JAR file with a 0.0.0 version. Every entry in every bundle's manifest is ignored (and consequently not much is working for me!)

            This happens in 2.0.0-M6 and the latest nightly snapshot (2.0.0-CI485)
            Last edited by davison; Nov 22nd, 2009, 02:40 PM.

            Comment


            • #7
              There may have been a recent regression, but I am not aware of anyone changing the manifest parsing area recently.

              Please could you open a new JIRA defect against 2.0.0.M6 (and include a link to your earlier defect for reference)? Please provide a simple binary bundle that will reproduce the problem.

              Comment

              Working...
              X