Miroslav

Thanks very much following the standard has worked.

________________________________________
From: Miroslav Pokorny <miroslav.poko...@gmail.com>
Sent: Monday, January 11, 2021 11:47 AM
To: ftpserver-users@mina.apache.org
Subject: Re: FTPlet properties not exposed from configuration

Hi Charles,

Not quite sure, and havent actually tested but you have named your fields
using a non standard capitalisation.

> private String QueueUser;
>   private String QueueKey;
>   private String QueueExchangeName;

The java standard for fields is that they start with a lower case letter,
so rename "QueueUser" to "queueUser", "QueueKey" to "queueKey" and
"QueueExchangeName" to "queueExchangeName".

Your class name is also "wrong", the java standard is that class names
start with a capital letter, so "myFtplet" should be "MyFtplet".
> public class myFtplet extends DefaultFtplet {

This might help with your Spring problem, but i havent actually checked but
its always best to follow these standards.

Regards

mP

On Mon, 11 Jan 2021 at 18:01, Charles Titus Palapala <ctpalap...@tra.go.tz>
wrote:

> ?Dear all
>
> I writing a simple  ftplet for apache ftp server.
>
>
> package net.test.ftpserver.ftpletservice.myFtplet;
>
>
> public class myFtplet extends DefaultFtplet {
>   private final Logger LOG = LoggerFactory.getLogger(EFDMSFtplet.class);
>
>   private String QueueUser;
>
>   private String QueueKey;
>
>   private String QueueExchangeName;
>
> public String getQueueHost() {
>         return QueueHost;
> }
>
> public void setQueueHost(String queueHost) {
>         QueueHost = queueHost;
> }
>
> public String getQueueUser() {
>         return QueueUser;
> }
>
> public void setQueueUser(String queueUser) {
>         this.QueueUser = queueUser;
> }
>
> public String getQueueKey() {
>         return QueueKey;
> }
>
> public void setQueueKey(String queueKey) {
>         this.QueueKey = queueKey;
> }
>
> public String getQueueExchangeName() {
>         return QueueExchangeName;
> }
>
> public void setQueueExchangeName(String queueExchangeName) {
>         this.QueueExchangeName = queueExchangeName;
> }
>
> }
>
>
>
> Then I set my bean property as
>
> <ftplets>
>         <ftplet name="Ftplet1">
>         <beans:bean class="net.test.ftpserver.ftpletservice.myFtplet">
>         <beans:property name="QueueKey" value="admin123" />
>         <beans:property name="QueueExchangeName" value="exFILLING" />
>         <beans:property name="secureFolder" value="c:/secureFolder" />
>         </beans:bean>
> </ftplet>
> </ftplets>
>
>
> When I start my apache ftp Server I get the following Error
>
> [ERROR] 2021-01-02 15:31:59,752 [] [] Daemon error
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'org.apache.ftpserver.FtpServerFactory#0': Cannot create inner
> bean
> 'net.tra.ftpserver.ftpletservice.EFDMSFtplet#12bb9f0' of type
> [net.tra.ftpserver.ftpletservice.EFDMSFtplet] while setting bean property
> 'ftplets' with key [EFDMSFtplet1]; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'net.tra.ftpserver.ftpletservice.EFDMSFtplet#12bb9f0' defined in
> file
> [C:\apache-ftpserver\ftp\res\conf\ftpd-typical.xml]: Initialization of bean
> failed; nested exception is
> org.springframework.beans.InvalidPropertyException:
> Invalid property 'QueueKey' of bean class
> [net.tra.ftpserver.ftpletservice.EFDMSFtplet]: No property 'QueueKey' found
>         at
>
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
>         at
>
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
>         at
>
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)
>         at
>
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134)
>         at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>
>
>
>
> I can not figure out what is wrong.
>
>
> Charles?
>
>
> ________________________________
>
>
>
> DISCLAIMER: This e-mail and any attachments are proprietary to TANZANIA
> REVENUE AUTHORITY.Any unauthorized use or interception is illegal. The
> views and opinions expressed are those of the sender, unless clearly stated
> as being those of TANZANIA REVENUE AUTHORITY. This e-mail is only addressed
> to the addressee and TANZANIA REVENUE AUTHORITY shall not be responsible
> for any further publication of the contents of this e-mail. If this e-mail
> is not addressed to you, you may not copy, print, distribute or disclose
> the contents to anyone nor act on its contents. If you received this in
> error, please inform the sender and delete this e-mail from your computer.
>
>
>

--
mP

________________________________



DISCLAIMER: This e-mail and any attachments are proprietary to TANZANIA REVENUE 
AUTHORITY.Any unauthorized use or interception is illegal. The views and 
opinions expressed are those of the sender, unless clearly stated as being 
those of TANZANIA REVENUE AUTHORITY. This e-mail is only addressed to the 
addressee and TANZANIA REVENUE AUTHORITY shall not be responsible for any 
further publication of the contents of this e-mail. If this e-mail is not 
addressed to you, you may not copy, print, distribute or disclose the contents 
to anyone nor act on its contents. If you received this in error, please inform 
the sender and delete this e-mail from your computer.


Reply via email to