You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "DeBoer, Tim" <Ti...@fisglobal.com> on 2010/04/22 03:01:52 UTC

Extending Spring Configuration Definition

Hi,

 

I'm looking to make a few customisations to the FTPServer but cannot due
to the xsd validation in the configuration. Basically, I want to create
a new user-manager and add a sha1 password encrypter with base64
encoding rather than the default hex encoding (historical reasons) but
I'm getting xsd validation errors when I try and add sha1 an encryption
type in the spring configuration file. 

 

I've created a new encryption class called Sha1Base64PasswordEncryptor
and added the initialisation in UserManagerBeanDefinitionParser but when
I add sha1 to the ftpd-typical.xml config file it blows up with the
following exception.

 

"Using XML configuration file ./conf/ftpd-typical.xml...

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 27 in XML document from file
[C:\dev\FTPServer\.\conf\ftpd-typical.xml] is invalid; nested exception
is org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'sha1' is
not facet-valid with respect to enumeration '[clear, md5, salted]'. It
must be a value from the enumeration.

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

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

......

Caused by: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value
'sha1' is not facet-valid with respect to enumeration '[clear, md5,
salted]'. It must be a value from the enumeration.

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

......"

 

Can anyone tell me the best way to go about solving this issue? Can I
create or override the spring xsd to add these elements or can I copy
the spring configuration xsd and refer to it modified from the file
system? Any help or advise would be appreciated as I've not much
experience with name spaces/DTD's/XSD's or with spring for that matter
etc...

 

Thanks in advance.

 

Tim

 

p.s. is this mailing list the place for these questions? Or is there a
forum that I haven't been able to find somewhere?

_____________

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
_____________

RE: Extending Spring Configuration Definition

Posted by Frank van der Kleij <kl...@hotmail.com>.
You could also replace the user manager by your own (which might subclass the existing). I did it like that, see 

http://vfs-utils.sourceforge.net/ftpserver/configuration.html

Frank
 		 	   		  
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/