Hi,
I am just been started development of customized ftplet and trying to
configure as mentioned in this site. Though I have done as instructed, I
still not able to include my customized ftplet functions.
I just include my customized ftplet and configuration adding into the
xml file as attachment for your reference.
1) ftpd-typical.xml - As instructed configuration for ftplets added
2) FtpConnect.java - extending the DefaultFtplet class to implement the
required methods by overriding them, but its just an default
implementation with logging statement so that it can be tested for
actually these methods are called then I can probably implement them as
per requirement.
3) ftpleterror.txt - this has the error and execution command for ftplet
I need your help to fix this up as soon as possible. Thanks for your
effort.
Thanks and Regards,
Vinod
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.
-->
<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="21">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
</nio-listener>
</listeners>
<ftplets>
<ftplet name="ftplet1">
<beans:bean class="com.xa.xcom.ftp.FtpConnect">
<beans:property name="foo" value="123" />
</beans:bean>
</ftplet>
</ftplets>
<file-user-manager file="./res/conf/users.properties" />
</server>
C:\shared\ftpserver-1.0.0-M.3\ftpserver-1.0.0-M3\bin>ftpd.bat
C:\shared\ftpserver-1.0.0-M.3\ftpserver-1.0.0-M3\res\conf\ftpd-typical.xml
Using XML configuration file
C:\shared\ftpserver-1.0.0-M.3\ftpserver-1.0.0-M3\res\conf\ftpd-typical.xml...
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 32
in XML document from file
[C:\shared\ftpserver-1.0.0-M.3\ftpserver-1.0.0-M3\res\c
onf\ftpd-typical.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: The prefix "beans" for element "beans:bean" is
not bound.
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at
org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
at
org.apache.ftpserver.main.CommandLine.getConfiguration(CommandLine.java:132)
at org.apache.ftpserver.main.CommandLine.main(CommandLine.java:56)
Caused by: org.xml.sax.SAXParseException: The prefix "beans" for element
"beans:bean" is not bound.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:255)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
... 6 more
C:\shared\ftpserver-1.0.0-M.3\ftpserver-1.0.0-M3\bin>