jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 94 forks source link

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

Open davidcalloway opened 9 years ago

davidcalloway commented 9 years ago

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:

└─┬ odata-server@1.3.7
  ├── basic-auth-connect@1.0.0
  ├── body-parser@1.9.2
  ├── connect@3.3.2
  ├── datajs@1.0.3
  ├── errorhandler@1.2.2
  ├── jaydata@1.3.6
  ├── mongodb@2.0.27
  ├── q@0.8.5
  ├── qs@0.5.0
  ├── url@0.10.3
  └── xmldom@0.1.11
htammen commented 9 years ago

Same happens at my site. Is there a workaround?

davidcalloway commented 9 years ago

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 notifications@github.com:

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

htammen commented 9 years ago

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.

sroe commented 9 years ago

mongodb@2.0.27 -> use v1.4.9, odata-server is only supporting the old interface.