Results 1 to 4 of 4

Thread: problems resolving import

  1. #1
    Join Date
    Oct 2008
    Posts
    0

    Default problems resolving import

    I started with the spring travel sample and then I created two new bundles in that project (working in Eclipse).
    One has Export-Package and the other Import-Package for the same package.
    I receive an error saying that the bundle cannot be resolved (on the import).

    I'm not sure if I'm clear on how bundle resolution works with AP tools.
    From what I understand, bundles specifying the same target runtime should be visible to each other. Is that correct?
    Is there something else that affects bundle resolution?

    Everything else within the project works properly.

  2. #2
    Join Date
    Oct 2008
    Posts
    0

    Default problems resolving import

    Okay, I think it's the same problem as posted here

    http://www.springsource.com/beta/applicationplatform/comments.php?DiscussionID=291&page=1

  3. #3
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default problems resolving import

    Hi kryptolus,

    > I started with the spring travel sample and then I created two new
    > bundles in that project (working in Eclipse).
    > One has Export-Package and the other Import-Package for the same
    > package. I receive an error saying that the bundle cannot be resolved
    > (on the import).
    >
    > I'm not sure if I'm clear on how bundle resolution works with AP tools.
    > From what I understand, bundles specifying the same target runtime
    > should be visible to each other. Is that correct?

    No, that's not necessarily true.

    The AP tools have two mechanisms for configuring dependencies on other bundles.

    1) PAR: if the bundles are configured as part of the same PAR, they will see each other's package exports.

    2) Independent bundles: bundles which you deploy the to Platform independently (i.e., stand-alone and thus not within a PAR) need to include their bundle dependencies as "Project References" within Eclipse.

    Note: "Project References" are NOT the same as having the other project on your Eclipse classpath. Rather, you need to explicitly add the dependent project to the "Project References" section of the project's Properties dialog.

    Hope this answers your questions,

    Sam

  4. #4
    Join Date
    Oct 2008
    Posts
    0

    Default problems resolving import

    I figured it out right as you posted the answer... I didn't add the new bundles to the PAR so they couldn't find each other.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •