You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Rajini Sivaram (JIRA)" <tu...@ws.apache.org> on 2008/03/18 18:07:26 UTC

[jira] Closed: (TUSCANY-2086) implementation.osgi cannot find compomentType file when referring to bundles in Eclipse Workspace

     [ https://issues.apache.org/jira/browse/TUSCANY-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajini Sivaram closed TUSCANY-2086.
-----------------------------------

    Resolution: Fixed

> implementation.osgi cannot find compomentType file when referring to bundles in Eclipse Workspace
> -------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2086
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2086
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA OSGi Integration
>         Environment: Windows XP, Eclipse 3.3.2 (org.eclipse.osgi 3.3.2)
>            Reporter: Jürgen Schumacher
>            Assignee: Rajini Sivaram
>             Fix For: Java-SCA-1.2
>
>         Attachments: tuscany-equinox-runtime.patch, tuscany.osgi.sample.launch.zip, tuscany.osgi.sample.zip
>
>
> This issue refers to activities described in http://mail-archives.apache.org/mod_mbox/ws-tuscany-user/200803.mbox/%3c69D276452CD2904980D5B6AC33C9BE170B0872C2@gtlbmlexs0006.bagmail.net%3e.
> When trying to test <implementation.osgi> I ended with this error message:
> org.apache.tuscany.sca.contribution.service.ContributionResolveException: org.apache.tuscany.sca.contribution.service.ContributionResolveException: missing .componentType side file .componentType
> 	at org.apache.tuscany.sca.implementation.osgi.xml.OSGiImplementationProcessor.resolve(OSGiImplementationProcessor.java:276)
> ...
> caused by
> Caused by: org.apache.tuscany.sca.contribution.service.ContributionResolveException: missing .componentType side file .componentType
> 	at org.apache.tuscany.sca.implementation.osgi.xml.OSGiImplementationProcessor.resolve(OSGiImplementationProcessor.java:227)
> ...
> While Tuscany is right in that I did not provide a componentType file, it seems to be wrong in  how it has created the filename.
> I debugged a bit and found the following: org.apache.tuscany.sca.contribution.osgi.impl.OSGiBundleReferenceModelResolver has a method getBundleFilename(...) that tries to extract the bundles filename from its location by looking for the last "/" in the location and using the rest afterwards. But when the bundle is located in my Eclipse workspace as a Plugin project under development and not packed as a JAR and I run my examples in a Equinox runtime, the reported location is e.g.
> "initial@reference:file:../workspace/EILF/tuscany.osgi.sample/" where tuscany.osgi.sample is the actual bundle name.
> Therefore getBundleFilename returns just an empty string. And this empty string is used later in org.apache.tuscany.sca.implementation.osgi.xml.OSGiImplementationProcessor.resolve(...) to build the filename for the component type file, which results in ".componentType" as the complete filename in this case. 
> I suppose the current code is meant to look for the componentType file next to a bundle JAR with the same basename as the bundle JAR. I'm not sure where it should look for it in my case, probably inside the workspace bundle directory, as the workspace directory itself is usually not visible in Eclipse and so it would be inconvenient to edit the file in the IDE. 
> Sorry that I cannot provide a test case currently because had to create own Tuscany bundles to get this far (see mail thread linked above for details), which would be a bit large to attach, I suppose (-; Also I cannot provide a patch yet, because I'm quite new to OSGi and Tuscany myself and therefore cannot estimate what would be a valid solution currently. Of course if you have any ideas how to solve this, I can test it in my setup and give more feedback.
> Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org