[jira] [Updated] (OLINGO-604) Injected Entity Managers are closed after fetching query results

2015-03-26 Thread Chandan V.A (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chandan V.A updated OLINGO-604:
---
Component/s: odata2-jpa

 Injected Entity Managers are closed after fetching query results
 

 Key: OLINGO-604
 URL: https://issues.apache.org/jira/browse/OLINGO-604
 Project: Olingo
  Issue Type: Bug
  Components: odata2-jpa
Affects Versions: V2 2.0.4
Reporter: Chandan V.A
Assignee: Chandan V.A
Priority: Minor

 There is an issue with the way the result list is accessed in JPAProcessor 
 method: private Object readEntity(final Object uriParserResultView, final 
 JPQLContextType contextType)
 Currently (Olingo 2.03) accesses the Resultlist by following code snippet:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 if (!query.getResultList().isEmpty()) {
   selectedObject = query.getResultList().get(0);
 …
 Because an injected entityprocessor (via proxy) from the Spring Framework, on 
 the first access to query.getResultList() closes the entitymanager after the 
 query transaction is done.
 Since the object is accessed in a separate call the entitymanager is closed 
 and therefore we get an error “Attempting to execute an operation on a closed 
 EntityManager.
 The solution is ..
 By assigning the ResultList to a List, the issue is solved:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 final List resultList = query.getResultList();
 if (!resultList.isEmpty())
 {
 selectedObject = resultList.get(0);
 }
 …



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OLINGO-604) Injected Entity Managers are closed after fetching query results

2015-03-26 Thread Chandan V.A (JIRA)
Chandan V.A created OLINGO-604:
--

 Summary: Injected Entity Managers are closed after fetching query 
results
 Key: OLINGO-604
 URL: https://issues.apache.org/jira/browse/OLINGO-604
 Project: Olingo
  Issue Type: Bug
Affects Versions: V2 2.0.4
Reporter: Chandan V.A
Assignee: Chandan V.A
Priority: Minor


There is an issue with the way the result list is accessed in JPAProcessor 
method: private Object readEntity(final Object uriParserResultView, final 
JPQLContextType contextType)
Currently (Olingo 2.03) accesses the Resultlist by following code snippet:
…
query = em.createQuery(selectJPQLStatement.toString());
if (!query.getResultList().isEmpty()) {
  selectedObject = query.getResultList().get(0);
…

Because an injected entityprocessor (via proxy) from the Spring Framework, on 
the first access to query.getResultList() closes the entitymanager after the 
query transaction is done.
Since the object is accessed in a separate call the entitymanager is closed and 
therefore we get an error “Attempting to execute an operation on a closed 
EntityManager.

The solution is ..
By assigning the ResultList to a List, the issue is solved:

…
query = em.createQuery(selectJPQLStatement.toString());
final List resultList = query.getResultList();
if (!resultList.isEmpty())
{
selectedObject = resultList.get(0);
}
…




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OLINGO-604) Injected Entity Managers are closed after fetching query results

2015-03-26 Thread Chandan V.A (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chandan V.A updated OLINGO-604:
---
Fix Version/s: V2 2.0.4

 Injected Entity Managers are closed after fetching query results
 

 Key: OLINGO-604
 URL: https://issues.apache.org/jira/browse/OLINGO-604
 Project: Olingo
  Issue Type: Bug
  Components: odata2-jpa
Affects Versions: V2 2.0.4
Reporter: Chandan V.A
Assignee: Chandan V.A
Priority: Minor
 Fix For: V2 2.0.4


 There is an issue with the way the result list is accessed in JPAProcessor 
 method: private Object readEntity(final Object uriParserResultView, final 
 JPQLContextType contextType)
 Currently (Olingo 2.03) accesses the Resultlist by following code snippet:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 if (!query.getResultList().isEmpty()) {
   selectedObject = query.getResultList().get(0);
 …
 Because an injected entityprocessor (via proxy) from the Spring Framework, on 
 the first access to query.getResultList() closes the entitymanager after the 
 query transaction is done.
 Since the object is accessed in a separate call the entitymanager is closed 
 and therefore we get an error “Attempting to execute an operation on a closed 
 EntityManager.
 The solution is ..
 By assigning the ResultList to a List, the issue is solved:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 final List resultList = query.getResultList();
 if (!resultList.isEmpty())
 {
 selectedObject = resultList.get(0);
 }
 …



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (OLINGO-604) Injected Entity Managers are closed after fetching query results

2015-03-26 Thread Chandan V.A (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chandan V.A resolved OLINGO-604.

Resolution: Fixed

 Injected Entity Managers are closed after fetching query results
 

 Key: OLINGO-604
 URL: https://issues.apache.org/jira/browse/OLINGO-604
 Project: Olingo
  Issue Type: Bug
  Components: odata2-jpa
Affects Versions: V2 2.0.4
Reporter: Chandan V.A
Assignee: Chandan V.A
Priority: Minor

 There is an issue with the way the result list is accessed in JPAProcessor 
 method: private Object readEntity(final Object uriParserResultView, final 
 JPQLContextType contextType)
 Currently (Olingo 2.03) accesses the Resultlist by following code snippet:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 if (!query.getResultList().isEmpty()) {
   selectedObject = query.getResultList().get(0);
 …
 Because an injected entityprocessor (via proxy) from the Spring Framework, on 
 the first access to query.getResultList() closes the entitymanager after the 
 query transaction is done.
 Since the object is accessed in a separate call the entitymanager is closed 
 and therefore we get an error “Attempting to execute an operation on a closed 
 EntityManager.
 The solution is ..
 By assigning the ResultList to a List, the issue is solved:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 final List resultList = query.getResultList();
 if (!resultList.isEmpty())
 {
 selectedObject = resultList.get(0);
 }
 …



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OLINGO-604) Injected Entity Managers are closed after fetching query results

2015-03-26 Thread Chandan V.A (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14381603#comment-14381603
 ] 

Chandan V.A commented on OLINGO-604:


Fixed with - 
http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/763755f1

 Injected Entity Managers are closed after fetching query results
 

 Key: OLINGO-604
 URL: https://issues.apache.org/jira/browse/OLINGO-604
 Project: Olingo
  Issue Type: Bug
  Components: odata2-jpa
Affects Versions: V2 2.0.4
Reporter: Chandan V.A
Assignee: Chandan V.A
Priority: Minor
 Fix For: V2 2.0.4


 There is an issue with the way the result list is accessed in JPAProcessor 
 method: private Object readEntity(final Object uriParserResultView, final 
 JPQLContextType contextType)
 Currently (Olingo 2.03) accesses the Resultlist by following code snippet:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 if (!query.getResultList().isEmpty()) {
   selectedObject = query.getResultList().get(0);
 …
 Because an injected entityprocessor (via proxy) from the Spring Framework, on 
 the first access to query.getResultList() closes the entitymanager after the 
 query transaction is done.
 Since the object is accessed in a separate call the entitymanager is closed 
 and therefore we get an error “Attempting to execute an operation on a closed 
 EntityManager.
 The solution is ..
 By assigning the ResultList to a List, the issue is solved:
 …
 query = em.createQuery(selectJPQLStatement.toString());
 final List resultList = query.getResultList();
 if (!resultList.isEmpty())
 {
 selectedObject = resultList.get(0);
 }
 …



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (OLINGO-597) V2 Metadatadocument deserializer function import parameter issue

2015-03-26 Thread Christian Amend (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Amend resolved OLINGO-597.

Resolution: Fixed

Fixed with commit: 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=7ed5640bd29b40004f069221d50d1b48afcab607

 V2 Metadatadocument deserializer function import parameter issue
 

 Key: OLINGO-597
 URL: https://issues.apache.org/jira/browse/OLINGO-597
 Project: Olingo
  Issue Type: Bug
  Components: odata2-core
Affects Versions: V2 2.0.3
Reporter: Christian Amend
Assignee: Christian Amend
 Fix For: V2 2.0.4


 When deserializing a V2 metadata document we do not set the mode attribute 
 for function import parameters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (OLINGO-600) Client navigation property deserialization

2015-03-26 Thread Christian Holzer (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Holzer resolved OLINGO-600.
-
Resolution: Fixed

Fixed with 
[OLINGO-600|https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=0113414e2624be103448d9bc08fada08f08ce86e]

 Client navigation property deserialization
 --

 Key: OLINGO-600
 URL: https://issues.apache.org/jira/browse/OLINGO-600
 Project: Olingo
  Issue Type: Bug
  Components: odata4-client
Affects Versions: (Java) V4 4.0.0-beta-03
Reporter: Christian Holzer
Assignee: Christian Holzer
Priority: Minor

 The “EdmEnabledClient” OData client deserializes only the first inlined 
 navigation property on the first level. Other levels work fine.
 {code:title=For example consider the following response:}
 {
 @odata.context: $metadata#Employee/$entity
 Name: Dave,
 Age: Test String4
 Company: 
 {
 ID: 32767,
 Name: “My company”
 },
 Address: [
{
   Street: “MyStreet”
},
{
 MyStreet: “MyStreet2”
}
 ]
 } 
 {code}
 “Company” and “Address” are navigation properties.
 {code}
 final ODataEntityCreateResponseODataEntity response = ….
 assertNotNull(response.getBody().getNavigationLink(“Company”) );
 assertNotNull(response.getBody().getNavigationLink(“Address”));   
 // fail!
 {code}
 Kind regards
 Christian



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (OLINGO-600) Client navigation property deserialization

2015-03-26 Thread Christian Holzer (JIRA)

 [ 
https://issues.apache.org/jira/browse/OLINGO-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Holzer closed OLINGO-600.
---

 Client navigation property deserialization
 --

 Key: OLINGO-600
 URL: https://issues.apache.org/jira/browse/OLINGO-600
 Project: Olingo
  Issue Type: Bug
  Components: odata4-client
Affects Versions: (Java) V4 4.0.0-beta-03
Reporter: Christian Holzer
Assignee: Christian Holzer
Priority: Minor

 The “EdmEnabledClient” OData client deserializes only the first inlined 
 navigation property on the first level. Other levels work fine.
 {code:title=For example consider the following response:}
 {
 @odata.context: $metadata#Employee/$entity
 Name: Dave,
 Age: Test String4
 Company: 
 {
 ID: 32767,
 Name: “My company”
 },
 Address: [
{
   Street: “MyStreet”
},
{
 MyStreet: “MyStreet2”
}
 ]
 } 
 {code}
 “Company” and “Address” are navigation properties.
 {code}
 final ODataEntityCreateResponseODataEntity response = ….
 assertNotNull(response.getBody().getNavigationLink(“Company”) );
 assertNotNull(response.getBody().getNavigationLink(“Address”));   
 // fail!
 {code}
 Kind regards
 Christian



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)