gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-11-01 01:35:00 26 4
gpt4 key购买 nike

我使用 oracle.sql.STRUCT 类。通过以下代码:

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

我得到这个异常:

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"]

为什么会出现上述异常?什么是解决方案?

最佳答案

我找到了解决方案。问题是我的应用程序连接到数据库的用户没有授予目标类型。我向用户添加了授权,应用程序运行良好。

关于java.sql.SQLException : ORA-01403: no data found at struct. getDescriptor().getMetaData() 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20027897/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com