我无法在 DB2 中选择

发布于 2024-12-11 17:33:52 字数 3070 浏览 0 评论 0原文

我有一个应用程序,其中包括:Spring、WebSphere、访问 DB2 jdbc。 一切都设置好,应用程序通常会发布,因为当我去任何桌子上选择座位时,我会收到以下错误。

OsjsSQLErrorCodeSQLExceptionTranslator DEBUG - Translating SQLException with SQL 
state '42Y07 ', error code '30000', message [Schema 'DBPROD' does not exist]; SQL was 
[SELECT * FROM DBPROD.EXPUR_CONS_CRIVO] for task [PreparedStatementCallback]
[10/24/11 10:11:54:257 EST] 0000001b SystemOut The 10:11:54.249 [WebContainer: 1] 
ERROR bcbwahdHistoricoDescontoDAOImpl - [requestID A8IUK52K =] 
HistoricoDescontoDAOImpl.consultarHistoricoDesconto Terminating with error ()
org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback; 
SQL [SELECT * FROM DBPROD.EXPUR_CONS_CRIVO]; Schema 'DBPROD' does not exist; 
java.sql.SQLSyntaxErrorException nested exception is: Schema 'DBPROD' does not exist
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]

Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Schema 'DBPROD' does not exist
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) [derby-10.5.3.0_1.jar:na]
    ... 191 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Schema 'DBPROD' does not exist
    at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
    ... 185 common frames omitted

我的用户拥有数据库的完全访问权限,因为我不知道该怎么做。

I have an application consisting of: Spring, WebSphere, accessing DB2 jdbc.
Everything is set up ok, the application is usually published, because when I go to select a seat at any table I get this following error.

OsjsSQLErrorCodeSQLExceptionTranslator DEBUG - Translating SQLException with SQL 
state '42Y07 ', error code '30000', message [Schema 'DBPROD' does not exist]; SQL was 
[SELECT * FROM DBPROD.EXPUR_CONS_CRIVO] for task [PreparedStatementCallback]
[10/24/11 10:11:54:257 EST] 0000001b SystemOut The 10:11:54.249 [WebContainer: 1] 
ERROR bcbwahdHistoricoDescontoDAOImpl - [requestID A8IUK52K =] 
HistoricoDescontoDAOImpl.consultarHistoricoDesconto Terminating with error ()
org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback; 
SQL [SELECT * FROM DBPROD.EXPUR_CONS_CRIVO]; Schema 'DBPROD' does not exist; 
java.sql.SQLSyntaxErrorException nested exception is: Schema 'DBPROD' does not exist
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]

Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Schema 'DBPROD' does not exist
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) [derby-10.5.3.0_1.jar:na]
    ... 191 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Schema 'DBPROD' does not exist
    at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) [derby-10.5.3.0_1.jar:na]
    at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
    ... 185 common frames omitted

my user has full access to the database, since I do not know what to do.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉薄对峙 2024-12-18 17:33:52

以“42”开头的 SQL 状态代码通常指的是语法错误,但在您的情况下,很明显架构丢失。
检查这些链接希望它们能帮助您解决此问题:

  1. 当前模式特殊寄存器

  2. 我如何获得如果我有 JDBC 连接,DB2 上的当前模式?

SQL State codes beginning with '42' refer usually to Syntax errors, but in your Case its pretty clear that Schema is missing.
Check these Links hope they will help you solve this problem:

  1. CURRENT SCHEMA special register

  2. how do i get the current schema on DB2 if i have a JDBC conneciton?

你如我软肋 2024-12-18 17:33:52

正如已经提到的,您收到的错误消息来自 Apache Derby JDBC 驱动程序。检查您在 WebSphere 中配置应用程序时是否选择了正确的数据源。

As it has been mentioned, the error messages you get are from an Apache Derby JDBC driver. Check that you chose the correct datasource when you configured your application in WebSphere.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文