Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:19:50+00:00 2026-06-12T09:19:50+00:00

Hello I am trying run a simple test in a web app using Play!

  • 0

Hello I am trying run a simple test in a web app using Play! Framework, but I got a error:

[info] RouteTest
[error] Test RouteTest.testRouteActivityIndex failed: DataSource user is null?
[error]     at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.<init>(DataSourcePool.java:198)
[error]     at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.getDataSource(DataSourceManager.java:210)
[error]     at com.avaje.ebeaninternal.server.lib.sql.DataSourceGlobalManager.getDataSource(DataSourceGlobalManager.java:63)
[error]     at com.avaje.ebeaninternal.server.core.DefaultServerFactory.getDataSourceFromConfig(DefaultServerFactory.java:427)
[error]     at com.avaje.ebeaninternal.server.core.DefaultServerFactory.setDataSource(DefaultServerFactory.java:388)
[error]     at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:168)
[error]     at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:125)
[error]     at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
[error]     at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:64)
[error]     at com.avaje.ebean.Ebean$ServerManager.getWithCreate(Ebean.java:237)
[error]     at com.avaje.ebean.Ebean$ServerManager.get(Ebean.java:224)
[error]     at com.avaje.ebean.Ebean$ServerManager.access$200(Ebean.java:159)
[error]     at com.avaje.ebean.Ebean.getServer(Ebean.java:288)
[error]     at play.db.ebean.Model$Finder.server(Model.java:216)
[error]     at play.db.ebean.Model$Finder.all(Model.java:230)
[error]     at models.Activity.all(Activity.java:29)
[error]     at controllers.Application.activities(Application.java:18)
[error]     at Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.apply(routes_routing.scala:60)
[error]     at Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.apply(routes_routing.scala:60)
[error]     at play.core.Router$HandlerInvoker$$anon$4$$anon$1.invocation(Router.scala:1086)
[error]     at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:33)
[error]     at play.core.j.JavaAction$class.apply(JavaAction.scala:74)
[error]     at play.core.Router$HandlerInvoker$$anon$4$$anon$1.apply(Router.scala:1085)
[error]     at play.test.Helpers.invokeHandler(Helpers.java:34)
[error]     at play.test.Helpers.routeAndCall(Helpers.java:246)
[error]     at play.test.Helpers.routeAndCall(Helpers.java:231)
[error]     at RouteTest.testRouteActivityIndex(RouteTest.java:14)
[error]     ...
[info] x RouteTest.testRouteActivityIndex

The code of test is:

    @Test
public void testRouteActivityIndex(){
    Result result = routeAndCall(fakeRequest(GET, "/activities"));
    Assert.assertNotNull(result);
}

I tried researching the error, but did not find anything very useful for this case, even the site’s play!. someone has gone through this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:19:51+00:00Added an answer on June 12, 2026 at 9:19 am

    Your /activities action probably make some calls to the DB.

    So you should make your test in a running fake application as explained in the “Running in a fake application” section of this documentation: http://www.playframework.org/documentation/2.0.3/JavaTest

    And don’t forget to import the static Helper:

    import static play.test.Helpers.*;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run simple Hello World but it gives this error.. Failed
I am just trying to compile and run a very simple test program, but
I'm trying to make a simple hello-world executable python gui app in windows using
I have this problem when trying to run hello world program using android SDK.
I'm trying out log4j in a simple test app. I create a new Java
Hello I'm trying to run a simple sql command on a DB from MS
I am trying to make a simple application using Google App Engine. Below is
I'm trying to create a simple JavaScript test front-end for my WCF service, but
I am trying to run a simple loop through all files script but it's
I'm trying to run Jettys ServletTester in my JUnit test. I created a simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.