linkedin / linkedin/dr-elephant
Unable to run as a Play project
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 839
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
My goal is to setup a development environment on my Mac, so that I can add some additional functionality for our needs.
Please let me know the best approach to do that.
I want do something like what we do with a typical play project, where I have my project running (play run) and I make edits via eclipse (after doing play eclipse) and automatically the changes are reflected.
If I go with the compile.sh option, I think its a lot of work as I have to again unzip the distribution created to execute the code.
I think the issue is originating from ebean..and the issue may be the way that the configuration files have to be passed.
Please let me know the way to setup Dev environment with Dr. Elephant.
# Details:
When I try to run it as a Play project with the command below,
play -Dconfig.resource=/Users/dr/dr-elephant/app-conf "~run 9000"
I get the following error when I try to navigate to a page like "host:8888/search"
[error] play - Cannot invoke the action, eventually got an error: java.lang.RuntimeException: DataSource user is null?
[error] application -
! @702e5capa - Internal server error, for (GET) [/] ->
play.api.Application$$anon$1: Execution exception[[RuntimeException: DataSource user is null?]]
at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10.jar:2.2.2]
at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at scala.Option.map(Option.scala:145) [scala-library-2.10.4.jar:na]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2.applyOrElse(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
Caused by: java.lang.RuntimeException: DataSource user is null?
at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.(DataSourcePool.java:189) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.getDataSourceFromConfig(DefaultServerFactory.java:420) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.setDataSource(DefaultServerFactory.java:380) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:163) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:125) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:65) ~[avaje-ebeanorm.jar:na]
#
I have tried by coping conf folder contents into app-conf and set the following properties in both elephant.conf and application.conf
db.default.driver=com.mysql.jdbc.Driver
db_url=localhost
db.default.url="jdbc:mysql://localhost:3306/drelephant"
db.default.user=root
db.default.password=""
db.default.host=localhost
datasource.db.username=root
datasource.db.password=""
datasource.db.databaseUrl="jdbc:mysql://localhost:3306/drelephant"
datasource.db.databaseDriver=com.mysql.jdbc.Driver
db_name=drelephant
db_user=root
db_password=""
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing compile.sh with the Play command and inspect how app-conf, elephant.conf, and application.conf are loaded. Trace the configuration used when navigating to /search and verify the documented development setup can launch with play run without the DataSource user error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- backend, database, developer-experience
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100