Suryakanta97 / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

odata4j-core 0.7.0 does not resolve JPA dependency in the Fuse ESB OSGi container #253

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download odata4j-core (org.odata4j.core) 0.7.0 jar file and install from 
http://localhost:8181/system/console/bundles (Fuse bundle manager) 
2. Install Java Persistence API 2.0 javax.persistence
   Version
   2.0.0.v200911271158
From Fuse management console

3. odata4j-core is not able to resolve :
javax.persistence,version=[1.0.0,2.0.0) -- Cannot be resolved
org.eclipse.persistence,version=[1.1.0,2.0.0) -- Cannot be resolved
 org.eclipse.persistence.internal.helper,version=[1.1.0,2.0.0) -- Cannot be resolved
 org.eclipse.persistence.internal.jpa.metamodel,version=[2.0.0,3.0.0) -- Cannot be resolved but is not required
 org.eclipse.persistence.mappings,version=[1.1.0,2.0.0) -- Cannot be resolved

4. Create project in clipse with Import of:
 <Import-Package>javax.persistence;version=2.0.0, and it is resolved in osgi by bundle installed in the step 2.

What is the expected output? What do you see instead?
odata4j-core should not have any unresolved dependencies

What version of the product are you using? On what operating system?
OData 0.7.0, Fuse ESB 7.1, Windows 7, Java 1.7 JDK

Please provide any additional information below.

What I am trying to achive is to use OData service from Apache ServicMX Camel 
route:

public class ClientOdata implements Processor{

    private static final transient Logger LOG = LoggerFactory
            .getLogger(String.class);

    public void process(Exchange exchange) throws Exception {

        System.out.println( "Hello World!" );
        ODataConsumer consumer =  ODataConsumers.create("http://localhost:8885/RoundtripExample.svc/");
        Enumerable<OEntity> list = consumer.getEntities("Customers").execute();

       /* for (OEntity oEntity : list) {
            System.out.println( oEntity );
        }*/

        OEntity entity = consumer.getEntity("Customers", 1).execute();

        consumer.updateEntity(entity)
        .properties(OProperties.string("Name", "mm"))
        .execute();

    }

}

I want to use ODataConsumer to connect to example from OData and to consume the 
service.

Original issue reported on code.google.com by milanmi...@gmail.com on 4 Apr 2013 at 3:42

Attachments:

GoogleCodeExporter commented 9 years ago
Version 0.8.0 does not have issue with 
javax.persistence;version="[2.0.0,3.0.0)",

but there is still issue with:
org.eclipse.persistence;version="[2.0.0,3.0.0)",
org.eclipse.persistence.internal.helper;version="[2.2.0,3.0.0)",
org.eclipse.persistence.internal.jpa.metamodel;version="[2.0.0,3.0.0)";
resolution:=optional,
org.eclipse.persistence.mappings;version="[2.0.0,3.0.0)",

as well as with new package (havent tried to import this one manually)
org.joda.time;version="[2.0.0,3.0.0)",
org.joda.time.format;version="[2.0.0,3.0.0)",

Original comment by milanmi...@gmail.com on 5 Apr 2013 at 11:03