You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Hasan Wasiq <wa...@prn.com> on 2009/02/17 21:09:52 UTC

Problem deploying ftplet

Hi everybody, 

 

I created a test ftplet and tried to add to the ftpd-typical.xml.

I'm using apache-ftpserver-1.0.0-RC2, jdk1.5m windows XP

 

Thanks

-wasiq

 

Here is my ftpd-typical.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<server xmlns="http://mina.apache.org/ftpserver/spring/v1"

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xmlns:beans="http://www.springframework.org/schema/beans"

            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">

                            <ssl>

                <keystore file="./res/ftpserver.jks" password="password"
/>

            </ssl>

                        </nio-listener>

            </listeners>

            <file-user-manager file="./res/conf/users.properties" />

<ftplets>

  <ftplet name="MyFtplet">

   <beans:bean class="MyFtplet">

   </beans:bean>

  </ftplet>

 </ftplets>

 

</server>

 

 

 

Here is the error:

 

C:\workspace\apache-ftpserver-1.0.0-RC2>.\bin\ftpd.bat
.\res\conf\ftpd-typical.xml

Using XML configuration file .\res\conf\ftpd-typical.xml...

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 31 in XML document from file
[C:\workspace\apache-ftpserver-1.0.0-RC2\.\res\conf\ftpd-typical.xml] is
invalid; nested except

ion is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'ftplets'. One of
'{"http://mina.apache.org/ftpserver/spring/v1":native-filesystem, "http:

//mina.apache.org/ftpserver/spring/v1":filesystem,
"http://mina.apache.org/ftpserver/spring/v1":commands,
"http://mina.apache.org/ftpserver/spring/v1":messages}' is expected.

        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBean
Definitions(XmlBeanDefinitionReader.java:404)

        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDe
finitions(XmlBeanDefinitionReader.java:342)

        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDe
finitions(XmlBeanDefinitionReader.java:310)

        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.l
oadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.l
oadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.l
oadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.l
oadBeanDefinitions(AbstractBeanDefinitionReader.java:212)

        at
org.springframework.context.support.AbstractXmlApplicationContext.loadBe
anDefinitions(AbstractXmlApplicationContext.java:113)

        at
org.springframework.context.support.AbstractXmlApplicationContext.loadBe
anDefinitions(AbstractXmlApplicationContext.java:80)

        at
org.springframework.context.support.AbstractRefreshableApplicationContex
t.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)

        at
org.springframework.context.support.AbstractApplicationContext.obtainFre
shBeanFactory(AbstractApplicationContext.java:423)

        at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:353)

        at
org.springframework.context.support.FileSystemXmlApplicationContext.<ini
t>(FileSystemXmlApplicationContext.java:140)

        at
org.springframework.context.support.FileSystemXmlApplicationContext.<ini
t>(FileSystemXmlApplicationContext.java:84)

        at
org.apache.ftpserver.main.CommandLine.getConfiguration(CommandLine.java:
134)

        at
org.apache.ftpserver.main.CommandLine.main(CommandLine.java:58)

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
Invalid content was found starting with element 'ftplets'. One of
'{"http://mina.apache.org/ftpserver/spring/v1":native-filesystem, "h

ttp://mina.apache.org/ftpserver/spring/v1":filesystem,
"http://mina.apache.org/ftpserver/spring/v1":commands,
"http://mina.apache.org/ftpserver/spring/v1":messages}' is expected.

        at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXPar
seException(ErrorHandlerWrapper.java:236)

        at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorH
andlerWrapper.java:172)

        at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XML
ErrorReporter.java:382)

        at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XML
ErrorReporter.java:316)

        at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorRe
porter.reportError(XMLSchemaValidator.java:429)

        at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSche
maError(XMLSchemaValidator.java:3185)

        at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStar
tElement(XMLSchemaValidator.java:1831)

        at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEleme
nt(XMLSchemaValidator.java:705)

        at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanSta
rtElement(XMLNSDocumentScannerImpl.java:330)

        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16
93)

        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFragmentScannerImpl.java:368)

        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:834)

        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)

        at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)

        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.jav
a:250)

        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Docume
ntBuilderImpl.java:292)

        at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument
(DefaultDocumentLoader.java:75)

        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBean
Definitions(XmlBeanDefinitionReader.java:396)

        ... 15 more


Re: Problem deploying ftplet

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Feb 17, 2009 at 9:09 PM, Hasan Wasiq <wa...@prn.com> wrote:
> I created a test ftplet and tried to add to the ftpd-typical.xml.

Make sure to put your Ftplet definition in the XML before the user
manager, and you should be better of.

/niklas