There are install instructions as part of the MLJAM tutorial: http://developer.marklogic.com/howto/tutorials/2006-05-mljam.xqy
Make sure to note this part: "Important: If you install MLJAM in the webapps directory as.../webapps/mljam then your access URL will need to be http://localhost:8080/mljam/mljam. The first /mljam is the application context path; the second is the servlet name. The examples in this tutorial use http://localhost:8080/mljam which assumes MLJAM gets installed in the root context so the first /mljam isn't necessary." That may be what's tripping you up. You'll need the right web.xml config also, to have the servlet registered. -jh- On Feb 16, 2010, at 10:47 PM, SrinivasanM wrote: > Hello All, > > I received the following error while connecting MLJAM with my > XQuery. How to rectify it? I think the problem is in Context id. I have my > java interface “MLJAM.java” is in the folder “C:\Program Files (x86)\Apache > Software Foundation\Tomcat 6.0\webapps\mljam\server\src\com\xqdev\jam” > > Code: > xquery version "0.9-ml" > import module namespace jam = "http://xqdev.com/jam" at > "/MarkLogic/cpf/jam.xqy" > define function test($x as xs:string) > { > jam:start("http://localhost:8080/mljam", "user", “pass"), > jam:set("x", 5), > jam:end() > } > test("sss") > > ErrorReport: > [0.9-ml] <html><head><title>Apache Tomcat/6.0.16 - Error > report</title><style><!--H1 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} > H2 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} > H3 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} > BODY > {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P > {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A > {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> > </head><body><h1>HTTP Status 404 - > /mljam/temp:5973502579509668868/set-string</h1><HR size="1" > noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> > <u>/mljam/temp:5973502579509668868/set-string</u></p><p><b>description</b> > <u>The requested resource (/mljam/temp:5973502579509668868/set-string) is not > available.</u></p><HR size="1" noshade="noshade"><h3>Apache > Tomcat/6.0.16</h3></body></html> > Stack trace: > in /MarkLogic/cpf/jam.xqy line 619: > jam:_call("post", "temp:5973502579509668868", "set-string", "x", "s") > > $method := "post" > $context := "temp:5973502579509668868" > $verb := "set-string" > $name := "x" > $body := "s" > $base := "http://localhost:8080/mljam" > $user := "admin" > $pass := "admin" > $authentication := <authentication > xmlns="xdmp:http"><username>admin</username><password>admin</password></authentication> > $options := <options > xmlns="xdmp:http"><authentication><username>admin</username><password>admin</passw...</options> > $url := "http://localhost:8080/mljam/temp:5973502579509668868/set-string?..." > $response := (<response > xmlns="xdmp:http"><code>404</code><message>/mljam/temp:5973502579509668868/set-str...</response>, > document{text{"<html><head><title>Apache Tomcat/6.0.16 - Error > report</title><s..."}}) > $code := 404 > > in /MarkLogic/cpf/jam.xqy line 128: > jam:set-in("x", "s", "temp:5973502579509668868") > > $var := "x" > $value := "s" > $context := "temp:5973502579509668868" > > in /MarkLogic/cpf/jam.xqy line 659: > jam:set("x", "s") > > $var := "x" > $value := "s" > > line 8: > 6: { > 7: jam:start("http://localhost:8080/mljam", "admin", "admin"), > 8: jam:set("x","s"), > 9: jam:end() > 10: } > > > Thanks > Shri > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
