You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ER...@embratel.com.br on 2004/07/02 19:10:29 UTC
ANT - FTP - Unknown parser type: MVS is the operating system of this server
I'm trying to make FTP using ANT. But, after to connect I receive this
error message: "Unknown parser type: MVS is the operating system of this
server."
I think that this error is caused because the class
DefaultFTPFileEntryParserFactory.java, used to make FTP on ANT doesn't
support the operation system MVS. But, I know that others people are using
ANT to make FTP with MVS without problems.
What can I do?
Thanks,
Evandro Dutra
Consultor Java
5521 2121-7844
The font code:
....
public FTPFileEntryParser createFileEntryParser(String key)
{
Class parserClass = null;
try
{
parserClass = Class.forName(key);
return (FTPFileEntryParser) parserClass.newInstance();
}
catch (ClassNotFoundException e)
{
String ukey = null;
if (null != key)
{
ukey = key.toUpperCase();
}
if (ukey.indexOf("UNIX") >= 0)
{
return createUnixFTPEntryParser();
}
else if (ukey.indexOf("VMS") >= 0)
{
return createVMSVersioningFTPEntryParser();
}
else if (ukey.indexOf("WINDOWS") >= 0)
{
return createNTFTPEntryParser();
}
else if (ukey.indexOf("OS/2") >= 0)
{
return createOS2FTPEntryParser();
}
else if (ukey.indexOf("OS/400") >= 0)
{
return createOS400FTPEntryParser();
}
else
{
throw new ParserInitializationException("Unknown parser
type: " + key); // this is my exception
}
}
catch (ClassCastException e)
{
throw new ParserInitializationException(parserClass.getName()
+ " does not implement
the interface "
+
"org.apache.commons.net.ftp.FTPFileEntryParser.", e);
}
catch (Throwable e)
{
throw new ParserInitializationException("Error initializing
parser", e);
}
}
-----------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ANT - FTP - Unknown parser type: MVS is the operating system of this server
Posted by Steve Cohen <sc...@javactivity.org>.
If you know of others who are using ant FTP with MVS servers, then you know
more than I do! As you correctly point out, commons-net does not support
FTP servers that use the MVS operating system and commons-net is the basis of
Ant's FTP task.
I don't know how people could be successfully using Ant FTP on MVS, but let me
hazard a guess: does MVS's FTP server have an option that causes it to emit
listings in the standard Unix format instead of its native format? I know
that both Microsoft and OS/400 servers have such an option and some Ant users
have made use of it, particularly in the days before Commons-net-1.2 came
out, which offered for the first time automatic support for systems other
than unix. If that is the case, then with MVS servers that have been set up
to work that way, Ant would treat them as unix servers and the FTP task would
work. As a workaround, then, if you have control of the FTP server, you
might want to investigate whether or not that's possible. If you don't have
that level of access then of course this won't work for you, but it might
explain why other people are having success with it.
The real fix will be for someone to contribute to the commons-net project an
MVSFileEntryParser along the lines of the other parsers that have been
submitted. There seems to be a gathering wave of interest in this. You are
the third person who has written in the last two weeks with such a request.
One even offered to send me such a parser, but he hasn't gotten around to
sending it yet.
I would encourage you or anyone else interested to have a look at the
commons-net parser code and see if you can contribute such a parser. It
isn't that hard, all it requires is a working knowledge of regular
expressions and an understanding of the MVS FTP listing format. I would also
like to have from whoever makes this submission a JUnit test class for this
parser, and again, there is existing commons-net code that can server as a
model.
If anyone wants to take this on, don't worry if you don't understand
everything. I am more than willing to help you. But I have neither
knowledge of nor access to MVS FTP servers, so the impetus must come from
someone who does.
On Friday 02 July 2004 12:10 pm, ERDUTRA@embratel.com.br wrote:
> I'm trying to make FTP using ANT. But, after to connect I receive this
> error message: "Unknown parser type: MVS is the operating system of this
> server."
> I think that this error is caused because the class
> DefaultFTPFileEntryParserFactory.java, used to make FTP on ANT doesn't
> support the operation system MVS. But, I know that others people are using
> ANT to make FTP with MVS without problems.
> What can I do?
>
> Thanks,
>
>
> Evandro Dutra
> Consultor Java
> 5521 2121-7844
>
>
> The font code:
> ....
> public FTPFileEntryParser createFileEntryParser(String key)
> {
> Class parserClass = null;
> try
> {
> parserClass = Class.forName(key);
> return (FTPFileEntryParser) parserClass.newInstance();
> }
> catch (ClassNotFoundException e)
> {
> String ukey = null;
> if (null != key)
> {
> ukey = key.toUpperCase();
> }
> if (ukey.indexOf("UNIX") >= 0)
> {
> return createUnixFTPEntryParser();
> }
> else if (ukey.indexOf("VMS") >= 0)
> {
> return createVMSVersioningFTPEntryParser();
> }
> else if (ukey.indexOf("WINDOWS") >= 0)
> {
> return createNTFTPEntryParser();
> }
> else if (ukey.indexOf("OS/2") >= 0)
> {
> return createOS2FTPEntryParser();
> }
> else if (ukey.indexOf("OS/400") >= 0)
> {
> return createOS400FTPEntryParser();
> }
> else
> {
> throw new ParserInitializationException("Unknown parser
> type: " + key); // this is my exception
> }
> }
> catch (ClassCastException e)
> {
> throw new ParserInitializationException(parserClass.getName()
> + " does not implement
> the interface "
> +
> "org.apache.commons.net.ftp.FTPFileEntryParser.", e);
> }
> catch (Throwable e)
> {
> throw new ParserInitializationException("Error initializing
> parser", e);
> }
> }
> ---------------------------------------------------------------------------
>--------------------------------------------
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org