{"action":"created","issue":{"url":"https://api.github.com/repos/javalite/activejdbc/issues/672","repository_url":"https://api.github.com/repos/javalite/activejdbc","labels_url":"https://api.github.com/repos/javalite/activejdbc/issues/672/labels{/name}","comments_url":"https://api.github.com/repos/javalite/activejdbc/issues/672/comments","events_url":"https://api.github.com/repos/javalite/activejdbc/issues/672/events","html_url":"https://github.com/javalite/activejdbc/issues/672","id":295814058,"number":672,"title":"Error when trying to use database.properties","user":{"login":"simonknoll","id":377838,"avatar_url":"https://avatars0.githubusercontent.com/u/377838?v=4","gravatar_id":"","url":"https://api.github.com/users/simonknoll","html_url":"https://github.com/simonknoll","followers_url":"https://api.github.com/users/simonknoll/followers","following_url":"https://api.github.com/users/simonknoll/following{/other_user}","gists_url":"https://api.github.com/users/simonknoll/gists{/gist_id}","starred_url":"https://api.github.com/users/simonknoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonknoll/subscriptions","organizations_url":"https://api.github.com/users/simonknoll/orgs","repos_url":"https://api.github.com/users/simonknoll/repos","events_url":"https://api.github.com/users/simonknoll/events{/privacy}","received_events_url":"https://api.github.com/users/simonknoll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-09T09:58:22Z","updated_at":"2018-02-09T22:39:15Z","closed_at":null,"author_association":"NONE","body":"I get the error that there is no database.properties file, even though i placed a database.properties file in the main/java/resources folder\r\n\r\n### build.gradle file\r\n```\r\ngroup 'com.simonknoll.quantum'\r\nversion '1.0-SNAPSHOT'\r\napply plugin: 'java'\r\napply plugin: 'org.javalite.activejdbc'\r\n\r\n\r\nbuildscript {\r\n    repositories {\r\n        mavenCentral()\r\n        maven { url 'http://repo.javalite.io' }\r\n    }\r\n    dependencies {\r\n        classpath group: 'org.javalite', name: 'activejdbc-gradle-plugin', version: '1.4.13-SNAPSHOT'\r\n    }\r\n}\r\n\r\nrepositories {\r\n    mavenCentral()\r\n    maven { url 'http://repo.javalite.io' }\r\n}\r\n\r\ndependencies {\r\n    compile 'org.postgresql:postgresql:42.2.1'\r\n    compile 'org.javalite:activejdbc:1.4.13.j7'\r\n}\r\ntask run(dependsOn: 'build', type: JavaExec) {\r\n    main = 'com.simonknoll.quantum.Servlet'\r\n    classpath = sourceSets.main.runtimeClasspath\r\n}\r\n\r\n```\r\n\r\n### gradle run output\r\n```\r\n> gradle run\r\n\r\n> Task :instrumentModels \r\n**************************** START INSTRUMENTATION ****************************\r\nDirectory: /Users/simon/Code/visor/build/classes/java/main\r\n**************************** END INSTRUMENTATION ****************************\r\n\r\n> Task :run FAILED\r\nSLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\r\nSLF4J: Defaulting to no-operation (NOP) logger implementation\r\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\r\nException in thread \"main\" org.javalite.activejdbc.DBException: Could not find configuration in a property file for environment: development. Are you sure you have a database.properties file configured?\r\n        at org.javalite.activejdbc.DB.open(DB.java:145)\r\n        at org.javalite.activejdbc.Base.open(Base.java:52)\r\n        at eu.additive.quantum.visor.Servlet.main(Servlet.java:12)\r\n\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':run'.\r\n> Process 'command '/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1\r\n\r\n* Try:\r\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.\r\n\r\n* Get more help at https://help.gradle.org\r\n\r\nDeprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.\r\nSee https://docs.gradle.org/4.5/userguide/command_line_interface.html#sec:command_line_warnings\r\n```"},"comment":{"url":"https://api.github.com/repos/javalite/activejdbc/issues/comments/364589981","html_url":"https://github.com/javalite/activejdbc/issues/672#issuecomment-364589981","issue_url":"https://api.github.com/repos/javalite/activejdbc/issues/672","id":364589981,"user":{"login":"ipolevoy","id":500941,"avatar_url":"https://avatars2.githubusercontent.com/u/500941?v=4","gravatar_id":"","url":"https://api.github.com/users/ipolevoy","html_url":"https://github.com/ipolevoy","followers_url":"https://api.github.com/users/ipolevoy/followers","following_url":"https://api.github.com/users/ipolevoy/following{/other_user}","gists_url":"https://api.github.com/users/ipolevoy/gists{/gist_id}","starred_url":"https://api.github.com/users/ipolevoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipolevoy/subscriptions","organizations_url":"https://api.github.com/users/ipolevoy/orgs","repos_url":"https://api.github.com/users/ipolevoy/repos","events_url":"https://api.github.com/users/ipolevoy/events{/privacy}","received_events_url":"https://api.github.com/users/ipolevoy/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T22:39:15Z","updated_at":"2018-02-09T22:39:15Z","author_association":"OWNER","body":"@simonknoll , your file is missing password property. The warning message could be better in this case, but the framework requires four parameters: \r\nhttp://javalite.io/database_connection_management#multiple-environments-property-file-method"}}
{"actor":{"display_login":"ipolevoy"}}