[ 
https://issues.apache.org/jira/browse/OLINGO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908106#comment-13908106
 ] 

Petr Dolezal commented on OLINGO-171:
-------------------------------------

Hi Michael,

actually, I did encounter with an issue, but since I was able to avoid it, I 
didn't explore it in its full depth. The issue is that 
{{AnnotationServiceFactory.createAnnotationService(String)}} does not work in 
our environment.

We use probably a bit unusual combination of Equinox 3.8.0 as the OSGi 
container with embedded Jetty 8.1.5 as the web container and we use Jetty in 
classical WAR-based mode due to historical reasons (our web applications are 
not converted into WAB format yet). Despite of this combination, we always 
managed to run what we needed after all, but sometimes we meet situations that 
might not be expected.

Anyway, back to the issue. At first, I thought it was caused by a wrong TCCL, 
which was overridden by CXF. However, the issue in CXF has been fixed (this is 
the case of an issue caused by using Equinox), so that the correct TCCL (the 
{{WebAppClassLoader}} provided by Jetty) is set. But the issue persists. For 
the time being, I overcome it by using 
{{AnnotationServiceFactory.createAnnotationService(Collection)}} and providing 
the classes directly, which works. I can try to provide more details if you are 
interested, it is possible that Equinox (or our weird combination) behaves 
somewhat differently from what you expected.

And yet a possibly stupid beginner's question: is there a way to create an 
annotation service factory for multiple packages? Because we are at the 
beginning of learning OData/Olingo and designing the whole thing, following 
idea could be a dead end or another approach could be better, but we were 
thinking a bit of the possiblity that available entity types for a service 
could come from different bundles which means that the entity classes have to 
live in different packages (as we really want to avoid split packages).

> Export-Package header missing package 
> org.apache.olingo.odata2.annotation.processor.core.datasource
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OLINGO-171
>                 URL: https://issues.apache.org/jira/browse/OLINGO-171
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-annotation
>    Affects Versions: V2 1.2.0
>         Environment: OSGi (Equinox 3.8.0)
> olingo-odata2-annotation-processor-core-incubating-1.2.0-20140219.004952-67.jar
>            Reporter: Petr Dolezal
>            Assignee: Michael Bolz
>             Fix For: V2 1.2.0
>
>
> Package org.apache.olingo.odata2.annotation.processor.core.datasource is not 
> exported from olingo-odata2-annotation-processor-core.
> Due to this bug it is not possible to refer e.g. to DataStore class in OSGi 
> environment (the importing bundles can't be resolved).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to