Opened 10 years ago

Closed 10 years ago

#616 closed defect (fixed)

External files with a file server can't be downloaded

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: FTP Server v1.4
Component: net.sf.basedb.ftp Keywords:


There is a bug in the FTP server when trying to download an external file (a file with a URL to an external address) that is linked with a file server item.

The file server item is needed if some additional information (such as a username/password or SSL certificate) is needed to access the file.

The problem is that the file server information is behind a uninitialized proxy object and trying to access that information causes a LazyInitializationException:

14:06:11,579  WARN DefaultFtpHandler:248 - RequestHandler.service()
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
	at org.hibernate.proxy.AbstractLazyInitializer.initialize(
	at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(
	at net.sf.basedb.util.uri.ConnectionParameters.create(
	at net.sf.basedb.core.File.getServerInfo(
	at net.sf.basedb.core.File.getDownloadStream(
	at net.sf.basedb.clients.ftp.BaseFtpFile.createInputStream(
	at org.apache.ftpserver.command.impl.RETR.openInputStream(
	at org.apache.ftpserver.command.impl.RETR.execute(
	at org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(
	at org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [2569]) Fixes #616: External files with a file server can't be downloaded

Note: See TracTickets for help on using tickets.