如何获得工作的Grails 2.2.4与Oracle 12c的?

问题描述 投票:0回答:2

Debian的8.2的Java 7 + JRE 2.2.4的Grails甲骨文12C的Tomcat 7

遇到问题时尝试启动安装甲骨文12C之后的Grails。一切都在Debian 8.2 + 10的Oracle XE工作的罚款。感谢帮助

app.log:

        2016-01-01 20:57:43,245 [localhost-startStop-1] ERROR resource.ResourceMeta  - While processing /bundle-bundle_applications_head.css, /styles/dist/gui/core/main.css, /styles/dist/gui/core/top-panel.css, /styles/dist/gui/core/footer.css, /styles/dist/gui/core/general/modal-window.css, /styles/dist/gui/core/general/metro-tiles.css, /styles/dist/gui/core/general/buttons.css, /styles/src/libs/jquery.mCustomScrollbar.css, a resource was required but not found: /styles/src/libs/mCSB_buttons.png
    2016-01-01 20:57:46,005 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
    org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
        at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
        at grails.util.Environment.executeForEnvironment(Environment.java:301)
        at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
        at cz.test.libs.core.privileges.PrivilegeApiService.generateAccessRules(PrivilegeApiService.groovy:45)
        at BootStrap$_closure1.doCall(BootStrap.groovy:259)
        ... 8 more
    2016-01-01 20:57:46,012 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing Grails: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
    org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
        at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
        at grails.util.Environment.executeForEnvironment(Environment.java:301)
        at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: groovy.lang.MissingMethodException: No signature of method: cz.test.dto.system.Client.findAll() is applicable for argument types: () values: []
    Possible solutions: findAll(), findAll(), findAll(groovy.lang.Closure), findAll(java.lang.Object), findAll(java.lang.String), findAll(groovy.lang.Closure)
        at cz.test.libs.core.privileges.PrivilegeApiService.generateAccessRules(PrivilegeApiService.groovy:45)
        at BootStrap$_closure1.doCall(BootStrap.groovy:259)
        ... 8 more

DataSource.groovy的:

    dataSource {
    pooled = true
    driverClassName = "org.h2.Driver"
    username = "sa"
    password = ""
}

hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = false
    cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}


// environment specific settings
environments {
    development {
        dataSource_system {
            dbCreate = "update"
            pooled = true
            url = "jdbc:oracle:thin:@localhost:1521:xe"
            driverClassName = 'oracle.jdbc.OracleDriver'
            username = "user"
            password = "pass"
        }

        dataSource_usersettings {
            dbCreate = "update"
            pooled = true
            url = "jdbc:oracle:thin:@localhost:1521:xe"
            driverClassName = 'oracle.jdbc.OracleDriver'
            username = "user"
            password = "pass"
        }
    }

    production {
        dataSource_system {
            dbCreate = "update"
            pooled = true
            url = "jdbc:oracle:thin:@localhost:1521:xe"
            driverClassName = 'oracle.jdbc.OracleDriver'
            username = "user"
            password = "pass"
        }

        dataSource_usersettings {
            dbCreate = "update"
            pooled = true
            url = "jdbc:oracle:thin:@localhost:1521:xe"
            driverClassName = 'oracle.jdbc.OracleDriver'
            username = "user"
            password = "pass"
        }
    }
}

Build.Config.groovy

grails.servlet.version = "2.5" // 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.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

// uncomment (and adjust settings) to fork the JVM to isolate classpaths
//grails.project.fork = [
//   run: [maxMemory:1024, minMemory:64, debug:false, maxPerm:256]
//]

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()
        grailsCentral()

        mavenLocal()
        mavenCentral()

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.

        // runtime 'mysql:mysql-connector-java:5.1.22'
    }

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.8.3"
        runtime ":resources:1.2"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.5"

        build ":tomcat:$grailsVersion"

        runtime ":database-migration:1.3.2"

        compile ':cache:1.0.1'
    }
}
grails oracle12c oracle-xe
2个回答
0
投票

反正有这个固定通过链接JAVA_HOME莫名其妙出口JAVA_HOME = didnt工作,所以我用/tomcat/bin/patchclas.sh / env.sh并做了一些出口JAVA_HOME =和finaly得到这个工作:)


0
投票

对于任何磕磕绊绊到这个问题,试图让一个古老的Grails应用程序与甲骨文12C跑,有事我不得不做的是明确指定DataSource.groovy文件的话:

dataSource_system {
            dbCreate = "update"
            pooled = true
            url = "jdbc:oracle:thin:@localhost:1521:xe"
            driverClassName = 'oracle.jdbc.OracleDriver'
            username = "user"
            password = "pass"
            dialect = SequencePerTableOracleDialect
}
© www.soinside.com 2019 - 2024. All rights reserved.