나는 메시지있어 Grails는 2.4.3을 사용하여 GGTS 3.6.2 내 응용 프로그램을 실행하는 경우 :Grails의 : 예외 : SQLException : 오라클 : JDBC에 대한 찾을 수 없습니다 적합 드라이버 얇은
Caused by SQLException: No suitable driver found for jdbc:oracle:thin:@server:port/OCI
->> 689 | getConnection in java.sql.DriverManager
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 247 | getConnection in ''
| 18 | <init> . in awtool.Controller
| 266 | run in java.util.concurrent.FutureTask
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . in java.lang.Thread
Error |
Forked Grails VM exited with errorJava HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
내가 많은 게시물 읽기 이 오류에 대해 설명하고 몇 가지 권장 사항을 사용했습니다. 나는
는 방법이 어떻게 할 수 있습니다
이자바와 Grails의 경로가 OK입니다 ../ 도 내가 외부 JAR 추가를 사용하여 프로젝트의 Java 빌드 경로에 ojdbc6.jar 추가 lib 디렉토리 프로젝트에 ojdbc6.jar 추가 이 문제를 해결 하시겠습니까?
BuildConfig.groovy :
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the test-app JVM, uses the daemon by default
// test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the run-app JVM
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
grails.project.dependency.resolver = "maven" // or ivymaven
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
}
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
// mavenRepo "http://repository.codehaus.org"
// mavenRepo "http://download.java.net/maven/2/"
// mavenRepo "http://repository.jboss.com/maven2/"
mavenRepo "http://repo.spring.io/milestone/"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime 'mysql:mysql-connector-java:5.1.34'
// runtime "com.oracle:ojdbc6:11.2.0.4"
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0-grails-2.4"
}
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.7'
compile ":asset-pipeline:1.9.6"
compile ":spring-security-core:2.0-RC4"
compile ":spring-security-ldap:2.0-RC2"
compile ":force-ssl:1.0.0"
// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.5.5" // or ":hibernate:3.6.10.17"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.9.0"
//compile ":less-asset-pipeline:1.10.0"
//compile ":coffee-asset-pipeline:1.8.0"
//compile ":handlebars-asset-pipeline:1.3.0.3"
}
}
grails.server.port.http=8088
DataSource.groovy에
import groovy.sql.*
dataSource {
pooled = true
dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
driverClassName = "com.mysql.jdbc.Driver"
username = "login"
password = "pass"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:mysql://server:port/login"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://server:port/login"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://server:port/login"
}
}
}
'DataSource.groovy'와'BuildConfig.groovy'를 보여주세요 – Chris
@crudolf가 메인 포스트에 추가되었습니다 – lsv