This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157297 - [testclient] empty page in safari
Summary: [testclient] empty page in safari
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 11:19 UTC by Lukas Jungmann
Modified: 2010-04-06 13:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2009-01-22 11:19:11 UTC
-run rest test client for customer db sample on a mac w/ safari 3.1.2

=>
   tester page is empty and error console says:

rror: WRONG_DOCUMENT_ERR: DOM Exception 4
file:///.../CustomerDB/build/generated/rest-test/test-resbeans.js (line 1269)
Comment 1 Ayub Khan 2009-02-20 19:31:51 UTC
Fixed for 6.7M3. I recommend backporting to 6.5.

Workaround for 6.5 on Mac.

1. Use Firefox browser.
2. 

Patch the file ~/NetBeansProjects/CustomerDB/CustomerDB/build/generated/rest-test/test-resbeans.js
as follows, then refresh the page
(file://localhost/Users/ayubkhan/NetBeansProjects/CustomerDB/CustomerDB/build/generated/rest-test/test-resbeans.html) in
Safari

Note: Every time 'Test REST web service" command is used, the above file gets replaced. In this situation, you can 
copy the entire directory /CustomerDB/build/generated/rest-test to /CustomerDB/web and test the URL

http://locahost:8080/CustomerDB/rest-test/test-resbeans.html

Diff
=====

Macintosh-193:main ayubkhan$ hg dif
diff -r 93b9fd2dfee8 websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/resources/test-resbeans.js
--- a/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/resources/test-resbeans.js	Fri Feb 20 21:37:05 2009 +0300
+++ b/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/resources/test-resbeans.js	Fri Feb 20 11:13:46 2009 -0800
@@ -1270,7 +1270,13 @@
                     var rs = ts.getElementsByTagName(wDocArr[i].documentElement, 'resources')[0];
                     rChilds = ts.getElementsByTagName(rs, 'resource');
                     if(rChilds != null && rChilds.length > 0) {
-                      resources.appendChild(rChilds[0]);
+                        try{
+                            var n = wDoc.importNode(rChilds[0], true);
+                            resources.appendChild(n);
+                        }
+                        catch (e) {
+                            resources.appendChild(rChilds[0]);
+                        }
                     }
                   }
                 }
Comment 2 Quality Engineering 2009-02-22 07:58:34 UTC
Integrated into 'main-golden', will be available in build *200902220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3120cfa9318f
User: Ayub Khan <ayubskhan@netbeans.org>
Log: Fix issue#157297 - [testclient] empty page in safari
Comment 3 Jaroslav Pospisil 2010-04-06 13:56:28 UTC
v.