"type Routes is not a member of package ac"

Pamparampa July 22, 2015

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(
    javaJdbc,
    cache,
    javaWs,
    javaCore,
    javaJpa,
    "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

0 votes
Pamparampa July 23, 2015

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