Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #29910 All Revisions ] Back to Issue ]
Summary 0029910: exporting grid to csv can fail if audit fields are included
Revision 2015-11-10 16:09 by alostale
Description Under certain circumstances when trying to export a grid to csv including audit columns it can fail.

When this happens:
* The CSV file contains a single line with:
{"response":{"status":-4,"error":{"message":"Error while exporting a CSV file", "type":"system"}}}
* This exception appears in openbravo.log:
370815 [http-8080-1] ERROR org.openbravo.client.kernel.KernelUtils - Error while exporting a CSV file
org.openbravo.base.exception.OBException: Error while exporting a CSV file
    at org.openbravo.service.datasource.DataSourceServlet$QueryJSONWriterToCSV.<init>(DataSourceServlet.java:493)
...
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ADElement.aDElementTrlList, no session or session was closed
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at org.openbravo.client.application.window.OBViewUtil.getLabel(OBViewUtil.java:130)

See steps to reproduce: the problem is OBViewUtil caches audit elements, but initially not their possible translations required for labeling csv columns. Step 6 initalizes those elements but translations only for one of them, steps 8 tries to get label from proxy of a DAL object which session is not longer in the thread.
Revision 2015-11-10 16:05 by alostale
Description Under certain circumstances when trying to export a grid to csv including audit columns it can fail.

When this happens:
* The CSV file contains a single line with:
{"response":{"status":-4,"error":{"message":"Error while exporting a CSV file", "type":"system"}}}
* This exception appears in openbravo.log:
370815 [http-8080-1] ERROR org.openbravo.client.kernel.KernelUtils - Error while exporting a CSV file
org.openbravo.base.exception.OBException: Error while exporting a CSV file
    at org.openbravo.service.datasource.DataSourceServlet$QueryJSONWriterToCSV.<init>(DataSourceServlet.java:493)
...
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ADElement.aDElementTrlList, no session or session was closed
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at org.openbravo.client.application.window.OBViewUtil.getLabel(OBViewUtil.java:130)
Revision 2015-11-10 15:27 by alostale
Description When export data to spreadsheet functionality used after adding audit fields in Sales Invoice window, the following error shows in the spreadsheet

{"response":{"status":-4,"error":{"message":"Error while exporting a CSV file", "type":"system"}}}


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker