Opened 17 years ago

Closed 17 years ago

#878 closed defect (fixed)

Exporting files as a compressed archive may throw an exception if done from a subdirectory

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.5.1
Component: coreplugins Version:
Keywords: Cc:

Description

Here is the stacktrace:

org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
at net.sf.basedb.core.data.DirectoryData$$EnhancerByCGLIB$$3680f44d.getName(<generated>)
at net.sf.basedb.core.Directory.getPath(Directory.java:687)
at net.sf.basedb.plugins.PackedFileExporter.performExport(PackedFileExporter.java:377)
at net.sf.basedb.core.plugin.AbstractExporterPlugin.run(AbstractExporterPlugin.java:144)
at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:89)
at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:435)
at java.lang.Thread.run(Thread.java:619)

This happens because the path up to the root directory has not been loaded. It may work sometimes if all info happens to be in the cache. Simpe solution is to reload the directory with the current session.

Change History (2)

comment:1 by Nicklas Nordborg, 17 years ago

Status: newassigned

comment:2 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [4060]) Fixes #878: Exporting files as a compressed archive may throw an exception if done from a subdirectory

Note: See TracTickets for help on using tickets.