Bug 147809 Null pointer exception if the table name contains spaces
The null pointer exception will be thrown if the table name contains spaces when calling the method: public String[] getTableComplexNestedXMLColumnNames( String tableName ) { return ( (TableInfo) this.tableInfos.get( tableName ) ).getComplexNestXMLColumnNames(); } In the org.eclipse.birt.report.data.oda.xml.util. RelationInformation.java The table name was stripped before adding it to the tableInfos, however if the tableName of this method is not a stripped string, then it will cause the null pointer exception. This the stack: RelationInformation.getTableColumnNames(String) line: 189 ResultSetMetaData.<init>(RelationInformation, String) line: 39 Query.getMetaData() line: 126 OdaQuery.doGetMetaData() line: 388 OdaQuery.getMetaData() line: 356 PreparedStatement.getRuntimeMetaData() line: 296 PreparedStatement.getProjectedColumns() line: 283 PreparedStatement.addColumnHints(Collection) line: 715 DataSourceQuery.addColumnHints(PreparedStatement) line: 292 DataSourceQuery.prepare() line: 207 DataExecutionManager.executeQuery(int, String, String, ArrayOfParameterValue, int, int, ArrayOfColumnProperty) line: 236 AWPSoapBindingImpl.iStatementExecute(IStatementExecute) line: 174 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 RPCProvider.invokeMethod(MessageContext, Method, Object, Object[]) line: 388 RPCProvider.processMessage(MessageContext, SOAPEnvelope, SOAPEnvelope, Object) line: 283 RPCProvider(JavaProvider).invoke(MessageContext) line: 323 InvocationStrategy.visit(Handler, MessageContext) line: 32 SOAPService(SimpleChain).doVisiting(MessageContext, HandlerIterationStrategy) line: 118 SOAPService(SimpleChain).invoke(MessageContext) line: 83 SOAPService.invoke(MessageContext) line: 453 AxisServer.invoke(MessageContext) line: 281 OdaServerAxisServlet(AxisServlet).doPost(HttpServletRequest, HttpServletResponse) line: 699 SOAPRunnable(AxisSOAPRunnable).run() line: 54 ThreadPool$WorkerThread.run() line: 216 Thread.run() line: 595
data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/RelationInformation.java
* @param tableName
	 * @return
	 */
	public String[] getTableColumnNames( String tableName )
	{
		return ( (TableInfo) this.tableInfos.get( tableName ) ).getColumnNames( );
	}
	/**
	 * Return the array of complex nested column names of certain table.
	 *  
	 * @param tableName
	 * @return
	 */
	public String[] getTableComplexNestedXMLColumnNames( String tableName )
	{
		return  ( (TableInfo) this.tableInfos.get( tableName ) ).getComplexNestXMLColumnNames();
	}
	
	/**
	 * Return the array of simple nested column names of certain table.
	 *  
	 * @param tableName
	 * @return
	 */
	public String[] getTableSimpleNestedXMLColumnNames( String tableName )
	{
		return  ( (TableInfo) this.tableInfos.get( tableName ) ).getSimpleNestXMLColumnNames();
	}
	/**
	 * Return the table root path.