Debugging MarkLogic Rest Extensions
Posted: Fri Mar 06, 2015 12:37 pm
I am trying to debug MarkLogic rest extensions with the xquery debugger.
I've set up a Datasource and a connection to my local MarkLogic 7 instance.
In the datasource explorer I can open up the right rest extension.
I select my HTTP server I want to debug and enable debug on that server.
If I then fire a rest call to that server and refresh the requests I see some request that is halted by the debugger. It is not my rest extension but /MarkLogic/rest-api/endpoints/resource-service-query.xqy
I then select that request and choose Debug, the debugger perspective is opened and the beforementioned xquery file is opened twice! I can then step through that module and have my endpoint run to completion but I cannot get the debugger to stop in the actual rest extension module.
When I start the debugging session I get the following errors
Severity: warning
Description: Could not update breakpoints. They will not be in effect: The XDBC server used to send queries may not have its modules configured correctly. XDBC server name: sarepta-xcc, Modules database: sarepta-modules, Modules root: /. DBG-MODULEDNE: ns1:line(11419614729549573805, "/marklogic.rest.resource/reports/assets/resource.xqy", xs:unsignedInt("13")) -- Module not found: /marklogic.rest.resource/reports/assets/resource.xqy
When I try to set a breakpoint in the resource.xqy file for my extension I get this message in a message box:
The XDBC server used to send queries may not have its modules configured correctly. XDBC server name: sarepta-xcc, Modules database: sarepta-modules, Modules root: /. DBG-MODULEDNE: ns1:line(xs:unsignedLong("11419614729549573805"), "/marklogic.rest.resource/reports/assets/resource.xqy", 15) -- Module not found: /marklogic.rest.resource/reports/assets/resource.xqy
I also created a validation scenario with the MarkLogic connection as engine and if I open up the endpoint in the connection view and validate it with the scenario I get this error message:
System ID: /Users/pkester/Development/StandardNorway/Release_2015-02_22/Release_2015_02_22/Src/Sarepta.MarkLogic/rest-api/ext/reports.xqy
Main validation file: /Users/pkester/Development/StandardNorway/Release_2015-02_22/Release_2015_02_22/Src/Sarepta.MarkLogic/rest-api/ext/reports.xqy
Scenario name: MarkLogic XQuery
Engine name: Sarepta
Severity: error
Description: XDMP-EVALLIBMOD: xdmp:eval("xquery version "1.0-ml"; module namespace rep...", (), <options xmlns="xdmp:eval"><default-xquery-version>app-server</default-xquery-version><stat...</options>) -- Cannot evaluate library module:
Can you tell me what I'm missing here?
Thanks,
Peter
I've set up a Datasource and a connection to my local MarkLogic 7 instance.
In the datasource explorer I can open up the right rest extension.
I select my HTTP server I want to debug and enable debug on that server.
If I then fire a rest call to that server and refresh the requests I see some request that is halted by the debugger. It is not my rest extension but /MarkLogic/rest-api/endpoints/resource-service-query.xqy
I then select that request and choose Debug, the debugger perspective is opened and the beforementioned xquery file is opened twice! I can then step through that module and have my endpoint run to completion but I cannot get the debugger to stop in the actual rest extension module.
When I start the debugging session I get the following errors
Severity: warning
Description: Could not update breakpoints. They will not be in effect: The XDBC server used to send queries may not have its modules configured correctly. XDBC server name: sarepta-xcc, Modules database: sarepta-modules, Modules root: /. DBG-MODULEDNE: ns1:line(11419614729549573805, "/marklogic.rest.resource/reports/assets/resource.xqy", xs:unsignedInt("13")) -- Module not found: /marklogic.rest.resource/reports/assets/resource.xqy
When I try to set a breakpoint in the resource.xqy file for my extension I get this message in a message box:
The XDBC server used to send queries may not have its modules configured correctly. XDBC server name: sarepta-xcc, Modules database: sarepta-modules, Modules root: /. DBG-MODULEDNE: ns1:line(xs:unsignedLong("11419614729549573805"), "/marklogic.rest.resource/reports/assets/resource.xqy", 15) -- Module not found: /marklogic.rest.resource/reports/assets/resource.xqy
I also created a validation scenario with the MarkLogic connection as engine and if I open up the endpoint in the connection view and validate it with the scenario I get this error message:
System ID: /Users/pkester/Development/StandardNorway/Release_2015-02_22/Release_2015_02_22/Src/Sarepta.MarkLogic/rest-api/ext/reports.xqy
Main validation file: /Users/pkester/Development/StandardNorway/Release_2015-02_22/Release_2015_02_22/Src/Sarepta.MarkLogic/rest-api/ext/reports.xqy
Scenario name: MarkLogic XQuery
Engine name: Sarepta
Severity: error
Description: XDMP-EVALLIBMOD: xdmp:eval("xquery version "1.0-ml"; module namespace rep...", (), <options xmlns="xdmp:eval"><default-xquery-version>app-server</default-xquery-version><stat...</options>) -- Cannot evaluate library module:
Can you tell me what I'm missing here?
Thanks,
Peter