Configuring & starting server and running failed due to class not found, but later I've modified the ./basexrest script as: (Included all the jars in lib folder)
#!/bin/bash
# Path to this script
PWD=`dirname $0`
# Paths to distributed files or source directories
BASEX=$PWD/BaseX.jar
BASEXAPI=$PWD/../lib/basex-api.jar
# Classpath
LIB=$PWD/../lib
LIB_CP=""
for JAR_FILE in $LIB/*.jar
do
LIB_CP="$LIB/$JAR_FILE:$LIB_CP"
done
CP=$BASEX:$BASEXAPI:$LIB_CP
# Options for virtual machine
VM=-Xmx1g
# Run REST server
java -cp "$CP" $VM org.basex.api.jaxrx.JaxRxServer "$@"
java.lang.IncompatibleClassChangeError: Class javax.ws.rs.core.Response$Status does not implement the requested interface javax.ws.rs.core.Response$StatusType
at com.sun.jersey.spi.container.ContainerResponse.getStatus(ContainerResponse.java:548)
at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.commitWrite(ContainerResponse.java:156)
at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.write(ContainerResponse.java:133)
at org.basex.io.BufferedOutput.flush(BufferedOutput.java:50)
at org.basex.io.PrintOutput.flush(PrintOutput.java:126)
at org.basex.data.XMLSerializer.cls(XMLSerializer.java:206)
at org.basex.data.Serializer.close(Serializer.java:219)
at org.basex.api.jaxrx.BXJaxRx$1.code(BXJaxRx.java:96)
at org.basex.api.jaxrx.BXCode.run(BXCode.java:53)
at org.basex.api.jaxrx.BXOutput.write(BXOutput.java:53)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:299)
Your help is appreciated.