exist-db : Issues with ant task xdb:adduser or xdb:users : no such handler

68 views Asked by At

I'm using ant scripts for initializing my exist-db. But, I have this script below (dummy version) which is working in my local platform and not on my procution one. As I'm not the one who handle the configuration of this database, I don't know where to look in the conf to fix this.

Here is the script (which is just trying to add a new user) :

<project basedir="." default="default" name="ANTProject">

     <property file="load.properties"/>

     <path id="classpath.core">
      <fileset dir="${path}/lib/core">
       <include name="*.jar"/>
      </fileset>
      <pathelement path="${path}\exist.jar"/>
      <pathelement path="${path}\exist-optional.jar"/>
     </path>

     <typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant">
      <classpath refid="classpath.core"/>
     </typedef>

     <target name="default">

      <echo message="Création du compte ${login}"/>
      <xdb:adduser xmlns:xdb="http://exist-db.org/ant" 
       uri="xmldb:exist://${exist.uri}/exist/xmlrpc/db"
       name="${login}" secret="${password}" primaryGroup="${user.group}" user="${root.login}"
       password="${root.password}"/>

     </target>                 

</project>

I get this error message :

 XMLDB exception caught: No such handler: Default.setUser

I get the same thing if I use xdb:users task, but the xdb:store is working well... I'm running exist 2.1, in both my local and production plateform, and as already told, same scripts working well on local one...

I guess, it's something about the exist configuration, but I didn't find anything on enabling this tasks in the documentation. If someone could help...

1

There are 1 answers

4
Eric S On

Ok, I got it. Just for completeness, It was an issue on jar librairies. It seems I used ones which support xdb:store, but not others tasks (didn't find any release version of this)... This ant depandancies is quite tricky and It's hard to know what your jars offer...