Hi Arnaud,

In general the exception often is an indication that the xqy file could not be 
found or is inaccessible to the user that tries to execute it. Use the database 
explore function of CQ to check whether the xqy is really where you think it 
is, whether it has the right permissions and is inserted as the correct type 
(text)..

Kind regards,
Geert

>


drs. G.P.H. (Geert) Josten
Consultant

Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:[email protected]
http://www.daidalos.nl/

KvK 27164984


De informatie - verzonden in of met dit e-mailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.

> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Arnaud Roch
> Sent: donderdag 26 augustus 2010 12:53
> To: [email protected]
> Subject: [MarkLogic Dev General] trigger issue
>
> Hi (again),
>
> I've another problem with a trigger. The trigger look like this :
>
> import module namespace trgr="http://marklogic.com/xdmp/triggers";
> at "/MarkLogic/triggers.xqy";
> trgr:create-trigger("InsertSQL", "Insert trigger for MLSQL to
> SQL Server", trgr:trigger-data-event(
> trgr:directory-scope("/Data/Sample/", "infinity"),
> trgr:document-content("create"), trgr:post-commit()),
> trgr:trigger-module(xdmp:database("MarkLogicAccess"),
> "/app/", "InsertSQL-NoDyn-Trigg.xqy"), fn:true(),
> xdmp:default-permissions() )
>
> It call this module :
>
> import module namespace sql ="http://xqdev.com/sql"; at
> "/app/sql.xqy"; import module namespace
> trgr="http://marklogic.com/xdmp/triggers"; at
> "/MarkLogic/triggers.xqy";
>
> declare variable $trgr:uri as xs:string external;
>
> let $p := fn:doc($trgr:uri)/*
> return
> sql:execute(
>     "INSERT INTO [dbo].[Product]
> ([Field1],[Field2],...,[FieldN]) VALUES
> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
> ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
> ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
> ,?,?,?,?,?) ",
>     "http://serverIP:8080/mlsql/mlsql";,
>     sql:params( ($p/Field1,$p/Field2,...,$p/FieldN)
> )
>
> So, when I upload 1 file with recordLoader or drag&drop in
> webdav or xdmp:document-load() I have this error :
> 2010-08-26 10:54:14.410 Notice: MarkLogicAccess-xdbc-9041:
> XDMP-TEXTNODE: /app/sql.xqy -- Server unable to build program
> from non-text document
> 2010-08-26 10:54:14.410 Notice: MarkLogicAccess-xdbc-9041: in
> /InsertSQL-NoDyn-Trigg.xqy [1.0-ml]
>
> I've try this manipulation with another module (log.xqy like
> in the tutorial with a xdmp:log(fn:concat("doc ",$trgr:uri,"
> created")) ) and there is no problem, the trigger was created
> like the one at the top of this mail (just change module name)!
>
> Someone can help me ?
>
> Thank you !
>
> Kind regards
> Arnaud
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to