Hello,everbody
I have met a error of "NullPointerexception" when i use manager tool
,and i have capture the error position in source code is as follow:
public XMLDBMSMap createMapFromDTD(Properties dbProps, Properties
configProps, String dtdFilename)
throws XMLMiddlewareException, SQLException
{
DBInfo dbInfo;
Connection conn;
MapFactory_DTD factory;
String order, databaseName, catalogName, schemaName;
Hashtable namespaceURIs;
if (dbProps == null) dbProps = emptyProps;
if (configProps == null) configProps = emptyProps;
// Create a new map factory.
factory = new MapFactory_DTD();
// Set the database properties, if any.
dbInfo = getDBInfo(dbProps, false);
if (dbInfo != null)
{
conn = dbInfo.dataSource.getConnection(dbInfo.user,
dbInfo.password);
factory.setConnection(conn);
}
// Set the order options, if any.
order = configProps.getProperty(XMLDBMSProps.ORDERTYPE);
if (order != null)
{
if (order.equals(XMLDBMSProps.FIXED))
{
System.out.println("I am here1");
//when i put the statement at here,the error is occur and "I am here"
do not come outĄŁmy version of jdk is 1.5.0_08
factory.setOrderType(MapFactory_DTD.ORDER_FIXED);
}
else if (order.equals(XMLDBMSProps.NONE))
{
factory.setOrderType(MapFactory_DTD.ORDER_NONE);
}
else if (order.equals(XMLDBMSProps.COLUMNS))
{
factory.setOrderType(MapFactory_DTD.ORDER_COLUMNS);
}
else
throw new IllegalArgumentException("Invalid value of " +
XMLDBMSProps.ORDERTYPE + " property: " + order);
}
......