[ 
https://issues.apache.org/jira/browse/TUSCANY-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578873#action_12578873
 ] 

Rajini Sivaram commented on TUSCANY-2086:
-----------------------------------------

I have modified OSGiBundleReferenceModelResolver.getBundleFilename to return 
the last segment of the name when the path corresponds to a directory. I am not 
sure if you will run into other problems though. 


> 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
>
>
> This issue refers to activities described in 
> http://mail-archives.apache.org/mod_mbox/ws-tuscany-user/200803.mbox/[EMAIL 
> PROTECTED]
> 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.
> "[EMAIL PROTECTED]: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to