"type Routes is not a member of package ac"

I tried to create my first atlassian connect application with play framework according to this tutorial https://bitbucket.org/atlassian/atlassian-connect-play-java. So I've installed play activator in version 1.3.5. Then changed a few files like it was written in the tutorial. So now my build.sbt file looks like this:

name := """play-java"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.10.4"

//libraryDependencies ++= Seq(
//  javaJdbc,
//  cache,
//  javaWs

resolvers += "Atlassian's Maven Public Repository" at "https://maven.atlassian.com/content/groups/public"

resolvers += "Local Maven Repository" at ""+Path.userHome.asFile.toURI.toURL+"/.m2/repository"

libraryDependencies ++= Seq(
    "com.atlassian.connect" % "ac-play-java_2.10" % "0.10.1" withSources()
    // your other dependencies go there

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

And this is my conf/routes file:

# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
# GET     /                           controllers.Application.index()
->        /                           ac.Routes
# Map static resources from the /public folder to the /assets URL path
# GET     /assets/*file               controllers.Assets.versioned(path="/public", file: Asset)

I've changed ac.key and ac.name in con/application.conf as well and configured database.

Earlier I tried to use some 2.11.x scala version but there were some conflicts in dependencies versions so I've downloaded scala 2.10.4 and these problems disappeared. But when I open my application with browser I see error "type Routes is not a member of package ac" and it points to line -> / ac.Routes in conf/routes. So why this problem appears?

1 answer

Problem resolved. Change version of play framework to 2.2.4 helped for me (Probably I used 2.4.2 before)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

275 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you