Skip to main content

cant get jMaki Samples to work

3 replies [Last post]
ritinpali
Offline
Joined: 2008-02-21

Hi,

I have recently installed
-Sun Java Application server 9.1
-Netbeans 6.0
-Rest plugin (v 0.5.1)
-jMaki plugin ( v 1.6.12 )
-Sun Web Developer pack 2
OS : windows2003Server

Following the tutorial
(Creating and consuming RESTful Web Service jMaki Components in Web Applications)
I can test the Rest Web Service ...ok..

When I generate Rest Client Stubs with jMaki using the CustomerDB project.. and try to
run file : testresourcestable.jsp
(Error loading jmaki.widgets.dojo.rest.customerstable.Widget : id=dojo_rest_customerstable1
Script: undefined (line: 364).
Message: rdj.data.CustomersStore is not a constructor
)
Enabled Debugging and saw (
Publish : Topic: /jmaki/runtime/intialized message {}
Publish : Topic: /jmaki/runtime/extensionsLoaded message {}
Publish : Topic: /jmaki/runtime/widgetsLoaded message {}
Publish : Topic: /jmaki/runtime/loadComplete message {}
)
Deploying to Sun App Server 9 ... while deploying in the output window
(
com.sun.enterprise.admin.mbeans.J2EEModule:getStringForDDxml FileNotFoundException E:/Sun/SDK/domains/domain1\generated\xml\j2ee-modules\CustomerDB\null
Descriptors could not be loaded for module CustomerDB : null.
)

Started Netbeans and loaded project (simplejMaki)
Right Clicked and chose run
thats not working either .. no errors reported this time but two blank boxes appear.
Javascript Console shows (
Error: jmaki.addGlueListener is not a function
Source File: http://localhost:8484/simplejMaki/glue.js Line: 17
)

I have checked the webroot and the jMaki components are present there
could it be that the directory permissions need to be set for the scripts to work?
Help, I have no clue what to do next

Ritin

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ritinpali
Offline
Joined: 2008-02-21

Hi,
I made a mistake of not updating the port number in the Teststubs of the client( iam not using the default port number 8080) .
corrected the uri in CustomerDB.js and any other references and it works aok now.

Thanking you
Ritin Pali

carlavmott
Offline
Joined: 2005-02-10

Hi Ritin,

Looks like the tutorial is dated. The function jmaki.addGlueListener is not supported snice jmaki 1.0. Also, I think that the Sun Web Developer pack is conflicting with the latest release of jMaki and you can uninstall that bundle.

ook at the documentation page for links to tutorials and blogs https://ajax.dev.java.net/developer.html You can also download the jMaki bundle and look at the samples that are shipped with the standalone bundle.

Carla

ritinpali
Offline
Joined: 2008-02-21

Hi,
I have uninstalled sun web developer pack...
Tried running widgets using Drag-n-Dop in a Web App jsp page... date, clock, fisheye all seem to work aok!
So I think the problem might lie with Rest Client Apps. As CutomerDB (Web Service) is testing ok but CustomerDBClient isnt running
====================================CustomerDBClient/reststubs/reststub.html
Rest Debug Window
rest debug(19:30:23): Initializing scripts...
rest debug(19:30:23): Error: XMLHttpRequest.open failed for: http://localhost:8080/CustomerDB/resources/customers/?timestamp=12036510... Error name: undefined Error message: undefined

http Monitor :
Servlet Context
Context name
Absolute path to context K:\nuJava\myExamples\CustomerDBClient\CustomerDBClient\build\web\

====================================CustomerDBClient/reststubs/reststub.html
FIREBUG shows
xmlHttpReq has no properties
get("http://localhost:8080/CustomerDB/resources/customers/", "application/json")support.js (line 152)
getJson()customers.js (line 153)
init()customers.js (line 73)
getItems()customers.js (line 56)
showCustomers()main.js (line 52)
[Break on this error] xmlHttpReq.send(null);

------------------Maybe this question doesnt belong in jMaki ?
Please Advice

Ritin