Opened 11 years ago
Closed 11 years ago
#1822 closed defect (fixed)
Can't use external files with batch item importers
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.3 |
Component: | coreplugins | Version: | |
Keywords: | Cc: |
Description
It seems like all of the batch item importers have problems if the selected file to import data from is an external file reference.
For example:
- Prepare by creating an external file reference. The actual URL doesn't matter, but the file reference must be linked with a File server.
- Go to the "Extracts" list page
- Click on "Import" and select the "Extract importer"
- Select the external file for the "File" parameter
- There are some other required parameters. Simply enter some dummy values.
- Click on 'Next'. An error message is displayed:
could not initialize proxy - no Session * org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) at net.sf.basedb.core.data.FileServerData_$$_javassist_40.getConnectionManagerFactory(FileServerData_$$_javassist_40.java) at net.sf.basedb.util.uri.ConnectionParameters.create(ConnectionParameters.java:52) at net.sf.basedb.core.File.getServerInfo(File.java:1098) at net.sf.basedb.core.File.getDownloadStream(File.java:1460) at net.sf.basedb.plugins.batchimport.AbstractItemImporter.configure(AbstractItemImporter.java:358) at net.sf.basedb.core.PluginConfigurationRequest.invoke(PluginConfigurationRequest.java:114) at org.apache.jsp.common.plugin.index_jsp._jspService(index_jsp.java:518) ...
The root cause is that the call to File.getDownloadStream()
is done on an object that has been detached from the session, and the information about the file server is configured for lazy-loading.
Note:
See TracTickets
for help on using tickets.
The same error when actually trying to use the file when importing: