TypeError on Start-up

2 views
Skip to first unread message

Jay Young

unread,
Aug 5, 2010, 10:04:36 PM8/5/10
to appenginejs
I just checked out the new Blog example and it worked fine. I then
created a new project and copied all of the files over without
changing anything. Now when I run the dev_appserver on the new
project and go to the local url, I get this exception:

org.mozilla.javascript.EcmaError: TypeError: Cannot call property
getDatastoreService in object [JavaPackage
com.google.appengine.api.datastore.DatastoreServiceFactory]. It is not
a function, it is "object". (google/appengine/api/datastore.js#7)

Have you ever seen this before? Let me know if I can give you any
more info to help debug.

Thanks.

George Moschovitis

unread,
Aug 6, 2010, 1:44:37 AM8/6/10
to appen...@googlegroups.com

org.mozilla.javascript.EcmaError: TypeError: Cannot call property
getDatastoreService in object [JavaPackage
com.google.appengine.api.datastore.DatastoreServiceFactory]. It is not
a function, it is "object". (google/appengine/api/datastore.js#7)

perhaps you have forgotten to include the jar files in WEB-INF/lib ??

-g.

PS: you can send me the app privately to have a better look.

 
Have you ever seen this before?  Let me know if I can give you any
more info to help debug.

Thanks.



--
http://www.gmosx.com/blog
http://www.appenginejs.org

Jay Young

unread,
Aug 7, 2010, 5:43:36 PM8/7/10
to appenginejs
You were right. I could've sworn I had just copied everything over,
but I guess I'd screwed around with it a bit.

I guess that leads me to my next question. What is your preferred way
to start a new project? Is there a skeleton or project template you
just copy over and start building on top of?

Thanks again.

On Aug 6, 1:44 am, George Moschovitis <george.moschovi...@gmail.com>
wrote:

George Moschovitis

unread,
Aug 8, 2010, 3:00:39 AM8/8/10
to appen...@googlegroups.com
I have a (rails-style) generator that creates skeleton projects:

nitro create-app test

I haven't released the nitro-tools package yet, needs a lot of cleanup.

Do give you some info though:

My skeleton uses symbolic links in WEB-INF/lib to point to a common set of jar (this way I can update all my apps at the same time when new jars are released). I also use symbolic links in packages.

this links are generated by the nitro script that I will (hopefuly) release real soon (when it's ready).

hope this helps,
-g.

Jay Young

unread,
Aug 8, 2010, 1:31:25 PM8/8/10
to appenginejs
It does. I've been doing something similar with the Closure tools.
Can you confirm if I've got the directory structure right? As I
understand it, it should look like:

WAR/ (also the project root)
--app.yaml
--packages/ (all of this should just be copy/pasted or linked for each
project, yes?)
--root/ (statically served app files, different project-to-project)
--WEB-INF/
----appengine-web.xml
----cron.xml
----logging.properties
----web.xml
----appengine-generated (empty at project start)
----lib (all of this should just be copy/pasted or linked for each
project, yes?)
------appengine-api-1.0-sdk.jar
------appengine-api-labs.jar
------js.jar
------ringo.jar

Thanks for all your hard work on these projects, George. I'm really
getting to love this set-up.

On Aug 8, 3:00 am, George Moschovitis <george.moschovi...@gmail.com>
wrote:

Jay Young

unread,
Aug 8, 2010, 1:32:32 PM8/8/10
to appenginejs
And of course I forgot about the src/ directory, but that's pretty
self-explanatory.

George Moschovitis

unread,
Aug 8, 2010, 3:28:57 PM8/8/10
to appen...@googlegroups.com
WAR/   (also the project root)
--app.yaml
--packages/ (all of this should just be copy/pasted or linked for each
project, yes?)
--root/ (statically served app files, different project-to-project)
--WEB-INF/
----appengine-web.xml
----cron.xml

not needed, autogenerated from cron.yaml

----logging.properties
----web.xml

not needed, autogenerated from app.yaml
 

Thanks for all your hard work on these projects, George.  I'm really
getting to love this set-up.

no prob, let me know if you have any problems/suggestions.

-g.

George Moschovitis

unread,
Aug 8, 2010, 3:30:38 PM8/8/10
to appen...@googlegroups.com
It does.  I've been doing something similar with the Closure tools.

what do you mean? where do you use closure tools?
-g.
 

Jay Young

unread,
Aug 8, 2010, 6:17:26 PM8/8/10
to appenginejs
For client-side code, I use links to point to a single copy of the
Library code to allow for a single update to affect all projects. I
wasn't referring to anything server-side.

On Aug 8, 3:30 pm, George Moschovitis <george.moschovi...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages