0

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...

Eric S
  • 452
  • 4
  • 10

1 Answers1

0

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...

Eric S
  • 452
  • 4
  • 10
  • which versions of eXist are you using? – adamretter Dec 02 '14 at 13:03
  • 2.1. But I need to use it in a context outside of exist (deployment context), so I can't reference the exist_home directly. I have an external ant installation and I first try to import the exist.jar and exist-optionnal.jar, but didn't work. At the moment, I duplicate the entire lib/core of exist on my deployment context. – Eric S Dec 02 '14 at 16:16
  • 1
    I would suggest using a copy of the same version of eXist on the Server and Client. – adamretter Dec 04 '14 at 13:57
  • Yeah, but in my organization, I got batch server and I can't install an exist distribution on it... So I needed to call ant remotely from the exist server and need to import all the dependecies without exist avalaible locally... not a piece of cake... We finally made all the imports in Java then. – Eric S Dec 19 '14 at 17:06