Announcement Announcement Module
Collapse
No announcement yet.
oracle. schema not found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • oracle. schema not found

    Folk! Please help to GRAILS begginer. Sorry for my english

    I have ready Oracle database schema named TMS_DEV

    I have faced with error: schema not found

    I have created GRAILS app. C:\grails_workspace2\Tst7

    Then have configured DataSource:
    Contents of C:\grails_workspace2\Tst7\grails-app\conf\DataSource.groovy:



    dataSource {
    pooled = true
    driverClassName = "oracle.jdbc.OracleDriver"
    dialect = "org.hibernate.dialect.Oracle10gDialect"
    username = "TMS_DEV"
    password = "password"
    }


    development {
    dataSource {
    dbCreate = "update" // one of 'create', 'create-drop','update'
    url = "jdbc:oracle:thin:@servername:1522:sidname"
    }
    }

    production {
    dataSource {
    dbCreate = "update" // one of 'create', 'create-drop','update'
    url = "jdbc:oracle:thin:@servername:1522:sidname"
    }
    }


    Than I've created new domain Checktypes

    package tst7

    class Checktypes {
    static mapping = {
    table 'TMS_DEV.CHECKTYPES' ...
    ...
    ...
    ...

    String toString() {
    return "${checktypecode}"
    }
    }



    Then I've generated controller ChecktypesController with method list


    def list(Integer max) {
    params.max = Math.min(max ?: 10, 100)
    [checktypesInstanceList: Checktypes.list(params), checktypesInstanceTotal: Checktypes.count()]
    }


    Then I've started the application.

    On the main screen of application I've clicked tst7.ChecktypesController and have got error in console:

    Error 2012-08-22 11:39:07,889 [http-bio-8080-exec-9] ERROR util.JDBCExceptionReporter - Schema "TMS_DEV" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_11_0_, this_.active as active11_0_, this_.availabilitychecktype as availabi3_11_0_, this_.checktypecode as checktyp1_11_0_, this_.checktypedescr as checktyp4_11_0_, this_.TARGETTYPECODE as TARGETTY5_11_0_ from TMS_DEV.CHECKTYPES this_ ) where rownum <= ? [90079-164]
    | Error 2012-08-22 11:39:08,077 [http-bio-8080-exec-9] ERROR errors.GrailsExceptionResolver - JdbcSQLException occurred when processing request: [GET] /Tst7/checktypes/list
    Schema "TMS_DEV" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_11_0_, this_.active as active11_0_, this_.availabilitychecktype as availabi3_11_0_, this_.checktypecode as checktyp1_11_0_, this_.checktypedescr as checktyp4_11_0_, this_.TARGETTYPECODE as TARGETTY5_11_0_ from TMS_DEV.CHECKTYPES this_ ) where rownum <= ? [90079-164]. Stacktrace follows:
    Message: Schema "TMS_DEV" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_11_0_, this_.active as active11_0_, this_.availabilitychecktype as availabi3_11_0_, this_.checktypecode as checktyp1_11_0_, this_.checktypedescr as checktyp4_11_0_, this_.TARGETTYPECODE as TARGETTY5_11_0_ from TMS_DEV.CHECKTYPES this_ ) where rownum <= ? [90079-164]

  • #2
    Addition to prev. post. why h2 (org.h2.engine.Session - in memory database) is used?

    If you will see full error stack you will that H2 database classes is used. Why NOT ORACLE classes?

    why h2 (org.h2.engine.Session class - in memory database) is used?

    Addition to post. why h2 (org.h2.engine.Session - in memory database) is used?

    Error 2012-08-23 16:45:41,856 [http-bio-8080-exec-9] ERROR util.JDBCExceptionReporter - Table "CHECKTYPES" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_3_0_, this_.active as active3_0_, this_.availabilitychecktype as availabi3_3_0_, this_.checktypecode as checktyp1_3_0_, this_.checktypedescr as checktyp4_3_0_, this_.TARGETTYPECODE as TARGETTY5_3_0_ from CHECKTYPES this_ ) where rownum <= ? [42102-164]
    | Error 2012-08-23 16:45:41,981 [http-bio-8080-exec-9] ERROR errors.GrailsExceptionResolver - JdbcSQLException occurred when processing request: [GET] /Tst7/checktypes/list
    Table "CHECKTYPES" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_3_0_, this_.active as active3_0_, this_.availabilitychecktype as availabi3_3_0_, this_.checktypecode as checktyp1_3_0_, this_.checktypedescr as checktyp4_3_0_, this_.TARGETTYPECODE as TARGETTY5_3_0_ from CHECKTYPES this_ ) where rownum <= ? [42102-164]. Stacktrace follows:
    Message: Table "CHECKTYPES" not found; SQL statement:
    select * from ( select this_.CHECKTYPECODE as CHECKTYP1_3_0_, this_.active as active3_0_, this_.availabilitychecktype as availabi3_3_0_, this_.checktypecode as checktyp1_3_0_, this_.checktypedescr as checktyp4_3_0_, this_.TARGETTYPECODE as TARGETTY5_3_0_ from CHECKTYPES this_ ) where rownum <= ? [42102-164]
    Line | Method
    ->> 329 | getJdbcSQLException in org.h2.message.DbException
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    | 169 | get in ''
    | 146 | get . . . . . . . . . . . in ''
    | 4753 | readTableOrView in org.h2.command.Parser
    | 1080 | readTableFilter . . . . . in ''
    | 1686 | parseSelectSimpleFromPart in ''
    | 1793 | parseSelectSimple . . . . in ''
    | 1680 | parseSelectSub in ''
    | 1523 | parseSelectUnion . . . . in ''
    | 1022 | readTableFilter in ''
    | 1686 | parseSelectSimpleFromPart in ''
    | 1793 | parseSelectSimple in ''
    | 1680 | parseSelectSub . . . . . in ''
    | 1523 | parseSelectUnion in ''
    | 1511 | parseSelect . . . . . . . in ''
    | 405 | parsePrepared in ''
    | 279 | parse . . . . . . . . . . in ''
    | 251 | parse in ''
    | 217 | prepareCommand . . . . . in ''
    | 415 | prepareLocal in org.h2.engine.Session
    | 364 | prepareCommand . . . . . in ''
    | 1121 | prepareCommand in org.h2.jdbc.JdbcConnection
    | 71 | <init> . . . . . . . . . in org.h2.jdbc.JdbcPreparedStatement
    | 267 | prepareStatement in org.h2.jdbc.JdbcConnection
    | 281 | prepareStatement . . . . in org.apache.commons.dbcp.DelegatingConnection
    | 313 | prepareStatement in org.apache.commons.dbcp.PoolingDataSource$PoolGuar dConnectionWrapper
    | 55 | <init> . . . . . . . . . in grails.orm.PagedResultList
    | 37 | list in tst7.ChecktypesController
    | 195 | doFilter . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCaching Filter
    | 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
    | 1110 | runWorker . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
    | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
    ^ 722 | run . . . . . . . . . . . in java.lang.Threadc

    Comment

    Working...
    X