Phlogiston,
I've tested the example under windows with both  tomcat and glassfish 2(v1 I
think but I cannot tell you right now) with this simple configuration in
ftpd-typical.xml:

 <server xmlns="http://mina.apache.org/ftpserver/spring/v1";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="
   http://mina.apache.org/ftpserver/spring/v1
http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
   "
id="myServer">
<listeners>
<nio-listener name="default" port="2121">
</nio-listener>
</listeners>
 </server>

This works for me with no tweaking at all, just right click on the project
and select undeploy & deploy.

Can you try running with that config?  Of course you won't be able to log in
but you should be able to connect to port 2121.   If it doesn't work please
stop glassfish and try to deploy the app to Tomcat.
There is a chance that there is a bug in latest Glassfish (v2ur2 ) running
on windows  for I've seen some problems similar to this one:
https://issues.apache.org/jira/browse/DIRMINA-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

At the time I  came across that issue, I thought I had to reinstall
Glassfish or check for firewall issues. You may deactivate windows firewall
for this test so we discard possible unrelated problems.

So can you please run the example with that xml  and check glassfish logs
(netbeans' output tab) for some error related to NIO ?


2008/10/20 Phlogiston Eight <[EMAIL PROTECTED]>

>
> Thank you for posting that example of a servlet-context listener-based
> launcher for FTPServer within Spring. I appreciate it.
>
> One question:  I imported it into NetBeans, and made the few necessary
> changes (substituting actual values for placeholders in properties, etc...).
>  After that, your example NetBeans project builds and runs. It Does start
> FtpServer (does call its .start() method) when the webapplication is started
> in Glassfish.
>
> However, it no longer accepts any FTP connections at all. I cannot get any
> FTP client to successfully connect to it.  So it can't be used.  Maybe there
> is another step I need to do which wasn't in the post? That's what I'm
> hoping, because this example comes so close.
>
> The problem is not failed login, because the USER and the PASS commands
> never get issued to FTPServer. Instead, when the client, at the very first,
> tries to get a connection to talk to the Server, the Server times out. THe
> client waits and waits for a connection so it can send the USER command--but
> the connection is never granted by FTPServer.
>
> I already had an application which gave connections, allowed logins,
> uploads, downloads, all FTP operations. It all worked perfectly in mine--but
> there was one fundamental problem:  it had to be kicked-off (the server
> started) by calling a main() method.  A no-no for a deployed, Spring-based
> web application. In some cases, an impossibility.  So my hope was that your
> post would solve that prob.  It does solve that problem--but unfortunately,
> no client can connect any more.  I've tested in SSL mode AND in basic,
> NON-SSL mode. Either way, the server always times out before returning a
> connection to the client.
>
> Do you know why this could be? Anyone else know?  FtpServer Does start when
> the webapp starts--but it no longer functions (allows connections).
> _________________________________________________________________
> Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
>
> http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008

Reply via email to