jaystack / jaydata

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

1.5.1 #246

Closed a2dude closed 8 years ago

a2dude commented 8 years ago

Hi,

I am having some difficulty working with the 1.5.1 download.

As the instructions are somewhat sparse I have attempted to determine how to configure my code and I presume I have got something wrong. I currently fail on startup with the following exceptions:

@@@@ undefined jaydata.js:9870 ... @@@@ undefined jaydata.js:9870

jaydata.js:4190 Not Found!: odatajs is required Exception {name: "Not Found!", message: "odatajs is required", data: undefined}require.8.Guard.raise @ jaydata.js:4190constructor @ oDataProvider.js:1957oDataProvider @ VM1469:9success @ jaydata.js:11238success @ jaydata.js:21668find @ jaydata.js:21698load @ jaydata.js:21665constructor @ jaydata.js:11236EntityContext @ VM1444:7GASDb @ VM1508:8exports.factory @ defaultbx.js:1581(anonymous function) @ defaultbx.js:1587(anonymous function) @ defaultbx.js:4(anonymous function) @ defaultbx.js:5 jaydata.js:4156 Uncaught Not Found!: odatajs is requiredException @ jaydata.js:4156constructor @ oDataProvider.js:1957oDataProvider @ VM1469:9success @ jaydata.js:11238success @ jaydata.js:21668find @ jaydata.js:21698load @ jaydata.js:21665constructor @ jaydata.js:11236EntityContext @ VM1444:7GASDb @ VM1508:8exports.factory @ defaultbx.js:1581(anonymous function) @ defaultbx.js:1587(anonymous function) @ defaultbx.js:4(anonymous function) @ defaultbx.js:5 angular2.dev.js:23935

I have copied 1.5.1 to a folder lib. I have used jaysvcutil to generate a js file( defaultbx.js) from my odata service.

My index.html contains the following:

<script src="lib/jd.1.5.1/jaydata.js"></script>
<script src="lib/jd.1.5.1/jaydataproviders/oDataProvider.js"></script>

<!-- App -->
<script src="lib/gasOData/defaultbx.js"></script>

Can you please provide some guidance?

Malyngo commented 8 years ago

You are probably missing the odatajs library This is required, but doesn't come with the CTP.

a2dude commented 8 years ago

Hi, thanks for your response. Do you have a complete odata client example using 1.5.1 that you can share? I have spent rather more time than I had anticipated i trying to get this to work.

PeterAronZentai commented 8 years ago

@Malyngo is right, you just need to include olingo datajs.js. And you are right too, we should have a repo that you can just clone and gets you going. We'll put up something shortly - and thanks for all your efforts.

a2dude commented 8 years ago

Hi. As soon as you have a repo I can clone I will be right there!

Is the 1.5.1 code in Github, I ask as I have been unable to find the tag.

As a matter of interest what is the relation, if any, between MS datajs and the olingo datajs?

lazarv commented 8 years ago

I created a very simple JayData OData example repo, see readme for details.

Tagged up JayData repository, you can now download the source at a specific version from github.

MS datajs was for OData V1-3. Olingo odatajs is only for OData V4. Both use the same concepts but developed by different teams. So olingo odatajs is not the next version of MS datajs but a new project supporting only V4. As far as we know MS datajs is no longer maintained and olingo odatajs is currently maintained by JayStack in this repository to support install from npm. Probably odatajs dependency will be removed in the future.

a2dude commented 8 years ago

Excellent. Thanks.