Skip to content

Sample app is not running out of the box  #16

@starmount-jvrljicak

Description

@starmount-jvrljicak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions