Cannot read property "data" from undefined

266 views
Skip to first unread message

James M

unread,
Nov 23, 2010, 4:09:50 PM11/23/10
to jquery-claypool
Hi,

I've checked the forums as well as google and don't see an answer to
getting the examples up and running. When I load http://localhost:8080
in the browser I get:

jQuery-Claypool Server Error
Error Details
message
Cannot read property "data" from undefined
fileName
file:///home/jem/Downloads/thatcher-jquery-claypool-98fa6ff/lib/jquery.claypool.js
lineNumber
812
name
TypeError
rhinoException
org.mozilla.javascript.EcmaError: TypeError: Cannot read property
"data" from undefined (file:///home/jem/Downloads/thatcher-jquery-
claypool-98fa6ff/lib/jquery.claypool.js#812)

Here are some things I've tried:
* Run 'ant' to build the project.
* Started Jetty in debug mode. java -DDEBUG -jar start.jar
* Started Jetty using ./jetty.sh start
* Changed permission of all files to chmod -R 777 in case of
permissions issue.

I've really struggled to find documentation on getting started. The
examples are great and really demonstrate the power of this framework,
but I find that I'm unable to get the home page to load.

Any thoughts?

Thanks!
James Mortensen

chris thatcher

unread,
Nov 23, 2010, 10:23:44 PM11/23/10
to jquery-...@googlegroups.com
Ah, this is not well documented sorry, I'm working on it.

Look at WEB-INF/app/configs/environments.js  line 13.

you'll want to add or change this to include a path that can be detected for you development environment:

        automap:{
            'file:///opt':              'dev.server',
            'file:///home/jem':   'dev.server',
            'file:///base':           'appengine.server',
            'http://localhost':    'dev.client',
            'claypooljs\.com':   'prod.client'
        },

This affects what enivornment is included during startup.  in WEB-INF/app/boot/server.js you'll see this line $.env(), note no parameters implies it will use window.location and automap to choose the settings.  You can manually set the environment using
$.env('defaults', 'dev.server')

http://github.com/thatcher/recordsofexistence is a cleaner project, but requires using the appengine devserver since it uses a bigtable backend.

Thatcher


--
You received this message because you are subscribed to the Google Groups "jquery-claypool" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to jquery-claypo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-claypool?hl=en.




--
Christopher Thatcher

James M

unread,
Nov 26, 2010, 9:17:05 PM11/26/10
to jquery-claypool
Hi Thatcher,

Thanks for the response. I made the modifications and that didn't
seem to help. Of course, I'm trying to run it on app engine whereas
before I was running with the embedded Jetty server. I'll try the
changes with the embedded Jetty server when I'm back to the office.

However, in my home office I'm trying to run with App Engine, in both
the Claypool server project as well as the recordsofexistence, I get
the following error when I try to hit the home page:

{ claypool.server.RequestHandler}
org.mozilla.javascript.EcmaError: TypeError: ClaypoolServerHandler is
not a function, it is object.

I'm not sure if this is because I'm using the latest App Engine SDK
1.4.0 or because of something else. I'm currently working on a proof
of concept for a project and would love to use that as an opportunity
to explore the server side JavaScript features of this framework.

Is there a way to turn up the debug logging so I get more informative
error messaging? Looking forward to more documentation as the idea of
using JavaScript on the server is exciting!

Thanks again,
James

On Nov 23, 7:23 pm, chris thatcher <thatcher.christop...@gmail.com>
wrote:
> Ah, this is not well documented sorry, I'm working on it.
>
> Look at WEB-INF/app/configs/environments.js  line 13.
>
> you'll want to add or change this to include a path that can be detected for
> you development environment:
>
>         automap:{
>             'file:///opt':              'dev.server',
>             'file:///home/jem':   'dev.server',
>             'file:///base':           'appengine.server',
>             'http://localhost':   'dev.client',
>             'claypooljs\.com':   'prod.client'
>         },
>
> This affects what enivornment is included during startup.  in
> WEB-INF/app/boot/server.js you'll see this line $.env(), note no parameters
> implies it will use window.location and automap to choose the settings.  You
> can manually set the environment using
> $.env('defaults', 'dev.server')
>
> http://github.com/thatcher/recordsofexistenceis a cleaner project, but
> requires using the appengine devserver since it uses a bigtable backend.
>
> Thatcher
>
>
>
> On Tue, Nov 23, 2010 at 4:09 PM, James M <jmort...@gmail.com> wrote:
> > Hi,
>
> > I've checked the forums as well as google and don't see an answer to
> > getting the examples up and running.  When I loadhttp://localhost:8080
> > jquery-claypo...@googlegroups.com<jquery-claypool%2Bunsu...@googlegroups.com>
> > .

James M

unread,
Nov 27, 2010, 8:49:44 PM11/27/10
to jquery-claypool
Hello Again,

I gave it the old college try and was able to get recordsofexistence
working! I edited logging.conf and set all log4j loggers to DEBUG. I
edited logging.properties and set the java.util loggers to ALL.

My folders for images, css, and plugins all needed to be moved inside
the war directory. I suspect the problems were a mix between using
Eclipse as well as the SDK 1.4.0 pre-release. I also had to edit
environments.js to tell it where my dev server was -- as you
suggested. I also had to change the port for the templates path from
8080 to 8888. Not sure why Google felt the need to use different
ports, depending on where you run the dev-appserver from.

I now have pages loaded and can dig in more! Thanks again for all
your help!

James
> >http://github.com/thatcher/recordsofexistenceisa cleaner project, but
Reply all
Reply to author
Forward
0 new messages