java.sql.SQLException: ORA-01403: no data found at struct.getDescriptor().getMetaData()

Sam picture Sam · Nov 17, 2013 · Viewed 13k times · Source

I using oracle.sql.STRUCT class. By following code :

ResultSetMetaData metaData = struct.getDescriptor().getMetaData();

I get this exception:

java.sql.SQLException: ORA-01403: no data found
ORA-06512: at line 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:218) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:969) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4400) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.oracore.OracleTypeADT.initADTAttrNames(OracleTypeADT.java:2423) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.oracore.OracleTypeADT.getAttributeName(OracleTypeADT.java:2246) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.StructMetaData.getColumnName(StructMetaData.java:175) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]

Whay above exception occurred? What is solution?

Answer

Sam picture Sam · Nov 18, 2013

I found solution. Problem is user that my application connect with it to database don't has grant to target type. I added grant to the user and application worked fine.