gpt4 book ai didi

Oracle 表创建问题

转载 作者:行者123 更新时间:2023-12-02 13:58:13 28 4
gpt4 key购买 nike

我在我的 grails 应用程序中使用了事件插件。当我尝试运行我的应用程序时,出现此错误。不创建表。我不明白为什么。

| Error 2012-04-20 18:30:24,746 [pool-6-thread-1] ERROR interceptor.CommandContext  - Error while closing command context
Message:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

Line | Method
->> 8 | wrapException in org.apache.ibatis.exceptions.ExceptionFactory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 77 | selectList in org.apache.ibatis.session.defaults.DefaultSqlSession
| 69 | selectList . . . . . . . . . . . . . . . in ''
| 40 | selectOne in ''
| 217 | selectById . . . . . . . . . . . . . . . in org.activiti.engine.impl.db.DbSqlSession
| 629 | dbSchemaUpdate in ''
| 885 | performSchemaOperationsProcessEngineBuild in ''
| 25 | execute in org.activiti.engine.impl.SchemaOperationsProcessEngineBuild
| 24 | execute . . . . . . . . . . . . . . . . . in org.activiti.engine.impl.interceptor.CommandExecutorImpl
| 42 | execute in org.activiti.engine.impl.interceptor.CommandContextInterceptor
| 40 | execute . . . . . . . . . . . . . . . . . in org.activiti.spring.SpringTransactionInterceptor
| 33 | execute in org.activiti.engine.impl.interceptor.LogInterceptor
| 77 | <init> . . . . . . . . . . . . . . . . . in org.activiti.engine.impl.ProcessEngineImpl
| 271 | buildProcessEngine in org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
| 60 | buildProcessEngine . . . . . . . . . . . in org.activiti.spring.SpringProcessEngineConfiguration
| 56 | getObject in org.activiti.spring.ProcessEngineFactoryBean
| 32 | getObject . . . . . . . . . . . . . . . . in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread

Caused by SQLSyntaxErrorException: ORA-00942: table or view does not exist

->> 91 | newSQLException in oracle.jdbc.driver.SQLStateMapping
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 112 | newSQLException in oracle.jdbc.driver.DatabaseError
| 173 | throwSqlException . . . . . . . . . . . . in ''
| 455 | processError in oracle.jdbc.driver.T4CTTIoer
| 413 | processError . . . . . . . . . . . . . . in ''
| 1030 | receive in oracle.jdbc.driver.T4C8Oall
| 194 | doOall8 . . . . . . . . . . . . . . . . . in oracle.jdbc.driver.T4CPreparedStatement
| 785 | executeForDescribe in ''
| 860 | executeMaybeDescribe . . . . . . . . . . in ''
| 1186 | doExecuteWithTimeout in oracle.jdbc.driver.OracleStatement
| 3381 | executeInternal . . . . . . . . . . . . . in oracle.jdbc.driver.OraclePreparedStatement
| 3482 | execute in ''
| 1373 | execute . . . . . . . . . . . . . . . . . in oracle.jdbc.driver.OraclePreparedStatementWrapper
| 172 | execute in org.apache.commons.dbcp.DelegatingPreparedStatement
| 39 | query . . . . . . . . . . . . . . . . . . in org.apache.ibatis.executor.statement.PreparedStatementHandler
| 55 | query in org.apache.ibatis.executor.statement.RoutingStatementHandler
| 41 | doQuery . . . . . . . . . . . . . . . . . in org.apache.ibatis.executor.SimpleExecutor
| 216 | queryFromDatabase in org.apache.ibatis.executor.BaseExecutor
| 95 | query . . . . . . . . . . . . . . . . . . in ''
| 72 | query in org.apache.ibatis.executor.CachingExecutor
| 75 | selectList . . . . . . . . . . . . . . . in org.apache.ibatis.session.defaults.DefaultSqlSession
| 69 | selectList in ''
| 40 | selectOne . . . . . . . . . . . . . . . . in ''
| 217 | selectById in org.activiti.engine.impl.db.DbSqlSession
| 629 | dbSchemaUpdate . . . . . . . . . . . . . in ''
| 885 | performSchemaOperationsProcessEngineBuild in ''
| 25 | execute . . . . . . . . . . . . . . . . . in org.activiti.engine.impl.SchemaOperationsProcessEngineBuild
| 24 | execute in org.activiti.engine.impl.interceptor.CommandExecutorImpl
| 42 | execute . . . . . . . . . . . . . . . . . in org.activiti.engine.impl.interceptor.CommandContextInterceptor
| 40 | execute in org.activiti.spring.SpringTransactionInterceptor
| 33 | execute . . . . . . . . . . . . . . . . . in org.activiti.engine.impl.interceptor.LogInterceptor
| 77 | <init> in org.activiti.engine.impl.ProcessEngineImpl
| 271 | buildProcessEngine . . . . . . . . . . . in org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
| 60 | buildProcessEngine in org.activiti.spring.SpringProcessEngineConfiguration
| 56 | getObject . . . . . . . . . . . . . . . . in org.activiti.spring.ProcessEngineFactoryBean
| 32 | getObject in ''
| 334 | innerRun . . . . . . . . . . . . . . . . in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . . . . . . . . . . . . . . . . . in java.lang.Thread
| Error 2012-04-20 18:30:24,927 [pool-6-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

Message: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

Line | Method
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread

Caused by PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

->> 8 | wrapException in org.apache.ibatis.exceptions.ExceptionFactory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 77 | selectList in org.apache.ibatis.session.defaults.DefaultSqlSession
| 69 | selectList in ''
| 40 | selectOne in ''
| 217 | selectById in org.activiti.engine.impl.db.DbSqlSession
| 629 | dbSchemaUpdate in ''
| 885 | performSchemaOperationsProcessEngineBuild in ''
| 25 | execute in org.activiti.engine.impl.SchemaOperationsProcessEngineBuild
| 24 | execute . in org.activiti.engine.impl.interceptor.CommandExecutorImpl
| 42 | execute in org.activiti.engine.impl.interceptor.CommandContextInterceptor
| 40 | execute . in org.activiti.spring.SpringTransactionInterceptor
| 33 | execute in org.activiti.engine.impl.interceptor.LogInterceptor
| 77 | <init> . in org.activiti.engine.impl.ProcessEngineImpl
| 271 | buildProcessEngine in org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
| 60 | buildProcessEngine in org.activiti.spring.SpringProcessEngineConfiguration
| 56 | getObject in org.activiti.spring.ProcessEngineFactoryBean
| 32 | getObject in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread

Caused by SQLSyntaxErrorException: ORA-00942: table or view does not exist

->> 91 | newSQLException in oracle.jdbc.driver.SQLStateMapping
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 112 | newSQLException in oracle.jdbc.driver.DatabaseError
| 173 | throwSqlException in ''
| 455 | processError in oracle.jdbc.driver.T4CTTIoer
| 413 | processError in ''
| 1030 | receive in oracle.jdbc.driver.T4C8Oall
| 194 | doOall8 . in oracle.jdbc.driver.T4CPreparedStatement
| 785 | executeForDescribe in ''
| 860 | executeMaybeDescribe in ''
| 1186 | doExecuteWithTimeout in oracle.jdbc.driver.OracleStatement
| 3381 | executeInternal in oracle.jdbc.driver.OraclePreparedStatement
| 3482 | execute in ''
| 1373 | execute . in oracle.jdbc.driver.OraclePreparedStatementWrapper
| 172 | execute in org.apache.commons.dbcp.DelegatingPreparedStatement
| 39 | query . . in org.apache.ibatis.executor.statement.PreparedStatementHandler
| 55 | query in org.apache.ibatis.executor.statement.RoutingStatementHandler
| 41 | doQuery . in org.apache.ibatis.executor.SimpleExecutor
| 216 | queryFromDatabase in org.apache.ibatis.executor.BaseExecutor
| 95 | query . . in ''
| 72 | query in org.apache.ibatis.executor.CachingExecutor
| 75 | selectList in org.apache.ibatis.session.defaults.DefaultSqlSession
| 69 | selectList in ''
| 40 | selectOne in ''
| 217 | selectById in org.activiti.engine.impl.db.DbSqlSession
| 629 | dbSchemaUpdate in ''
| 885 | performSchemaOperationsProcessEngineBuild in ''
| 25 | execute . in org.activiti.engine.impl.SchemaOperationsProcessEngineBuild
| 24 | execute in org.activiti.engine.impl.interceptor.CommandExecutorImpl
| 42 | execute . in org.activiti.engine.impl.interceptor.CommandContextInterceptor
| 40 | execute in org.activiti.spring.SpringTransactionInterceptor
| 33 | execute . in org.activiti.engine.impl.interceptor.LogInterceptor
| 77 | <init> in org.activiti.engine.impl.ProcessEngineImpl
| 271 | buildProcessEngine in org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
| 60 | buildProcessEngine in org.activiti.spring.SpringProcessEngineConfiguration
| 56 | getObject in org.activiti.spring.ProcessEngineFactoryBean
| 32 | getObject in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread

最佳答案

出现此错误消息的 3 种可能性:

  • 被引用的表/ View 实际上不存在。
  • 被引用的表/ View 确实存在,但您无权从中进行 SELECT。
  • 表/ View 存在,您有权从中进行 SELECT,但表/ View 位于不同的架构中,并且未使用限定名称(例如 SCHEMA.TABLE_NAME)进行引用或未通过同义词设置别名。

  • 该问题的修复应该是相当明显的:
  • 创建表/ View
  • 通过 GRANT 命令获取对表/ View 的权限
  • 在 SELECT 语句中创建同义词或完全限定表/ View 名称
  • 关于Oracle 表创建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10247635/

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