'Invalid column index' is the error occurs due to SQL Exception in ADF Faces.
and main reason behind this is mismatch between ViewObject's query and Attributes.
suppose i have an application with default HR Schema and Employees Table.
- See the query and attribute list of Employees ViewObject , when there is no mismatch between attributes and query
and query is -
- Now i have removed a attribute from ViewObject query, then mismatch between VO Query and attribute list tends towards sql exception "Invalid Column Index"
Query is- (First_Name is not there)
See here is difference in order of attribute of vo and query- (Last_Name and Email)
- In this case of mismatch in order, two things may happen-
- First one- if Data type of mismatched attributes matches (as Last_Name and Email both are Var char) then value in both fields will be set in VO otherwise it will throw an exception.
- See this scenario in given snap- Only due to wrong ordering ,value of Last_Name and Email got replaced
- And if you have Impl classes for your Entity Object or View Object then also check indexing in classes ,query and XML source.
- Invalid Column Index may also occur due to pl/sql (database) function call, always check it and its parameter indexing