You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2013/10/30 11:38:27 UTC

[jira] [Commented] (OLINGO-48) jpa reference application issues wtih sample data population

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

Chandan V.A commented on OLINGO-48:
-----------------------------------

Hi Georgi,
1) I have enhanced the index.jsp page by adding links and buttons to generate and clean up data
2) check if you still get error while loading data
3) refer to discussion - http://apache.markmail.org/message/mscxfrkpnywdlow6?q=RE:+Is+the+plugin+needed%3F 

I am closing the issue now. Reopen in case something is not fixed.

Commit - http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/commit/4ec25794

Regards
Chandan

> jpa reference application issues wtih sample data population
> ------------------------------------------------------------
>
>                 Key: OLINGO-48
>                 URL: https://issues.apache.org/jira/browse/OLINGO-48
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: 1.0.0, 1.1.0
>            Reporter: Georgi
>            Assignee: Chandan V.A
>
> There's multiple issues in the jpa reference application:
> 1. Sample data is never populated - could be fixed with the following change in the org.apache.olingo.odata2.jpa.processor.ref.web.JPAReferenceServiceFactory
> EntityManagerFactory emf = JPAEntityManagerFactory.getEntityManagerFactory(PUNIT_NAME);
> DataGenerator generator = new DataGenerator(emf.createEntityManager());
> generator.generate();
> oDataJPAContext.setEntityManagerFactory(emf); 
> 2. The sample data insert scripts have data constraint issues, e.g.:
> Internal Exception: java.sql.SQLException: Violation of unique constraint SYS_PK_47: duplicate value(s) for column(s) SO_ID in statement [insert into T_SALESORDERHEADER (SO_ID, BUYER_ID, BUYER_NAME, CURRENCY_CODE, DELIVERY_STATUS, creationDate, HOUSE_NUMBER, STREET_NAME, CITY, COUNTRY) values(9, 9, 'buyerName_9', 'GBR', '02', '2013-01-01 00:00:00', 9, 'Test_Street_Name_9', 'Test_City_9', 'Test_Country_9');]
>  Error Code: -104
>  Call: insert into T_SALESORDERHEADER (SO_ID, BUYER_ID, BUYER_NAME, CURRENCY_CODE, DELIVERY_STATUS, creationDate, HOUSE_NUMBER, STREET_NAME, CITY, COUNTRY) values(9, 9, 'buyerName_9', 'GBR', '02', '2013-01-01 00:00:00', 9, 'Test_Street_Name_9', 'Test_City_9', 'Test_Country_9');
>  Query: DataModifyQuery(sql="insert into T_SALESORDERHEADER (SO_ID, BUYER_ID, BUYER_NAME, CURRENCY_CODE, DELIVERY_STATUS, creationDate, HOUSE_NUMBER, STREET_NAME, CITY, COUNTRY) values(9, 9, 'buyerName_9', 'GBR', '02', '2013-01-01 00:00:00', 9, 'Test_Street_Name_9', 'Test_City_9', 'Test_Country_9');")
> 3. (minor) In the pom file, there are leftover plugins from the initial SAP contribution:
>                 <plugin>
>                     <groupId>com.sap.research</groupId>
>                     <artifactId>nwcloud-maven-plugin</artifactId>
>                     <version>1.0.0.RELEASE</version>
>                 </plugin>



--
This message was sent by Atlassian JIRA
(v6.1#6144)