This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!

Makarand Parab

Ranch Hand
+ Follow
since Dec 10, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Makarand Parab

Hi Balaji
I have stated the code above. Now i am using AJAX for giving search result. If i give search like "ya", from my xml response i get the customer name that start with "Ya" which i fetch from db. I am able to iterate it using dom and display to the user on browser. But i give search like "i", from my xml response i get the customer name that start with "i" which i fetch from db, but when i iterate the response using DOM i get the above stated error on the browser.

Bit confused why it is executing fine for one set and not for other one.

Regards
Makarand Parab
Eric, thanks for the response. Yes data is returned, i can see it in the server console as i have println statements.

Regards
Makarand Parab
I am working with AJAX for search. And this is thr problem that i am facing
*********
When i search for character "i", the server side object gets me the response in XML format

<?xml version="1.0" encoding="utf-8"?>
<data>
<search>
<name>
sau Test case 1</name>
<name>
sau Test case 2</name>
<name>
sau Test case 3</name>
<name>
sau Test case 4</name>
<name>
sau Test case 5</name>
<name>
sau Test case 6</name>
<name>
sau Test case 7</name>
<name>
sau Test case 8</name>
<name>
sau Test case 9</name>
<name>
sau Test case 10</name>
<name>
sau Test case 11</name>
<name>
sau Test case 12</name>
<name>
sau Test case 13</name>
<name>
sau Test case 14</name>
<name>
sau Test case 15</name>
<name>
sau Test case 16</name>
<name>
sau Test case 17</name>
<name>
sau Test case 18</name>
<name>
sau Test case 19</name>
</search>
</data>

Which is fine, but when i try to retrieve it in javascript
function getCustomerNames(searchXml)
{
var contents = document.getElementById('contents');
contents.innerHTML = '';
alert(searchXml);

var data = searchXml.getElementsByTagName('data')[0];
alert(data);
var search = data.getElementsByTagName('search')[0];

for (var iNode = 0; iNode < search.childNodes.length; iNode++)
{
var oSubject = search.childNodes.item(iNode);
var listItem = document.createElement('li');
listItem.appendChild(document.createTextNode(oSubject.text));
contents.appendChild(listItem);
}
}

It gives error at line "searchXml.getElementsByTagName('data')[0]", the object returned is null. Any idea why. If i give some other search criteria it works fine.

Please let me know asap. Thanks in advance

Regards
Makarand Parab
Hi
I want to design a Online test application in j2ee. The questions are in the database. Can anyone tell me which framework should i consider. Can you please chip in your idea's or recommendation. I am bit confused as of now about how to go ahead.

Regards
Makarand Parab
13 years ago
Hi
I have a delete statement as stated below
String queryParent = "delete from dtree where name = '" + folderName.trim() + "'";

Now foldername can be "Abby's"

should i convert single quote to two single quote like "Abby''s" for query to work properly.

Let me know please asap.

Regards
Makarand Parab
Hi
I want to design a Online test application in j2ee. The questions are in the database. Can anyone tell me which framework should i consider. Can you please chip in your idea's or recommendation. I am bit confused as of now about how to go ahead.

Regards
Makarand Parab
Hi

If you are working with insert, delete and update sql statement which returns the count, you would be working with executeupdate(). Mostly all DML statements.

If you are working with select sql statement, which returns resultset, you would be working with executeQuery().

Both of them throw SQLException.

Let me know if i am wrong.

Regards
Makarand Parab
Hi
I have just migrated my code from "WAS 4.0" to "WAS 5.1".
After creating the new ear, the web service application is running fine but i am getting this exception in the log. Can anybody tell me why this exception is thrown.

SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:721)
[10/24/05 15:48:41:693 EDT] 517a9fe1 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
[10/24/05 15:48:41:693 EDT] 517a9fe1 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[10/24/05 15:48:41:833 EDT] 56e69fe1 TraceNLS u No message text associated with key Unable.to.read.and.handle.request:.com/ibm/ws/management/connector/soap/SOAPConnector in bundle com.ibm.ejs.resources.seriousMessages
[10/24/05 15:48:41:832 EDT] 56e69fe1 HttpConnectio E Unable to read and handle request: com/ibm/ws/management/connector/soap/SOAPConnector
[10/24/05 15:48:41:846 EDT] 56e69fe1 SystemOut O <b>java.lang.NoClassDefFoundError: com/ibm/ws/management/connector/soap/SOAPConnector </b>
[10/24/05 15:48:41:846 EDT] 56e69fe1 SystemOut O at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
[10/24/05 15:48:41:846 EDT] 56e69fe1 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
[10/24/05 15:48:41:846 EDT] 56e69fe1 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
[10/24/05 15:48:41:846 EDT] 56e69fe1 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[10/24/05 15:48:41:846 EDT] 56e69fe1 TraceNLS u <B>No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.no.Content-Type.was.specified in bundle com.ibm.ejs.resources.seriousMessages</b>
[10/24/05 15:48:41:846 EDT] 56e69fe1 HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: no Content-Type was specified
[10/24/05 15:48:41:863 EDT] 56e69fe1 SystemOut O java.lang.IllegalStateException: no Content-Type was specified
[10/24/05 15:48:41:864 EDT] 56e69fe1 SystemOut O at com.ibm.ws.http.HttpResponse.writeHeaders(HttpResponse.java:287)
[10/24/05 15:48:41:864 EDT] 56e69fe1 SystemOut O at

Please let me know soon

Regards
Makarand Parab
13 years ago
Hi Priya
Go to the link below. Download the specification and get all the knowledge of Filters

http://www.jcp.org/aboutJava/communityprocess/final/jsr053/

Let me know if u have any queries.

Regards
Makarand Parab
13 years ago
Hey Vijay

Try this out and let me know

import org.apache.xerces.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import java.io.*;

class XML
{
public static void main(String[] args)
{
try{
String caseFile = "c:\\case-config\\config.xml";
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(new File(caseFile));
System.out.println("\n\n----" + doc);
}catch(Exception e)
{
e.printStackTrace();
}
}
}
Here it comes

public String getData()
{
String data = "(00205EPOPP) - 3M Dyneon against E.I. du Pont";
int pointer = data.lastIndexOf(")");
String finaldata = data.substring(1,pointer-1);
return finaldata;
}

Let me know if this works for you.

Regards
Makarand Parab
13 years ago
Hi
I had a same problem when working for project. There can be two reason
1. Either there is a long connectivity time between the application and the database.
2. Most important, please check your n/w connectivity between the application server and the database. This message is thrown when there are n/w problems.

Regards
Makarand Parab
Keep me posted.

Regards
Makarand Parab
13 years ago
To Know which exception it is
Try to catch it by placing a try/catch block
inside catch block have
try
{}
catch(Exception e)
{
System.out.println("Name of the Exception :: " + e.getClass().getName());
e.printStackTrace(); /*prints where it failed and other details*/
}


let me know

Regards
Makarand Parab
13 years ago
It can be IOException or Subcalss of IOException. Remote Exception is subclass of IOException.

Regards
Makarand Parab
13 years ago