[
https://issues.apache.org/jira/browse/OLINGO-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephan Klevenz resolved OLINGO-41.
-----------------------------------
Resolution: Fixed
For OSGi usage do the following:
Implement own ODataApplication:
import org.apache.olingo.odata2.core.rest.app.AbstractODataApplication;
public class CarODataApplication extends AbstractODataApplication {
@Override
public Class<? extends ODataServiceFactory> getServiceFactoryClass() {
return CarODataServiceFactory.class;
}
}
Configure own application in web.xml:
<servlet>
<servlet-name>CarServiceServlet</servlet-name>
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.sap.core.odata.sample.osgi.CarODataApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
> Export-Package header incorrect in olingo-odata2-core
> -----------------------------------------------------
>
> Key: OLINGO-41
> URL: https://issues.apache.org/jira/browse/OLINGO-41
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 1.0.0
> Environment: Apache Karaf 2.3.3
> Reporter: Vassili Jakovlev
> Assignee: Stephan Klevenz
> Fix For: V2 1.1.0
>
>
> "Export-Package" header in olingo-odata2-core's MANIFEST.MF file misses the
> package "org.apache.olingo.odata2.core.rest", but includes
> "org.apache.olingo.odata2.core.rest.app". In my opinion both packages should
> be included in "Export-Package" header and corresponding section in pom.xml
> should look like this:
> <Export-Package>
> org.apache.olingo.odata2.core.rest;version=${project.version},
> org.apache.olingo.odata2.core.rest.app;version=${project.version},
> org.apache.olingo.odata2.core.rt;version=${project.version},
> </Export-Package>
> PS. I need this package because it was required to create custom
> ODataRootLocator since default ODataRootLocator accepts only fully qualified
> factory class name, what causes problems in OSGi environment (my factory
> class in not visible to olingo-odata2-core bundle)
--
This message was sent by Atlassian JIRA
(v6.1#6144)