Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

capture modules-db results in ERROR: 757: unexpected token #713

Closed
joeglorioso opened this issue Jan 5, 2017 · 12 comments
Closed

capture modules-db results in ERROR: 757: unexpected token #713

joeglorioso opened this issue Jan 5, 2017 · 12 comments
Assignees
Milestone

Comments

@joeglorioso
Copy link

joeglorioso commented Jan 5, 2017

I'm receiving an ERROR: 757: unexpected token when trying to capture a modules database. To replicate this, create a modules database on localhost named test-modules and insert a single module named /foo.xqy. Create a new Roxy project and run the capture command from within the project. I've tried this with both the master and dev branches.

$ ml local capture --modules-db=test-modules
Retrieving source from test-modules...
ERROR: 757: unexpected token at '--0e040f1aa62b4e54
Content-Type: text/plain
X-Primitive: string

/foo.xqy
--0e040f1aa62b4e54--
'
ERROR: ["/Users/jglorioso/Downloads/temp/deploy/lib/json/common.rb:148:in parse'", "/Users/jglorioso/Downloads/temp/deploy/lib/json/common.rb:148:in parse'", "/Users/jglorioso/Downloads/temp/deploy/lib/server_config.rb:1621:in save_files_to_fs'", "/Users/jglorioso/Downloads/temp/deploy/lib/server_config.rb:1432:in capture'", "deploy/lib/ml.rb:168:in `

'"]

@dmcassel
Copy link
Collaborator

dmcassel commented Jan 5, 2017

What does foo.xqy have in it? Did you insert it using "ml deploy modules" or some other way?

@joeglorioso
Copy link
Author

In this case, I just used xdmp:document-insert in qconsole.

xquery version "1.0-ml";

let $module :=
document {
'declare namespace html = "http://www.w3.org/1999/xhtml";
<p>hello world</p>'
}
return xdmp:document-insert('/foo.xqy', $module)

I have tried this on a client's live Modules database and my local Modules database also. In each case, I received the same error. The foo.xqy was just an easily reproducible case for you to test.

I don't have another readily available environment to test in. I don't think it matters, but I'm on Mac running OSX 10.12. As I mentioned, I tried both the master and dev branches of Roxy so I know that it is current.

@dmcassel
Copy link
Collaborator

dmcassel commented Jan 5, 2017

Forgot to ask: what version of MarkLogic? With that information, we should have enough to reproduce.

@joeglorioso
Copy link
Author

I'm sorry. That should have been on my initial post. I've tried this against Linux 8.0-6 and Mac 8.0-6.

@dmcassel
Copy link
Collaborator

dmcassel commented Jan 9, 2017

verified in 8.0-5.8 (Mac). Investigating.

@dmcassel
Copy link
Collaborator

The reason for the problem is that we switched how we send requests to MarkLogic 8 (using /v1/eval instead of Query Console), but didn't update how we process the response. I'll work on fixing that.

@joeglorioso
Copy link
Author

joeglorioso commented Jan 13, 2017

Thanks for the update Dave. Any estimate on when your schedule will allow you time to turn around a fix?

@dmcassel
Copy link
Collaborator

Working on it today.

dmcassel added a commit to dmcassel/roxy that referenced this issue Jan 13, 2017
@dmcassel dmcassel added this to the 1.7.5 milestone Jan 13, 2017
@dmcassel dmcassel self-assigned this Jan 13, 2017
@dmcassel
Copy link
Collaborator

@JoeG13 I just sent a pull request with a fix. If you'd like to test it, that would be helpful.

@joeglorioso
Copy link
Author

I saw some additional conversation between you and Robert in the PR. Please let me know how I can best assist in testing.

dmcassel added a commit to dmcassel/roxy that referenced this issue Jan 16, 2017
RobertSzkutak added a commit that referenced this issue Jan 17, 2017
#713 Correct capture processing to handle multi-part responses
@dmcassel
Copy link
Collaborator

@JoeG13 the fix is now merged into the dev branch. Please test and reopen if you still see a problem.

@joeglorioso
Copy link
Author

Thanks. This is working as expected now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants