jaydata icon indicating copy to clipboard operation
jaydata copied to clipboard

odata-server: error in sample servers, tutorial (no method 'collectionNames')

Open davidcalloway opened this issue 10 years ago • 4 comments

I started a new project with odata-server and followed the tutorial here: http://jaydata.org/blog/how-to-set-up-a-nodejs-odata-endpoint-with-odata-server

After following the tutorial, I get the following error on the server side:

TypeError: Object [object Object] has no method 'collectionNames'
    at ./node_modules/odata-server/node_modules/jaydata/lib/Types/StorageProviders/mongoDB/mongoDBStorageProvider.js:80:32

After this, I tried both of the included sample servers as well, and got the same error output when visiting the URLs http://localhost:52999/Northwind.svc (for the northwind.js server), although I can still get XML output in the browser from that and http://localhost:52999/Northwind.svc/$metadata

When trying the newsreader.js server, I get a thrown exception and the server process exits. (Same error and stack trace).

More Info:

└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  └── [email protected]

davidcalloway avatar Apr 16 '15 09:04 davidcalloway

Same happens at my site. Is there a workaround?

htammen avatar Jul 31 '15 19:07 htammen

Not sure if there is one. I've abandoned using odata-server myself for my particular project.

Am 31. Juli 2015 21:17:35 MESZ, schrieb Helmut Tammen [email protected]:

Same happens at my site. Is there a workaround?


Reply to this email directly or view it on GitHub: https://github.com/jaydata/jaydata/issues/210#issuecomment-126788749

davidcalloway avatar Aug 01 '15 07:08 davidcalloway

Thank you for your answer. After spending almost the whole last day with the jaydata odata server my impression was that jaydata does not really support / document it. So I will give the simple-odata-server (http://www.janblaha.net/blog/odata-server-on-nodejs) a chance now. The only disadvantage is that this module does not support entity relationships which I absolutely need. Maybe I can implement them.

htammen avatar Aug 01 '15 09:08 htammen

[email protected] -> use v1.4.9, odata-server is only supporting the old interface.

sroe avatar Aug 10 '15 13:08 sroe