You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Stephan Klevenz (JIRA)" <ji...@apache.org> on 2013/11/12 12:11:24 UTC

[jira] [Comment Edited] (OLINGO-41) Export-Package header incorrect in olingo-odata2-core

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

Stephan Klevenz edited comment on OLINGO-41 at 11/12/13 11:11 AM:
------------------------------------------------------------------

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>

see also: http://olingo.incubator.apache.org/doc/tutorials/osgi.html


was (Author: klevenzs):
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)