Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1475 closed defect (fixed)

Raw data/Reporter export fails if ID is included

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 2.15
Component: core Version:
Keywords: Cc:

Description

Stack trace:

java.io.IOException: The instance was not associated with this session
at net.sf.basedb.clients.web.plugins.SimpleExport.exportProperties(SimpleExport.java:631)
at net.sf.basedb.clients.web.plugins.SimpleExport.performExport(SimpleExport.java:331)
at net.sf.basedb.core.plugin.AbstractExporterPlugin.run(AbstractExporterPlugin.java:144)
at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:110)
at net.sf.basedb.core.PluginExecutionRequest.run(PluginExecutionRequest.java:135)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.basedb.core.BaseException: The instance was not associated with this session
at net.sf.basedb.core.Metadata.getPropertyValue(Metadata.java:548)
at net.sf.basedb.clients.web.plugins.DataQueryWrapper.getData(DataQueryWrapper.java:84)
at net.sf.basedb.clients.web.plugins.DataQueryWrapper.getData(DataQueryWrapper.java:38)
at net.sf.basedb.clients.web.plugins.SimpleExport.exportProperties(SimpleExport.java:600)
... 5 more
Caused by: org.hibernate.TransientObjectException: The instance was not associated with this session
at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1512)
at net.sf.basedb.core.Metadata.getPropertyValue(Metadata.java:522)
... 8 more

The cause of this is probably that the query that is loading raw data is using a StatelessSession, but then we call Session.getIdentifier() on the regular Hibernate session which fails because the entity is of course not part of the session.

The problematic code is in the Metadata.getPropertyValue() method and I expect this problem to go away when #1343 has been fixed. (In fact, it is already gone...)

Change History (2)

comment:1 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: newclosed

Was fixed in [5239].

comment:2 by Nicklas Nordborg, 14 years ago

Summary: Raw data export fails if ID is includedRaw data/Reporter export fails if ID is included

There is an identical problem with exporting reporters.

Note: See TracTickets for help on using tickets.