Today I got an update on Scala from 1.3.x to 1.4 After that, Intellij stopped launching my play projects.
First when I would try to run activator from the command line, it gave me the following error
Error: Unable to access jarfile <path to project>\activator-launch-1.2.8.jar
So I replaced all the activator files from within the project. Then it started to run from the teriminal/console but when I hit Run/Debug on the my Play configuration in Intellij it simply makes the project and then nothing happens. It doesn't launch in the browser. There are no errors in the event log; just compilation successful message.
I'm using the exact same project from yesterday with no changes apart from installing the new scala plugin.
I tried reverting back to 1.3 on scala, but it keeps saying that version is not compatible with the new Intellij.
I am using a Win 8 machine 64 bit.
Temporary Solution:
As a quick fix for now, I installed an older version of the plugin from here - https://confluence.jetbrains.com/display/SCA/Scala+plugin+EAP
I installed Scala plugin 1.4 RC (1.3.110.35.EAP) and it worked.
Just make sure you do not select to auto-update your plugins or when you restart it will ask you to update the scala plugin, do not click that.
It's running for now but it would be good to have a fix for this soon.
IntelliJ Tickets
https://youtrack.jetbrains.com/issue/SCL-8484
https://youtrack.jetbrains.com/issue/SCL-8512
I just installed v1.4.15 and it launches the Play application as expected.
Thank you!
Related
We are instructed to do the following (while using Eclipse)
And if you make a left click on your project you get the option “Debug
as…”. Hit that and generate a profile that debugs the goal jetty:run.
https://www.ninjaframework.org/documentation/debugging.html
However, when we do the jetty:run, we simply build the project, and the project does not start.
Furthermore, when we run with ninja:run, the debug does not stop at breakpoints.
What I need is a debug-mode that stops at breakpoints.
How do we fix this ?
The answer is in the Ninja Framework source code, and the new versions of a Jetty... and therefore, there is (probably) no answer without recompiling the whole framework to fix the issue. I have tried diff-ing the projects, but could not see anything that would fix the higher versions. Up until the version 6.4.0 (inclusive) running the command mvn jetty:run starts the server. Any other version that is higher than 6.4.0 just builds the project and then stops.
So, one of the solutions is to simply start a new project using the old-version code executing:
mvn archetype:generate -DarchetypeGroupId=org.ninjaframework -DarchetypeArtifactId=ninja-servlet-archetype-simple -DarchetypeVersion=6.4.0
Another solution is to deploy (Jetty or Tomcat server) and try to debug the deployed jar/war file.
The first solution is simpler, however, the second one is more proper.
At the time of writing, the latest version is
<ninja.version>6.6.1</ninja.version>
<jetty.version>9.4.18.v20190429</jetty.version>
I'm running my head into the ground trying to create a new "hello-world" level blank Play 2.6 project. I have successfully opened and run one of their example starter projects from the Play site in IntelliJ, and it works without issue.
However when creating my own I follow all the steps:
New project -> Play 2.x -> Setup as pictured:
And about 10 seconds later, this is all I get:
From my understanding, the whole structure should be available and displaying to me.
I don't know if it matters, but my Scala version is 2.12.1 and my IntelliJ version is the full version 2017.1 . I checked and the Playframework Support plugin is enabled, and so is Scala.
I'm also open to creating a "blank" one in SBT and then importing it into Scala, but unsure of how to do that either.
Thanks for the help.
Refresh your IDE, the latest Intellij IDEA version (2017.2) with up to date plugins creates a new Play 2.x project without a problem.
I recently installed IntelliJ on Ubuntu 16.04, but I'm getting this error while trying to start a Scala project:
This is my first linux computer, and I installed the oracle 8 jdk through the package manager, not sure if it's something wrong with this configuration or something else. Am I missing some java variables? When I installed intellij before on Windows the scala package came with basically everything I needed, and I used the jdk windows installer.
I think your Intellij is missing the Scala SDK. Usually it would be picked during first time setup.
Open "Open Module Settings" of your project (by right-click), go to libraries, add an Scala SDK.
Hope it should fix your problem.
I installed IDEA version 15 with the Scala plugin, but Play projects are enabled only in the Ultimate edition. I'm new to Scala and Play, any issues if I run Play outside of IDEA? Would Play "hot deploy" any changes I make in scala source code?
Just open it as an SBT project and it's fine.
This is how it works: (1) create a project using play/activator, (2) open IntelliJ and import as SBT project (accept all defaults), (3) run the project in a command line (externally to IntelliJ), (4) edit project source files in IntelliJ - when you update a file, it is automatically compiled (you can see that refreshing the url localhost:9000)
Play works great outside of IntelliJ. I have developed play applications using Sublime Text and Atom. You'll get the errors in the console, or in the web application itself.
There's also a NetBeans plugin now (http://nbpleasureplugin.com), and the official ScalaIDE should also support it (although I've never tried using it).
I have a maven plugin that transforms class bits after compilation. This plugin works precisely as designed when run from the command line. However, the problem arises in Eclipse (3.6.1) when the Maven project is building from a clean state. What happens is that I get an error message in the console informing me that my plugin has failed due to the inability to find a class that is in fact on the classpath.
As I mentioned, this plugin works perfectly well when I build from the command line, so this is a rather annoying problem that seems a bit difficult to track down.
Has anyone else ran into this problem before, and if so, is there a solution that I'm missing?
Thanks.
I can confirm that the maven eclipse plugin sometimes works different than the "console version". You can try to change the "Preferences->Maven->Installations" to your external maven installation (that what you use when running from command line). The eclipse plugin embedded version is a 3.0-SNAPSHOT (in my installation) and maybe not stable in all points.
The issue turned out to be a difference between Maven 2.x and Maven 3.x. The m2eclipse was using a version of Maven 3.x - can't remember which - and I was running a previous version. Apparently, somewhere in the version range, the plugin mojo now requires #requiresDependencyResolution . Thus, when running in m2eclipse, my plugin was not getting any of the dependencies in the project, and thus the class path was completely boned...
word...