如何从grails中使用oracle

时间:2014-12-21 10:34:30

标签: oracle grails

这是我的DataSource.groovy:

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

environments {
    development {
        dataSource {
            dbCreate = "update" // one of 'create', 'create-drop','update'
            url = "jdbc:oracle:thin:@192.168.2.128:1521:XE"
        }
    }
    test {
        dataSource {
            dbCreate = "update"
            url = "jdbc:oracle:thin:@192.168.2.128:1521:XE"
        }
    }
    production {
        dataSource {
            dbCreate = "update"
            url = "jdbc:oracle:thin:@192.168.2.128:1521:XE"
        }
    }
}

这就是我在应用程序启动时获得的内容:

Running Grails application

| Error 2014-12-21 11:12:32,287 [localhost-startStop-1] ERROR pool.ConnectionPool  - Unable to create initial connections of pool.

Message: E/A-Exception: The Network Adapter could not establish the connection

.......

ping 192.168.2.128工作正常

0 个答案:

没有答案