Hi Charitha,

Thank you for the explanation on why it happens and I disabled the
inspection too. It works fine.

Thank you
Best Regards,
Madhawa

On Mon, Feb 8, 2016 at 10:15 AM, Charitha Goonetilleke <[email protected]>
wrote:

> Hi Madhawa,
>
> This issue is appeared in IntelliJ Idea because it tries to verify OSGi
> bundles that has scr annotation in Component class. These annotations not
> processed by the IntelliJ Idea IDE and therefore those bundles not
> identified as OSGi bundles by the IDE. But since required bundle INF files
> are generated in build time, those bundles are work as usual OSGi bundles
> in the runtime.
>
> So you can ignore this issue and can remove those annoying error markers
> as follows:
>
> Goto File --> Settings --> Then search for "*osgi inspections*" --> Then
> uncheck "*Package Accessibility*" inspection
>
> Finally apply and ok.
>
> Thanks & Regards,
> /charithag
>
> On Sun, Feb 7, 2016 at 11:54 PM, Madhawa Perera <[email protected]> wrote:
>
>> Hi,
>>
>> I'm working on building a carbon component. During the process, I
>> developed the back end service and built it with maven and the service stub
>> was created. But when I was writing the client with the stub dependency it
>> gives me following error although I exported the required package:
>>
>> "The package 'org.wso2.carbon.comp.order.pro.stub' is not exported by the
>> bundle dependencies less... (Ctrl+F1)
>>
>> *This inspections reports usage of classes from packages not accessible
>> inside the OSGi context - i.e. those located in .jar files not packaged as
>> bundles, or not exported by bundles, or not imported in manifest file (if
>> applicable). Asking for such a classes may cause "class not found"
>> exceptions at runtime*"
>>
>> Although, the program runs and the component works fine and doesn't cause
>> any exceptions as warned.
>>
>> *Is there anyway that I can eliminate this error/warning message?*
>>
>> I have herewith attached the piece of client code (Client.png) that I
>> tried out (to show the marked error) and I have added the dependencies as
>> in the attached 'pom.xml'. Further attached the inspection results capture
>> (Inspection.png) . I'm using intelliJ idea for my development.
>>
>>
>> Thank you
>> Best Regards,
>>
>> --
>> Madhawa Perera
>> *Software Engineer*
>> Mobile : +94 (0) 773655496
>> <%2B94%20%280%29%20773%20451194>
>> [email protected]
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Charitha Goonetilleke*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 751 3669 <%2B94777513669>
> Twitter:@CharithaWs <https://twitter.com/CharithaWs>, fb: charithag
> <https://www.facebook.com/charithag>, linkedin: charithag
> <http://www.linkedin.com/in/charithag>
>



-- 
Madhawa Perera
*Software Engineer*
Mobile : +94 (0) 773655496
<%2B94%20%280%29%20773%20451194>
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to