SQL Module with eXist

View: New views
2 Messages — Rating Filter:   Alert me  

SQL Module with eXist

by Chris Grocott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We have tried to install the SQL module by doing the following:

C:\Progam Files\eXist\build.bat extension-modules (log file attached)

We set our classpath= C:\Program Files\Java\jdk1.6.0_06

C:\Program Files\eXist\lib\extensions now contains :
  exist-modules.jar
  exist-ngram-module.jar

Our files were compiled during the "build.bat extension-modules" install of the SQL module and when I run "unzip -t unzip-modules.jar" they are all listed as "ok" (log file attached).

From the eXist index page, navigating to the Function Library  (http://localhost:9080/exist/xquery/functions.xq) the SQL module is not listed.

I uncommented the entry in the conf.xml file that appears to relate to the SQL module and restarted the database but the sql module is not listed on the function page. The following are listed:

http://exist-db.org/xquery/examples        A simple example module
http://exist-db.org/xquery/ngram        Extension functions for NGram search.
http://exist-db.org/xquery/request        Functions dealing with HTTP requests
http://exist-db.org/xquery/response        Functions dealing with HTTP responses
http://exist-db.org/xquery/session        Functions dealing with the HTTP session
http://exist-db.org/xquery/system  Functions to retrieve information about eXist and the system.
http://exist-db.org/xquery/text        Extension functions for text searching
http://exist-db.org/xquery/transform        Functions to deal with XSL transformations
http://exist-db.org/xquery/util        Various utility extension functions
http://exist-db.org/xquery/validation        XML validation and grammars functions.
http://exist-db.org/xquery/xmldb        Database manipulation functions
http://www.w3.org/2005/xpath-functions        XQuery/XPath Core Library Functions


The conf.xml file is attached. Are we following the correct instructions and is there something we are missing ?

Thanks
Chris


Parent Message unknown Re: SQL Module with Exist

by Adam Retter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chris,

Yes it seems the documentation is now not tied to the module being
loaded but is generated as part of an offline process.

Sorry but what do you mean by "raised an on-line "SQL Module with eXist""?

Yes, you need your Oracle JDBC driver on the classpath, so drop the
Jar file into something like eXist's lib/user folder. You will know if
it is working when you run the following in the query view of the Java
admin client -

declare namespace sql="http://exist-db.org/xquery/sql";

sql:get-connection("JDBC.class.name", "jdbc:connection://url")


If you get a message about an unknown function then the SQL module has
not been loaded correctly. At present there is not much documentation
but it really is pretty simple. I would recommend yjust trying a few
very simple SQL statements in the admin client and seeing how the data
is returned, from there you should get the idea...

Any problems let me know...

Cheers Adam.

2008/5/16 Chris Grocott <Chris.Grocott@...>:

>
> Adam
>
> We have been having trouble getting the SQL Module to work. I raised an
> on-line "SQL Module with eXist" but nobody has yet added any advice.
>
> Can you help ?  Also, we considered the possibility that even though the SQL
> module does not appear in the functions list that it might actually be
> working (as I read some other on-line questions about modules not appearing
> in the functions list after they have been installed).
>
> We are feeling our way along here but I am assuming once it does work that
> we use a JDBC driver to then access our Oracle database from eXist. Our end
> goal is to run off eXist but ideally to run SQL from eXist to access Oracle.
>  Is this possible, and if so are there any Getting Started type guides other
> than the normal eXist documentation that you can recommend - perhaps with
> example XQuery documents containing SQL, etc. ?
>
> Thanks
> Chris
>
> ________________________________
>
> The information contained in this electronic message and any attachments are
> intended for specific individuals or entities, and may be confidential,
> proprietary or privileged. If you are not the intended recipient, please
> notify the sender immediately, delete this message and do not disclose,
> distribute or copy it to any third party or otherwise use this message. The
> content of this message does not necessarily reflect the official position
> of the World Food Programme. Electronic messages are not secure or error
> free and may contain viruses or may be delayed, and the sender is not liable
> for any of these occurrences. The sender reserves the right to monitor,
> record and retain electronic messages.



--
Adam Retter

eXist Developer
{ England }
adam@...
irc://irc.freenode.net/existdb

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open