473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

How to fix mozilla error 0x80004005 (NS_ERROR_FAILURE)

77
i have this error on my web application ( i check the error console of mozilla)

Expand|Select|Wrap|Line Numbers
  1. [Exception..."Component returned failure code:0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort] 
how to fix that?thanks.
Aug 18 '10 #1
7 7071
johny10151981
1,059 1GB
The problem is with your code. But where is your code?
Aug 19 '10 #2
maminx
77
ok, i assume the error is located in javascript file that i export from view (jsp)..

here my html (jsp) file
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.     <link rel="stylesheet" type="text/css" media="all" href="<c:url value='../styles/${appConfig["csstheme"]}/typo.css'/>" />
  4.     <link rel="stylesheet" type="text/css" href="../css/mainCssHeaderOrderList.css">
  5. </head>
  6.  
  7. <script type="text/javascript">
  8.     <%String userId = (String)request.getAttribute("userId");%>
  9.     var userId='<%=userId%>';
  10. </script>
  11.  
  12. <body>
  13.     <form action="/saveOrder.dtml" onsubmit="return false;">
  14.  
  15.     <input type="hidden" id="orderBufferSize" name="orderBufferSize"/>
  16.     <input type="hidden" id="codeList" name="codeList" onClick="select();" size="3"/>
  17.  
  18.     <div>
  19.         <table cellspacing="0" cellpadding="1" border="0" width="370">
  20.             <thead class="tabletitle">
  21.                 <tr>
  22.                      <!--   <th style="width: 12px;"><fmt:message key="form.field.no"/></th>-->
  23.                     <th style="width: 120px;"><fmt:message key="form.field.reference"/></th>
  24.                     <th style="width: 20px;"><fmt:message key="form.field.side"/></th>
  25.                     <!--  <th style="width: 14%;"><fmt:message key="form.field.time"/></th>-->
  26.                     <th style="width: 30px;"><fmt:message key="form.field.code"/></th>
  27.                     <th style="width: 40px;text-align: left;"><fmt:message key="form.field.price"/></th>
  28.                     <th style="width: 10px;text-align: left;"><fmt:message key="form.field.quantity"/></th>
  29.                     <th style="width: 100px;"><fmt:message key="form.field.time"/></th>
  30.                 </tr>
  31.             </thead>
  32.         </table>
  33.     </div>
  34.     <div class="myOrderFrame" style="width:365px;height:90px;">
  35.         <table cellpadding="2" cellspacing="1" style="background-color:#333;">
  36.             <tbody id="item_area" class="lscold">
  37.                 <tr id="refTr">
  38.                 </tr>
  39.             </tbody>
  40.         </table>
  41.     </div>
  42.     </form>
  43.  
  44.     <script type='text/javascript' src='../scripts/define.js'></script>
  45.     <script type='text/javascript' src='../scripts/funcGetSet.js'></script>
  46.     <script type='text/javascript' src='../dwr/engine.js'></script>
  47.     <script type='text/javascript' src='../dwr/util.js'></script>
  48.     <script type='text/javascript' src='../dwr/interface/infoManager.js'></script>
  49.     <script type='text/javascript' src="../scripts/supportInfoJsFile/JsPendingOrder.js"></script>
  50.  
  51. </body>    
  52. </html>
  53.  
And in file JsPendingOrder.js i put this code
Expand|Select|Wrap|Line Numbers
  1. /////////////////Constants
  2.     var firstLimit, endLimit, orderBufferSize, tmpSize, timeoutID;
  3.  
  4.     function clearContent(size) {
  5.         var j=0;
  6.         for (i=0;i<(size+size);i++) {
  7.             if (document.getElementById('tr'+j)!=null) {
  8.                 document.getElementById('item_area').removeChild(document.getElementById('tr'+j));
  9.                 j++;
  10.             } else {j=0;continue;}
  11.         }
  12.     }
  13.  
  14.     function insertContent(size,OrderBuffer) {
  15.         for(i=0;i<size;i++){    
  16.             createItemField(OrderBuffer,i);
  17.         }
  18.     }
  19.  
  20.     function createItemField(OrderBuffer, index) {
  21.         var id = OrderBuffer[index].id;
  22.         var row = document.createElement("tr");
  23.         row.id = "tr"+index;
  24.  
  25.         var side = checkingSide(OrderBuffer[index].side);
  26.         var transactTime = getTimeOfTimeStamp(OrderBuffer[index].transactTime); 
  27.  
  28.         var td = document.createElement('td');
  29.         td.style.width = "100";
  30.         td.style.textAlign='left';
  31.         td.innerHTML +=    '<div id="clientId">'+OrderBuffer[index].clOrdId+'</div>';
  32.         row.appendChild(td);
  33.  
  34.         var td = document.createElement('td');
  35.         td.style.width = "20";
  36.         td.innerHTML +=    '<div id="clientId">'+side+'</div>';
  37.         row.appendChild(td);
  38.  
  39.         var td = document.createElement('td');
  40.         td.style.width = "50";
  41.         td.innerHTML +=    '<div id="fromNews">'+OrderBuffer[index].symbol+'</div>';
  42.         row.appendChild(td);
  43.  
  44.         var td = document.createElement('td');
  45.         td.style.width = "70";
  46.         td.innerHTML +=    '<div id="titleNews">'+formatPrice(parseFloat(OrderBuffer[index].price))+'</div>';
  47.         row.appendChild(td);
  48.  
  49.         var td = document.createElement('td');
  50.         td.style.width = "30";
  51.         td.innerHTML +=    '<div id="titleNews">'+OrderBuffer[index].orderQty+'</div>';
  52.         row.appendChild(td);
  53.  
  54.         var td = document.createElement('td');
  55.         td.style.width = "100";
  56.         td.innerHTML +=    '<div id="titleNews">'+transactTime+'</div>';
  57.         row.appendChild(td);
  58.  
  59.         //$('#item_area').appendChild(row);
  60.         document.getElementById('item_area').appendChild(row);
  61.  
  62.     return false;
  63.     }
  64.  
  65.     function checkingSide(side){
  66.         if (side=='1') side="B";
  67.         else side='S';
  68.         return side;
  69.     }
  70.  
  71.     function getTimeOfTimeStamp(timestamp) {
  72.         timestamp = timestamp.substr(9);    // slice or cut the date, show only the time
  73.         return timestamp;
  74.     }
  75.  
  76.     function getSizeDataDef() {
  77.         infoManager.getOrderBufferSize(firstLimit, endLimit,userId, setOrderBufferSize);
  78.     }
  79.  
  80.        function setOrderBufferSize(orderBufferSize){
  81.          dwr.util.setValue("orderBufferSize",orderBufferSize);
  82.        }
  83.  
  84.        function generateOrderBuffer() {
  85.            infoManager.getOrderBuffer(firstLimit, endLimit, userId, setOrderBufferHeader);
  86.           firstLimit = firstLimit+endLimit;
  87.           if (!isLoop(firstLimit))
  88.               timeoutID = window.setTimeout('generateOrderBuffer()',100);
  89.           else {window.clearTimeout(timeoutID);return false;}
  90.            }
  91.  
  92.     function isLoop(firstLimit) {
  93.         orderBufferSize = document.getElementById('orderBufferSize').value;
  94.         if (parseInt(firstLimit) > parseInt(orderBufferSize)) return true;
  95.         else return false;
  96.     }
  97.  
  98.       function setOrderBufferHeader(OrderBuffer){
  99.            size = OrderBuffer.length;
  100.            insertContent(size,OrderBuffer);    // go to js function of pendingOrderList
  101.        }
  102.  
  103.     function eventOnLoad() {
  104.         alert("test");
  105.         setDefFirstLimit(0);
  106.         setDefEndLimit(2);    // the data will be loaded every 2 data
  107.         getSizeDataDef();
  108.         generateOrderBuffer();
  109.     }
  110.  
  111.       window.onload = eventOnLoad;
  112.  
as u can see in function eventOnLoad, i put alert("test"); to make sure that function is triggered, but the error console show error message
Expand|Select|Wrap|Line Numbers
  1. [Exception..."Component returned failure code:0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort] 
  2.  
And also the function is not triggered..

any suggestion?
thanks
mamin
Aug 19 '10 #3
johny10151981
1,059 1GB
what does line 7-10 means? are they javascript code? Never seen code like that :?
Aug 19 '10 #4
maminx
77
oh sorry that's java code ..that is jsp file. is it problem ? how about the javascript file (JsPendingOrder.js) ?
Aug 19 '10 #5
maminx
77
oh forgot..and the line from 7 to 10 is ok..because when i alert the userId variable, it's ok,
Aug 19 '10 #6
gits
5,390 Expert Mod 4TB
is there any more information? like line-no., filename or whatever? please have an additional look at the js-console ...
Aug 19 '10 #7
johny10151981
1,059 1GB
Reading whole code is really boring. Needed few more information. Like when that error message get generated.
It can be after loading the page. It can be after some action.
Aug 19 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rOadhOg | last post by:
Help please! I set up a simple access 2000 database and I'm running IIS5. The first time I try it, it works, then it seems like I have to wait for some kind of time out for it to work again,...
2
by: Geo | last post by:
I've written an asp page to transfer values from a form into an Access .mdb file, and I'm getting this error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) General error...
2
by: Jürgen Hetzel | last post by:
Hello! My environment is: Win 2000 Server, MS SQL-Server 2000 (SP2) and MS ExchangeServer 5.5 the two following TransactSQL-codepieces show different results: 1. with attachment
4
by: Jo Winchester | last post by:
We are getting the following error message when trying to access an .asp page in IIS 5 on a Windows 2000 server. I have found that (0x80004005) is a fairly common error, but usually it is...
0
by: Yelena Varshal | last post by:
Hello, I am using ODBC to access Microsoft Access database. I use just generic ADO code. I don't have problems opening multiple connections from the same page on the development server but the...
0
by: jaeden99 | last post by:
Why would my asp.net pages give me a 0X80004005 error? When the classic asp pages are viewed, the pages work fine and the connects to the database(sql server) also work. However when I try to view...
3
by: friend | last post by:
Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://manimekalai/VulnMgmt/scanfi/crs_source/vulnupdate/latest.php?vulnerability=2451 ::...
2
by: Ebrahim Shreena | last post by:
xp_sendmail: failed with mail error 0x80004005
1
by: Ale Ale | last post by:
I've got the same problem with firefox. My web app works correctly on IE, but in firefox catch an exception like this: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.