Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.0, 1.0.1
    • Fix Version/s: 1.0.2
    • Component/s: Core
    • Labels:
      None
    • Environment:
      java version "1.6.0_13"
      Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
      Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

      Description

      This bug report is related to FTPSERVER-301. I think I'm missunderstood.
      I'm looking forward to use apache ftpserver with a database for my users. The documentation says to include the <db-user-manager> tag to my configuration file. So I start the ftpserver with the configuration file ftpd-full.xml that includes this tag.
      I'm expecting an error like bean "datasource" not found or the jdbc driver could not be loaded (ClassNotFoundException or something similar)
      Instead of these errors I get the following stacktrace as I mentioned in FTPSERVER-301 before:

      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 31 in XML document from file [C:\Dokumente u
      nd Einstellungen\Kamil\Desktop\apache-ftpserver-1.1.0-SNAPSHOT\res\conf\evo.xml] is invalid; nested exception is org.xml
      .sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'db-user-manager'. One o
      f '

      {"http://mina.apache.org/ftpserver/spring/v1":native-filesystem, "http://mina.apache.org/ftpserver/spring/v1":filesys tem, "http://mina.apache.org/ftpserver/spring/v1":commands, "http://mina.apache.org/ftpserver/spring/v1":messages}

      ' is e
      xpected.
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.j
      ava:404)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.jav
      a:342)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.jav
      a:310)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefini
      tionReader.java:143)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefini
      tionReader.java:178)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefini
      tionReader.java:149)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefini
      tionReader.java:212)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationC
      ontext.java:113)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationC
      ontext.java:80)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefresha
      bleApplicationContext.java:123)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationCont
      ext.java:423)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.ja
      va:140)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.ja
      va:84)
      at org.apache.ftpserver.main.CommandLine.getConfiguration(CommandLine.java:133)
      at org.apache.ftpserver.main.CommandLine.main(CommandLine.java:57)
      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'db-us
      er-manager'. 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/v 1":messages}

      ' is expected.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
      236)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator
      .java:429)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)

      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1831
      )
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.ja
      va:330)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XML
      DocumentFragmentScannerImpl.java:1693)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScanne
      rImpl.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.j
      ava:396)
      ... 15 more

        Issue Links

          Activity

          Peter Lokus created issue -
          Hide
          Niklas Gustavsson added a comment -

          This is an issue due to the XML containing two user managers. Please delete the file based user manager and this error should go away. This has been fixed for 1.0.2 where the db-user-manager is commented out.

          Show
          Niklas Gustavsson added a comment - This is an issue due to the XML containing two user managers. Please delete the file based user manager and this error should go away. This has been fixed for 1.0.2 where the db-user-manager is commented out.
          Niklas Gustavsson made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Niklas Gustavsson [ niklas ]
          Resolution Won't Fix [ 2 ]
          Niklas Gustavsson made changes -
          Affects Version/s 1.0.1 [ 12313619 ]
          Affects Version/s 1.0.0 [ 12312283 ]
          Affects Version/s 1.0.2 [ 12313952 ]
          Niklas Gustavsson made changes -
          Link This issue duplicates FTPSERVER-301 [ FTPSERVER-301 ]
          Hide
          Peter Lokus added a comment -

          Sorry Niklas! I did a stupid mistake. I have missed the line <file-user-manager file="users.properties" encrypt-passwords="true" /> in ftpd-full.xml. Obviously, ftpserver is running with a db-user-manager now. Sorry for wasting your time!

          Show
          Peter Lokus added a comment - Sorry Niklas! I did a stupid mistake. I have missed the line <file-user-manager file="users.properties" encrypt-passwords="true" /> in ftpd-full.xml. Obviously, ftpserver is running with a db-user-manager now. Sorry for wasting your time!

            People

            • Assignee:
              Niklas Gustavsson
              Reporter:
              Peter Lokus
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development