Announcement Announcement Module
Collapse
No announcement yet.
Cannot import a package more than once "org.richfaces.component" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot import a package more than once "org.richfaces.component"

    I created a very simple SpringSource AP Bundle Project in Eclipse com.test.web, and import RichFaces library. The MANIFEST.MF is

    Manifest-Version: 1.0
    Bundle-Version: 1.0.0
    Bundle-Name: Web Bundle
    Bundle-Description: TEST
    Bundle-SymbolicName: com.test.web
    Import-Library: org.richfaces;version="3.1.4.GA"
    Platform-ModuleType: Web
    Web-ContextPath: test

    Two richfaces bundles are automatically added to bundle dependencies. Very cool.

    But when run the project in SpringSource AP Server inside Eclipse, got
    org.osgi.framework.BundleException: Cannot import a package more than once "org.richfaces.component"

    The log:

    [2008-05-27 21:59:35.627] nection(4)-192.168.0.100 <SPFF0002I> Wrote dump file "D:SpringS2APspringsource-ap-1.0.0.beta4serviceabilitydump2008-05-27_21-59-31.dump"
    com.springsource.platform.deployer.core.FatalDeplo ymentException: Unable to install bundle from module 'file [D:SpringS2APspringsource-ap-1.0.0.beta4workcom.springsource.platform.deployerM odulecom.test.web.jar-0com.test.web.war]'.
    at com.springsource.platform.deployer.core.module.Sta ndardModule.install(StandardModule.java:217)
    ...
    Caused by: org.osgi.framework.BundleException: Cannot import a package more than once "org.richfaces.component"
    at org.eclipse.osgi.internal.resolver.StateBuilder.ch eckImportExportSyntax(StateBuilder.java:533)
    ...

    Both com.springsource.org.richfaces-3.1.4.GA.jar and com.springsource.org.richfaces-impl-3.1.4.GA.jar export package org.richfaces.component with same version 3.1.4.GA, and seems that caused problem in OSGi container.

    If remove Import-Library and try to import this package directly
    Import-Package: org.richfaces.component;version="3.1.4.GA"

    Eclipse reports error:
    Multiple package exports found for org.richfaces.component [3.1.4.GA, ?) found

    I'm using S2AP 1.0.0beta4. Did anyone get RichFaces library working before? Thanks.

  • #2
    Cannot import a package more than once "org.richfaces.component"

    Hi,

    This looks like a problem with the RichFaces bundles that are in the Enterprise Bundle Repository. Both the richfaces and the richfaces-impl bundles export the org.richfaces.component package, i.e. the package is split across the two bundles.

    I've opened an issue to address this: http://issuetracker.springsource.com/browse/BRITS-53

    Regards,
    Andy

    Comment


    • #3
      Cannot import a package more than once "org.richfaces.component"

      One solution to this problem in the interim is to make the richfaces-impl bundle a fragment of the richfaces bundle. This way the split package will not cause a problem.

      Rob

      Comment

      Working...
      X