Oracle XDB Restlet Adapter - Installing
Installing Oracle XDB Adapter
Requirements
- JDK 1.5 (included at your ORACLE_HOME/jdk directory)
- Ant 1.7.0+
- an 11g target database, tested with 11.1.0.6.0+
- By now Oracle Restlet Adapter is only available through SVN access or using nightly builds, checkout SVN source or download an snapshop version.
Installing
First edit into your home directory a file named build.properties with:
# Restlet project
# xdb_11.1 specific
sqlnet.string=test
jdbc.username=RESTLET
jdbc.password=RESTLET
jdbc.sysusr=sys
jdbc.syspwd=change_on_install
- sqlnet.string property is a valid Oracle SQLNet connect string to the target database.
- jdbc.{username|password} are a valid Oracle user name and password to be created for storing Restlet code. Note that in Oracle 11g user name and password are case sensitive by default, so use always uppercase values to work well with the .sql script provided in this installer.
- jdbc.{sysusr|syspwd} are a valid Oracle DBA User account used to create above user schema and other related task only performormed by user who have DBA role.
Also is necessary a valid ORACLE_HOME environment variable defined to a valid Oracle 11g home directory, this variable then is used to locate for example the SQLPlus application.
Second create a sub-directory into Restlet library directory named oracle.xdb_11.1, put into this new directory these Oracle libraries:
$ORACLE_HOME/jdbc/lib/ojdbc5.jar
$ORACLE_HOME/rdbms/jlib/xdb.jar
$ORACLE_HOME/lib/xmlparserv2.jar
edit a a file named library.xml into above directory with this content.
<library id="xdb">
<package name="oracle.xdb" />
<version>11.1</version>
<release>1</release>
<distributions>
<distribution id="classic" />
</distributions>
<homeUri>
http://www.oracle.com/technology/tech/xml/xmldb/index.html
</homeUri>
</library>
edit another new file named build.properties into above directory with:
bin.includes = META-INF/,\
ojdbc5.jar,\
xdb.jar,\
xmlparserv2.jar
then edit the file pom.xml into modules directory of Restlet sources addind a new line in section properties with:
<lib-xdb-version>11.1.1</lib-xdb-version>
To compile Restlet sources and generate all Maven artifacts and Restlet
libraries go to build directory and execute
ant without arguments.
Finally go the directory:
# cd build/temp/jee/dist/classic/restlet-jee-2.0snapshot/src/org.restlet.ext.xdb_11.1/resources
and execute Ant without argument:
# ant
To start using XDB Adapter ant without arguments is the only target required in a fresh database install. Other targets are provided during development stage, for example if you update the adapter code only the target load-server-side-runtime is required to re-install it.
Enabling your XMLDB HTTP support
Oracle databases do not enable by default XMLDB HTTP repository access. To enable it using SQLPlus connected as SYSDBA execute:
SQL> exec dbms_xdb.sethttpport(8080);
Restart your database and test with a browser or any WebDAV enable file manager a connection to http://localhost:8080/


The last ant command (run without arguments) fails to successfully load the requisite .JAR into the database. The .JAR files don't live where build.xml is looking for them.
Can you please update this page to indicate specifically which .JAR files are required for upload (servlet, xml, core, and xdb adapter). An explicit link to the SVN repository would be best. I can then provide an updated document outlining the procedure I've followed to get this demo working for me.
Best Regards,
Mathew Butler