Connection to MarkLogic Database

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Connection to MarkLogic Database

Post by mwliford »

I'm trying to create a connection to the MarkLogic Server Release 4.1 database. The documentation is very confusing and I can't get the connection to work. Exactly what driver files do I need to use and where do I get them?
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Connection to MarkLogic Database

Post by adrian »

Hello,

You can find the drivers for the data source here:
http://xqzone.marklogic.com/products/xcc/4.1
You need the XCC Java distribution and from that zip you need 'lib/xcc.jar'.

Then configure a connection like described here:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ction.html

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Thanks Adrian, but no joy. I'm assuming I should be able to expand the MarkLogic connection in the Data Source Explorer, but nothing happens.

When I created the XDBC and WebDAV servers, I created separate document root directories for them. Is this right or should they share the document root with the HTTP server?

Don't know what else to do. It doesn't seem like it should be this hard.
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Also, I'm not getting anything telling me what's wrong. Are there any logs of something that might tell me what's going on?
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Connection to MarkLogic Database

Post by adrian »

It is not mandatory but it's generally a good idea to have both the WebDAV and the XDBC host configuration to point to the same location in the database to avoid confusion.
The XDBC host is used for XQuery transformations and debugging while the WebDAV host is used for browsing in the Data Source Explorer.

When you expand the connection in the Data Source Explorer it should at least show a "pending" node. Then if the connection fails it will show you the error message in place of the pending node. Is there an error message?

If you expand it and the pending node disappears and there's nothing there to replace it, maybe there really are no resources in that location(it's empty). You can right click on the connection and add new containers or resources.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Through the MarkLogic Sever admin page, the Status tab shows me I have 37 documents, 81 fragments, and 1 strand using 28 MBytes of space.

When I first start Oxygen, the connection has a plus sign to the left of the connection name. When I click on it, I get "pending" under the name for just a split second. Then the plus sign goes away and I can't expand the connection name. Since there is something in the database, I assume there should be some kind of structure.

I'm trying to access the Shakespeare database from the tutorials. This database is set to the default for all the servers.

Any other ideas? :cry:
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Everything is running on my PC. The host for the XDBC server is "localhost". This should work, right? It works when I use http://localhost:8004 in my browser.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Connection to MarkLogic Database

Post by adrian »

So it works in the web browser? You can browse through the files on the WebDAV server from the web browser?

For browsing in 'Data Source Explorer' only the WebDAV server is relevant. Did you configure the WebDAV URL from the data source connection to point to http://localhost:8004 ?

Can you browse the WebDAV location using File -> Open URL... ?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Well, port 8004 is the XDBC server. Port 8003 is the WebDAV server. When i go to either of them in the browser, I'm asked for my username/password then I get the 404 Not Found page which makes sense because there is nothing in the document root directory.

When I try File->Open URL for localhost:8003, Oxygen continually asks me for the username/password, that dialog box just keeps coming back. It doesn't seem to be able to log in. I'm using the admin user to try to log in. Something wrong with that?
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

Authentication method is set to basic in both servers (XDBC and WebDAV).
mwliford
Posts: 8
Joined: Thu Sep 30, 2010 2:32 pm

Re: Connection to MarkLogic Database

Post by mwliford »

And admin is the default user in the WebDAV server.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Connection to MarkLogic Database

Post by adrian »

OK, so the WebDAV URL is http://localhost:8003
It doesn't matter that it's the admin user, it should work.
Can you double check the authentication with that user and password in the admin page: http://localhost:8001 ?

Also, could you go back to the admin page: http://localhost:8001 and configure the WebDAV server on 8003(Groups -> Default -> App Servers-> <WebDAV Server>) to point to the root of the database(root: "/") if it isn't already?
This is to make sure that it isn't somehow pointing to a missing location...

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply