Opened 6 years ago

Closed 6 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:
Cc:

Description

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(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:1116)
	at net.sf.basedb.core.File.getDownloadStream(File.java:1478)
	at net.sf.basedb.clients.ftp.BaseFtpFile.createInputStream(BaseFtpFile.java:482)
	at org.apache.ftpserver.command.impl.RETR.openInputStream(RETR.java:236)
	at org.apache.ftpserver.command.impl.RETR.execute(RETR.java:163)
	at org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(DefaultFtpHandler.java:210)
	at org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(FtpHandlerAdapter.java:61)
...

Change History (1)

comment:1 Changed 6 years ago by Nicklas Nordborg

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.