Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample app is not running out of the box #16

Open
starmount-jvrljicak opened this issue Mar 20, 2016 · 0 comments
Open

Sample app is not running out of the box #16

starmount-jvrljicak opened this issue Mar 20, 2016 · 0 comments

Comments

@starmount-jvrljicak
Copy link

Hello,

I tried the sample app and it won't come up.

Throws 'Caused by: java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver'

If I add:
compile("org.neo4j:neo4j-jdbc:$neo4jVerison") in BuildConfig.xml
then
'Could not find artifact org.neo4j:neo4j-jdbc:jar:2.0.3 in grailsCentral'

I tried different versions and releases with no luck. Someone has a working config file to give it try?

My only changes are in the DataSource.groovy

`grails {
neo4j {

    // neo4j jdbc url, see https://github.com/neo4j-contrib/neo4j-jdbc for syntax
    // this configures a embedded instance
    url = "jdbc:neo4j:localhost:7474"

    // for remote usage:
    // url = "jdbc:neo4j://localhost:7474/"
    // optional: if authentication extension is used on Neo4j server, provide credentials:
    //    username = "neo4j"
    //    password = "<mypasswd>"

    // any other stuff below is just for embedded instances

    // configure embedded mode, if true HA is used, false refers to single instance
    // NB: for HA you need to configure dbProperties
    // NB: for HA you need to add dependencies
    //ha = false

    // set graph.db location, defaults to data/graph.db
    location = "C:\\opt\\neo4j\\db"

    // put any Neo4j config options (normally residing in neo4j.properties) here
    // NB: this does of course not work if url is a remote connection
    dbProperties = [

        // allow_store_upgrade: true,
        // remote_shell_enabled: true,

        // sample settings for ha=true
        // 'ha.server_id' : 1,
        // 'ha.initial_hosts': "localhost:5001-5003",
    ]
}

}

//hibernate {
// cache.use_second_level_cache = true
// cache.use_query_cache = false
// cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
//// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
// singleSession = true // configure OSIV singleSession mode
//}

dataSource {
pooled = true
jmxExport = true
driverClassName = "org.neo4j.jdbc.Driver"
username = "neo4j"
password = "jurito01"
}

// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:neo4j:localhost:7474"
// url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=false
validationQuery="SELECT 1"
jdbcInterceptors="ConnectionState"
}
}
}
}`
any help is welcome

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant