Hi Sai,

Thanks for your reply... I've now added commons-pool-1.4.jar to my common/lib/ folder, and I now get a different series of errors, which begin as below...

Is there some way that I can discover any other dependencies which may have an impact...?

Cheers
Steve

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ftpserver.FtpServerFactory#0': Cannot create inner bean '(inner bean)' while setting bean property 'userManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.apache.ftpserver.ftplet.UserManager org .apache .ftpserver.usermanager.DbUserManagerFactory.createUserManager()] threw exception; nested exception is org.apache.ftpserver.FtpServerConfigurationException: Failed to open connection to user database


On 11 Mar 2009, at 21:37, Sai Pullabhotla wrote:

I wonder if you installed commons-pool which is required for the DBCP.

Thanks.

Sai Pullabhotla
Phone: (402) 408-5753
Fax: (402) 408-6861
www.jMethods.com



On Wed, Mar 11, 2009 at 3:48 PM, Steve Winter <[email protected] >wrote:

Hi,

I'm new to the list, and unfortunately new to Java apps. so am really
struggling with trying to get the server setup to use MySQL as the user base
under OS X

I downloaded the server and got it running using the ftpd- typical.xml no
problems. I've also downloaded commons-dbcp, and added
commons-dbcp-1.2.2.jar to the common/lib folder. I've also got the MySQL
database/table setup.

Within the config xml file I've now got the setup as below, however when I
try to start the server, I get this error;

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ftpserver.usermanager.DbUserManagerFactory#0': Cannot create inner bean 'org.apache.commons.dbcp.BasicDataSource#7361e2' of type [org.apache.commons.dbcp.BasicDataSource] while setting bean property
'dataSource'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.commons.dbcp.BasicDataSource#7361e2' defined in file [/Users/stevewinter/Downloads/apache-ftpserver-1.0.0/res/conf/ftpd- typical.xml]:
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError:
org/apache/commons/pool/impl/GenericObjectPool

Any help with resolving this very much appreciated...

Cheers
Steve


<server xmlns="http://mina.apache.org/ftpserver/spring/v1";
      xmlns:beans="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
      xsi:schemaLocation="
         http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
         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>
      <db-user-manager encrypt-passwords="salted">
              <data-source>
                      <beans:bean
class="org.apache.commons.dbcp.BasicDataSource">
                        <beans:property name="driverClassName"
value="com.mysql.jdbc.Driver" />
                        <beans:property name="url"
value="jdbc:mysql://localhost/ftpd" />
<beans:property name="username" value="ftp" /> <beans:property name="password" value="password"
/>
                      </beans:bean>
              </data-source>
<insert-user>INSERT INTO FTP_USER (userid, userpassword,
                      homedirectory, enableflag, writepermission,
idletime, uploadrate,
downloadrate) VALUES ('{userid}', '{userpassword}',
'{homedirectory}',
'{enableflag}', '{writepermission}', {idletime},
{uploadrate},
                      {downloadrate})</insert-user>
              <update-user>UPDATE FTP_USER SET

userpassword = '{userpassword }',homedirectory = '{homedirectory }',enableflag = {enableflag },writepermission = {writepermission },idletime ={idletime},uploadrate={uploadrate},downloadrate={downloadrate}
                      WHERE userid='{userid}'</update-user>
<delete-user>DELETE FROM FTP_USER WHERE userid = '{userid}'
              </delete-user>
<select-user>SELECT userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate,
downloadrate FROM
FTP_USER WHERE userid = '{userid}'</select- user>
              <select-all-users>SELECT userid FROM FTP_USER ORDER BY
userid
              </select-all-users>
              <is-admin>SELECT userid FROM FTP_USER WHERE
userid='{userid}' AND
                      userid='admin'</is-admin>
              <authenticate>SELECT userpassword from FTP_USER WHERE
userid='{userid}'</authenticate>
      </db-user-manager>
</server>


Steve Winter
[email protected]
m: +44 77 7852 4776
3 Calshot Court, Channel Way
Ocean Village, Southampton SO14 3GR

Reply via email to