Skip to main content

In samples, Getting error 'Error loading widget resource'

4 replies [Last post]
mucsij
Offline
Joined: 2007-03-22
Points: 0

I am trying to run the samples in Tomcat 6 and I am getting "Error loading widget resource for 'dojo.table': unable to locate 'component.js' in '/dojo/table', '/resources/dojo/table' or ClassPath 'META-INF/resources/dojo/table'"

What is it that I did not install right? Those files are there.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gclewis
Offline
Joined: 2007-12-27
Points: 0

Hi Greg,

Not sure if this helps, but I'm also getting the same problem. Am also using NB6 and have tried uninstalling/reinstalling the plugin and checked that the resource files exist. All looks ok.

However, I get the same error regardless of is being a pre-existing project or a new one with jMaki selected at project creation time. Also, some Dojo widgets do work, as Janos says previously - put the editor and calendar picker on a page and only the calendar picker works. Namespace issues?

Note: I've not tested extensively, but all the other widgets seem to work fine.

Cheers,
Graham

Hi,

Bit more on this - if you enable FireBug you see this: "djd43 is not defined
[Break on this error] djd43.require("djd43.widget.Editor2Plugin.SimpleSignalCommands");"

Cheers,
Graham

Message was edited by: gclewis

gmurray71
Offline
Joined: 2003-07-31
Points: 0

hi,

In what context are you using jMaki?

you should have the dojo widget + resources in the resources directory under the context root of your application.

There should be a directory /resources/dojo/resources/.... dojo stuff
and there should be a directory /resources/dojo/table/

Sometimes if you add widgets and try to access them when they are not there and then add them and try to access them the server will not reload from the cache during development mode. To get around this you can restart tomcat or set a context level parameter to enable development mode (no server caching)

jmaki-development-mode true

One other question:

Are you using a tool or are you using the command line to build your application?

mucsij
Offline
Joined: 2007-03-22
Points: 0

Hi Greg
Sorry for bothering you, when I used the Ant script with Tomcat 6, everything deployed fine.
Except in the getwidgetdata sample this line does not work:
[code]

[/code]
it gives me
Unable to find widget constructor for jmaki.widgets.dojo.editor.Widget.
But if I insert
[code]

[/code]
that works fine.
I have two questions, do i have to use CVS to get the source for XmlHttpProxyServlet
Is there some online documentation for the samples or it is just best to drill through the sources to understand what's going on under the hood?
Thanks.
Janos

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Janos.

for your first issue:

What browser are you using? I just verified on IE 6 / Firefox and it's fine using the 1.0.3 build.

For the second issue:

Check your web application and make sure there is a directory:

/resources/dojo/datepicker

In that directory you should see a :

component.js
component.htm

If these two files are there then there is a bigger problem (I might need you to send me a war file).

For the XmlHttpProxyServlet there is some documentation here:

https://ajax.dev.java.net/xmlhttpproxy.html

Generally this document contains the level of information an average user is going to need. For more details see the CVS source at:

https://ajax.dev.java.net/source/browse/*checkout*/ajax/ws/jmaki/shared/...

Let me know if you still have issues with the getwidget sample.

Also are you using the latest 1.0.3?

-Greg