XML refers to not existing parent

I am using Java server side connector to populate data dynamically to my tree

The client side code is as below.

var tree_1 = cell_1.attachTree(“0”);
tree_1.enableDragAndDrop(‘1’, true);

I have the server side ProjectServlet class as below.

import java.sql.Connection;
import java.sql.DriverManager;

import com.dhtmlx.connector.ConnectorServlet;
import com.dhtmlx.connector.DBType;
import com.dhtmlx.connector.TreeConnector;

public class ProjectServlet extends ConnectorServlet {

protected void configure() {
	  //obtain DB connection
	Connection conn=null;
	try {
		Class.forName ("com.mysql.jdbc.Driver").newInstance ();
		conn = DriverManager.getConnection("jdbc:mysql://localhost/testdb", "root", "root");
	} catch (Throwable e) {
	if(null != conn){
          //Initialize connector
	TreeConnector c = new TreeConnector(conn,DBType.MySQL);
	c.render_table("project", "id","name");


 * Constructor of the object.
public ProjectServlet() {


When I run the page, I get the “XML refers to not existing parent” error. The output xml from this servlet is as shown below.

How to resolve this? Please help.

I was not using TreeConnector in my server side java class. I modified the code to use TreeConnector and I stopped getting this message. But, still I am not able to get the result set from the table. The query sent is always looking for id=0 which is not present in the table.

This is my java code.

TreeConnector c = new TreeConnector(conn,DBType.MySQL);
c.render_table(“project”, “id”, “name”, “”, “id”);

project table has the following data.

| id | name | description |
| 1 | TSC | PLM tool development |

But the connector returns an empty result set as it is looking for id=0. How to go about thus?

Issue is resolved. Refer thread - viewtopic.php?f=2&t=13034&p=66533#p66533

Sample java application is discussed there which is very useful.