Menu
  • HOME
  • TAGS

Why does test report “[info] No tests were executed” for ScalaTest with a single specification in specs2?

scala,specs2,typesafe-activator

Two tests were ran, one MySpec and the other ScalaTest. The ScalaTest was the one that had No tests were executed. The output there has three sections: 1. results for MySpec, 2. results for ScalaTest, and 3. results for all (summary)....

Is it a good practice to set GLOBAL variables like this in playframework?

scala,dependency-injection,playframework-2.0,typesafe-activator

Services are usually implemented as stateless singletons so I would say that it is ok. Your question is more related to general dependency injection principles than to Play.

What is the activator command to generate application secret?

playframework-2.3,typesafe-activator

Both activator play-generate-secret and activator play-update-secret work well for the Activator. You can find their definition here in the sources. And as you can see they are part of Play and not the Activator. val generateSecret = TaskKey[String]("play-generate-secret", "Generate a new application secret", KeyRanks.BTask) val updateSecret = TaskKey[File]("play-update-secret", "Update the...

Why is my play framework build sometimes fetching oss-parent dependency?

java,maven,sbt,typesafe-activator,oss-parent

The underlying cause is probably that the oss.sonatype.org repo was moved from http to https not long ago, so sbt is trying to fetch that dependency over https, getting a 301 redirect and bombing out on that. I suspect that the reason you don't see this on your local is...

Activator `.sbt.ivy.lock` is not available

sbt,typesafe-activator

The .sbt.ivy.lock file is used to synchronize access to your local ivy2 repository between several processes so they cannot modify the directory simultaneously. Usually the situation that you described happens when you have an IDE and Activator/sbt terminal running at the same time. Even though you killed the Idea Process...

What is the best approach and optimal path to create sbt multi-module project with activator?

scala,sbt,multi-module,typesafe-activator

Activator is just an enhanced sbt, thus you can freely follow the sbt instruction: http://www.scala-sbt.org/0.13/tutorial/Multi-Project.html In short you have to put your activator project in subdirectories and define dependency in the root build.sbt...

How to check whether there are newer versions of library dependencies in an sbt/play/activator project

sbt,playframework-2.3,typesafe-activator

You're looking for sbt-updates, which is a plugin for sbt and activator. Install the plugin and execute activator dependencyUpdates to see the list of outdated dependencies....

Play 2.2.x: Running multiple tests in parallel with app local globals

scala,playframework,playframework-2.2,typesafe-activator

Sadly that is a design limitation with the pre 2.4 versions of play, there isn't really any good way around it. There is also internal pieces of play that uses the global play instance, so even if your code didn't then it still wouldn't be safe to run tests that...

Activator throws IllegalArgumentException: URI has an authority component

playframework-2.0,sbt,typesafe-activator,activator

What caused this? Still no clue. But just deleting the .sbt folder in the root directory made sbt refresh everything from scratch. All projects now work properly again.

How to configure akkacluster using SSL support

typesafe-activator,akka-cluster

I had used folloing configuration.Also generated proper certificates following : http://docs.oracle.com/cd/E19528-01/819-4733/6n6s6u1gl/index.html Also note that : You need to set up the keystore and truststore, define the SSL/TLS version to be used and set the enabled algorithms. These settings correspond directly to the JSSE configuration, which are documented here : http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html...

Why does “activator ui” fail with “Error: Could not find or load main class ui”?

typesafe-activator

It appears that you're facing permission-related problems. I can't give you the exact steps to sort it out (as I'm on Mac OS), but you should be able to work it around by running cmd as Administrator and then executing activator ui again. There's also the version 1.2.12 so you...

Play Scala activator compile command shows value userid is not a member of play.api.data.Form[models.Changepas sword]

scala,model-view-controller,playframework,playframework-2.0,typesafe-activator

You can't use the value of the form as a parameter for the route: @form(routes.Users.updatePassword(userForm.userid.get)) The userid depends on the form and could therefore change. In any case, you would access the userid of the form using userForm("userid") and not userForm.userid (although it might not be what you want/need). A...

Eclipse will not debug play project

eclipse,playframework,typesafe-activator

The accepted answer to this possibly duplicate question should bridge any gaps in your understanding of how to configure JPDA to debug your Play Application.

Play Framework. Accepting JSON and Form Submit on same action

scala,playframework,typesafe-activator

Short answer: set the Content-Type header on the client side, use the default body parser on the server side, and it'll all work just like magic! :) Replace Action(parse.urlFormEncoded) with simply Action which'll then use the default parser. Long answer: The default parser will automatically use the correct parser based...

Activator fails creating new project with java.lang.RuntimeException

playframework,typesafe-activator,activator,typesafe

It might be one of the silly things one forgets: Maybe Play/Activator doesn't have write access to the path /home/nschejtman/projects/play-scala in your file system?

How to deploy a Scala Play framework API using the SBT native packager

scala,playframework-2.0,web-deployment,typesafe-activator,sbt-native-packager

Play applications run using their own light weight http server. To build a standalone project issue sbt dist or if your using activator activator dist This makes a directory target/universal/your-app.zip If you unzip the contents you will find a standalone application structure /bin /lib /conf /share under which you can...

Play Framework 2.3 - Does not detect changes

playframework,playframework-2.3,typesafe-activator

Got it to work using this answer to an issue submitted on Github The simplest workaround is to use polling instead, by adding the following to your build: PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.sbt(pollInterval.value) Note that I would not use this in combination with ~run, because it will mean that Play and sbt...

Using Specs2 in a Typesafe activator play application

scala,specs2,typesafe-activator

Wait .. I think I resolved it. The activator play platform already has specs2 included so there is no need for me to tweak the built.sbt file for specs 2. So I removed everything I had added to build.sbt file and left the file as name := """Shop""" version :=...

Scala + Play + Intellij IDEA Issue

scala,intellij-idea,playframework-2.0,typesafe-activator,typesafe-stack

My problem is resolbved. As Sarvesh Kumar Singh mentioned I have created activator project and open that project in In Intellij IDEA and used options Auto import and download sources. Above option resolved my problem. ...

What's the purpose of the files created at activator auto-update?

playframework,playframework-2.0,typesafe-activator

While updating itself, activator copies the jars to ~/.ivy2/cache (under com.typesafe.activator, org.scala-sbt amongst the others) and ~/.sbt/boot/scala-2.11.1 (since the 1.2.12 version uses it). Getting Scala 2.11.1 (for activator-launcher)... :: retrieving :: org.scala-sbt#boot-scala confs: [default] 6 artifacts copied, 0 already retrieved (24060kB/96ms) I remember the files under project, but can't reproduce...

“dist” command gets “not a valid command” error

scala,playframework,playframework-2.0,cloudbees,typesafe-activator

I think you have misconfigured something in your project. To double check, generate a new project from Activator or try downloading https://github.com/CloudBees-community/play2-clickstart (which is correctly configured) and run play dist....

Mac OS X Activator New Play Framework Error

java,osx,scala,playframework,typesafe-activator

The latest Play framework starting at version 2.4.0 requires Java 1.8. Upgrade to resolve. PlayFramework ChangeLog...

scala play keeps throwing InvocationTargetException

scala,exception,sbt,typesafe-activator

Looks like you added to lib/ either: another, binary-incompatible version of scala-library or a jar built for an incompatible version of Scala, for instance your project is configured for Scala 2.11.6, and you've added a jar built for Scala 2.10 I would recommend you use managed dependencies instead of using...

Compile single scala file with TypeSafe Activator

scala,typesafe-activator

You go into the directory containing your scala file and type "sbt compile" on the command line. To run the program, you type "sbt run" see also http://www.scala-sbt.org/0.13/tutorial/Hello.html...

How to get project name using activator (or sbt)?

bash,scala,playframework,sbt,typesafe-activator

A project name is concatenation of two keys name and version separated with a dash. Whit a little bit of parsing you can get a value of any key using the SBT show <key> command. I'm not really familiar with writing bash scripts but I hope this hint can give...

How do I automatically compile Coffeescript using Typesafe?

scala,playframework,coffeescript,typesafe-activator

I think the root cause might be related to the activator UI running Play in prod mode vs develop mode. This question is similar: How to run play project in dev mode with Typesafe Activator UI According to Play CoffeeScript Page CoffeeScript sources are compiled automatically during an assets command,...

What files to check into source control for sbt/activator project?

sbt,typesafe-activator

IMO, you should check in only those files which are absolutely necessary to build a project. Build.sbt - necessary. You can't build the project without it. project - project contains plugins and Build.scala files which are necessary. Check those in. It usualy contains the target folder which should not be...

Is it possible to configure activator to reload the build.sbt when changed?

sbt,playframework-2.3,typesafe-activator

Short answer is no... activator ui mode kind of does this, but it has to stop the play http server as it reboots sbt, so it isn't just a browser reload, it's change build.sbt, wait a bit for restart, and then browser reload. In command line mode like activator run,...

Why does “sbt run” fail with OutOfMemoryError while “activator run” works fine?

playframework-2.0,sbt,typesafe-activator

Fundamentally, there's no difference. Activator essentially just invokes sbt. It does a little bit more though, it includes some sbt plugins that provide the ui and the ability to create a new project from templates. It also invokes sbt with some more sensible default JVM settings than most vanilla sbt...

Setting up play framework and dart for development and debug

eclipse,playframework-2.0,dart,dart-pub,typesafe-activator

I guess the best way is to use a proxy with rules to forward requests for Dart resources to pub serve and play resources to activator. This would be simple to build in Dart for example using shelf, shelf_route and shelf_proxy or nginx with a few forwarding rules.

How to get javadoc when using sbt and Eclipse?

eclipse,scala,sbt,scala-ide,typesafe-activator

Run this: sbt "eclipse with-source=true" It will download the javadocs and tell eclipse where to find them. Alternatively, you can add the following to your sbt config file: EclipseKeys.withSource := true ...

How to define/install Scala facet in IntelliJ IDEA 14.0.x?

scala,intellij-idea,sbt,typesafe-activator

tl;dr There's no Scala facet in IntelliJ IDEA 14. As @PermaFrost correctly pointed out in the comment, IntelliJ IDEA 14 has introduced "Rethinking the project configuration model", i.e.: Another change is that we’ve finally decided to get rid of the Scala facet and replace it with so called Scala SDK...

How can I pass arguments to a custom sbt task from the command line?

sbt,typesafe-activator

You need to quote it, ie: $ sbt 'myTask arg1' Otherwise it will interpret it as two commands, such as if you were trying to run sbt clean compile...

How to trace all HTTP request invoked by Playframework?

scala,playframework,logback,typesafe-activator,securesocial

Maybe write this in conf file could solves this issue.. logger.play=TRACE logger.application=TRACE ...

Why does executing activator give ExceptionInInitializerError caused by: java.security.NoSuchAlgorithmException: SHA1 MessageDigest not available?

windows,scala,cygwin,typesafe-activator

I had similar error one day and in my case I had to unpack some Java *.pack files by hand. $ find . -type f -name '*.pack' ./jre/lib/charsets.pack ./jre/lib/deploy.pack ./jre/lib/ext/jfxrt.pack ./jre/lib/ext/localedata.pack ./jre/lib/javaws.pack ./jre/lib/jsse.pack ./jre/lib/plugin.pack ./jre/lib/rt.pack ./lib/tools.pack Each file had to be unpacked like unpack200.exe jsse.pack jsse.jar and then problem with...

Why does activator hang when loading existing project in UI mode?

sbt,typesafe-activator,typesafe

activator shell command should work anytime sbt does but activator ui (UI mode) has limitations that will keep it from working with many projects for now. See Typesafe Activator - An Update and Roadmap Preview for the long story....

activator dist: Not include managed resources (only their processed result)

playframework,playframework-2.0,typesafe-activator

Have a look at Sbt-filter. It's a plugin to filter which files are included in your dist and which one are not. You can add the filters to your build.sbt. you have to enable the filter plugin by adding it to your pipeline stages: lazy val root = (project in...

How to configure Typesafe Activator not to use user home?

sbt,typesafe-activator

From Command Line Options in the official documentation of sbt: sbt.global.base - The directory containing global settings and plugins (default: ~/.sbt/0.13) sbt.ivy.home - The directory containing the local Ivy repository and artifact cache (default: ~/.ivy2) It appears that ~/.activator is set and used in the startup scripts and that's where...

Suddenly unresolved dependency echo-trace-play echo-sigar-libs

java,playframework-2.0,sbt,typesafe-activator,typesafe

Solved. I had to do a git checkout on the "project/play-fork-run.sbt" file on so it could return the line below to 2.3.8 version: addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.3.9") After that I reseted the "activator ui" command. It ran the whole upgrade to 2.3.9 again and now it worked. Probably some...

Play framwork Host repo.typesafe.com not found

sbt,playframework-2.3,typesafe-activator

It automatically checks the internet for SNAPSHOT dependencies. If you don't want it to do it, add : offline := true to your build.sbt file....

Play template project requires subscription to typesafe, why?

playframework,typesafe-activator

Don't use the templates with the reactive-platform-$version suffix. So instead of play-java-intro-reactive-platform-15v01, just use the play-java-intro template....

Why does sbt fail with UNRESOLVED DEPENDENCIES for play-geojson?

playframework-2.0,sbt,typesafe-activator

It appears as though the README hasn't been updated since the latest release. 1.0.0 was built for only Scala 2.10 and not 2.11. But 1.1.0 has been cross-built for Scala 2.10 and 2.11. Just bump the version to 1.1.0: "com.typesafe.play.extras" %% "play-geojson" % "1.1.0" (Or maybe use Scala 2.10 if...

UnsupportedClassVersionError on running play application with JDK 1.7

java,playframework,typesafe-activator

52 = Java 8, 51 = Java 7.. On com.typesafe.config.ConfigException; so you have a too new library.

Operation Not Permitted in SBT / Typesafe Activator inside Vagrant Synced Folder

playframework-2.0,sbt,vagrant,typesafe-activator

Yes, when your're using synced folders, the folder mounted inside the guest inherits the limitations of the hosts' underlying filesystem. For one, it may not be possible to create symlinks. Another common reason for such an error is that Windows filesystems do not allow concurrent access to a file by...

Typesafe Activator: “run” works, but “start” fails with an error

java,scala,playframework-2.0,sbt,typesafe-activator

public void Login(String usrnm, String psswrd){ username = usrnm; password = psswrd; } This is not a constructor. Remove void keyword. Keep in mind, not having a default constructor for a form will result in runtime exceptions....

How to change Play Framework 2 “test” settings to show complete stacktraces?

java,testing,playframework,playframework-2.0,typesafe-activator

In Play 2.3.2 this can be acheieved using the -a option in build.sbt: testOptions += Tests.Argument(TestFrameworks.JUnit, "-a") I use: testOptions += Tests.Argument(TestFrameworks.JUnit, "-v", "-q", "-a") as this provides test started/finished messages (-v) and suppresses logging for passed tests (-q). All of the available options can be found in the SBT...

Compilation Error Migration Play 2.1.1 to 2.2

playframework,akka,typesafe-activator

Akka version changed in Play 2.2 so you have to make some adjustments. I don't have your java code, so I'm going to use my code to help you (I'm currently doing a migration as well). If my anwser doesn't resolve your issue, please add your java code. For both...