Not a valid command: playGenerateSecret - macos

I would like to create an Application secret. I have already installed sbt and brew.
These are the things I have tried:
sbt play-generate-secret
sbt play-update-secret
sbt playGenerateSecret
sbt
playGenerateSecret
However, every time, I get this message:
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by sbt.TrapExit$ (file:/Users/b/.sbt/boot/scala-2.12.14/org.scala-sbt/sbt/1.5.8/run_2.12-1.5.8.jar)
WARNING: Please consider reporting this to the maintainers of sbt.TrapExit$
WARNING: System::setSecurityManager will be removed in a future release
[info] welcome to sbt 1.5.8 (Homebrew Java 17.0.1)
[info] loading project definition from /Users/b/project
[info] set current project to b (in build file:/Users/b/)
[error] Not a valid command: playGenerateSecret
[error] Not a valid project ID: playGenerateSecret
[error] Expected ':'
[error] Not a valid key: playGenerateSecret (similar: autoGeneratedProject)
[error] playGenerateSecret
[error]
How can I fix this?

Following is what works for me.
Method 1:
cd <project_root_dir>
sbt palyGenerateSecret
Method 2:
cd <project_root_dir>
sbt
this drops into sbt project console. You will see your project name in [].
playGenerateSecret

Related

Could not find artifact org.apache.pulsar:pulsar-broker:pom:2.12.0-SNAPSHOT in apache.snapshots (https://repository.apache.org/snapshots)

While following the instructions to setup IntelliJ for pulsar development I got the below error
Could not find artifact org.apache.pulsar:pulsar-broker:pom:2.12.0-SNAPSHOT in apache.snapshots (https://repository.apache.org/snapshots)
Digging deeper into the snapshots, I don't see pulsar-broker at 2.12.0 either: https://repository.apache.org/content/groups/snapshots/org/apache/pulsar/pulsar-broker/
Is there some configuration step missing?
Attempted Fix [RESOLVED]
accepted answers steps and fix an issue with SDKMAN to have mvn call Java 17
I tried the command mvn -Pcore-modules,-main clean install -DskipTests -Dspotbugs.skip=true and got the new error below.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project buildtools: Compilation failure
[ERROR] /Users/brandon.hoffman/Projects/pulsar/buildtools/src/main/java/org/apache/pulsar/tests/RetryAnalyzer.java:[30,18] cannot access org.testng.ITestResult
[ERROR] bad class file: /Users/brandon.hoffman/.m2/repository/org/testng/testng/7.7.0/testng-7.7.0.jar(org/testng/ITestResult.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
Running this on the command line will fix that problem:
mvn -Pcore-modules,-main clean install -DskipTests -Dspotbugs.skip=true
You must use Java 17 for compiling the master branch version of Pulsar (requirements).
It's possible that there has been some change in the maven build after the instructions were originally written.
It does not look like the project is currently using the repository.apache.org for nightly snapshots. You should ask your question on the dev#pulsar.apache.org mailing list.
Also we have not yet cut the 2.12 branch. The VOTE for the first release of 2.11.0 just passed the PMC.
(FYI I am an Apache Pulsar PMC Member)

Error installing dl4j using maven

Sorry but I am very new to using Maven, trying to install dl4j for the provided examples via the following command, as per the instructions on the dl4j website:
mvn clean install -DskipTests -Dmaven.javadoc.skip=true
This proceeds somewhat, but then terminates with an error:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project dl4j-examples: Compilation failure: Compilation failure:
[ERROR] /Users/nick/Downloads/dl4j-examples/dl4j-examples/src/main/java/org/deeplearning4j/examples/unsupervised/variational/plot/PlotUtil.java:[158,13] cannot find symbol
[ERROR] symbol: method setDomainPannable(boolean)
[ERROR] location: variable plot of type org.jfree.chart.plot.XYPlot
[ERROR] /Users/nick/Downloads/dl4j-examples/dl4j-examples/src/main/java/org/deeplearning4j/examples/unsupervised/variational/plot/PlotUtil.java:[159,13] cannot find symbol
[ERROR] symbol: method setRangePannable(boolean)
[ERROR] location: variable plot of type org.jfree.chart.plot.XYPlot
[ERROR] -> [Help 1]
Now I have jfreechart library in a directory searchable by classpath, so, can someone help me resolve the above?
Running mac high sierra, on a 2016 macbook pro.
There is no need to build/install dl4j to run the examples.
Straight from the dl4j quickstart:
git clone https://github.com/deeplearning4j/dl4j-examples.git
cd dl4j-examples/
mvn clean install

Building Zeppelin Fails for versions 7.1, 7,2 and 7.3 on YARN error

I've been trying to build Zeppelin from the source in an effort to try and fix the SSL error.
I tried to build from source, and went back to the basic option of
mvn clean package -DskipTests
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:10 min
[INFO] Finished at: 2017-09-21T21:45:31-05:00
[INFO] Final Memory: 254M/3182M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no-lockfile' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :zeppelin-web
Note: This is the same error that happens with each version and I'm building on a Mac OS X platform. (Not sure if this has anything to do with the problem.)
I'm trying to solve the issue of implementing SSL which has a different problem with the 7.2 binary release.
Also note that currently (9/21/2017) the continuous build of the latest release is also failing. Any suggestions?
Ok, after more digging I found that this was a problem that popped up earlier in the year.
The fix is to make sure that you have git and nodejs installed.
On Mac OS X, I used homebrew to bring down nodejs (Already had git).
On Centos(Linux), I had recently rebuilt the machine for Centos 7.4 and of course didn't download all of the tools. After pulling git and nodejs from yum repos, I was able to rebuild version 7.3
So now Zeppelin builds in both environments.
Note: If you can't use the built binary versions, think of compiling your own version as a last resort.
I only went this route because I tried to set up SSL for Zeppelin and I was getting an error over my PKCS12 keys were causing an error. (Which I still have to fix. ) Something I hope will work in 7.3

MojoExecution exception

I get this error while I compile hadoop source code with maven.
I am using windows 8.1, hadoop 2.7.2 and visual studio 2012.
I followed this link Maven MojoExecutionException but it didnt work.
For installing hadoop I use http://harishshan.blogspot.com/2014/10/install-hadoop-251-on-windows-7-64bit.html.
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.7.2:prot
oc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecut
ionException: 'protoc --version' did not return a version -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :hadoop-common
The exception is not related to Maven. The error message is actually already pointing at the main issue:
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.7.2:protoc \
(compile-protoc) on project hadoop-common: \
org.apache.maven.plugin.MojoExecutionException: \
'protoc --version' did not return a version -> [Help 1]
The protoc goal of the org.apache.hadoop:hadoop-maven-plugins Maven Plugin is checking whether the protoc command is available in the PATH, checking the simplest common command: the version command:
protoc --version
Looking at the tutorial you linked you most probably missed Step 4:
Step 4: Install Protocol buffer 2.5.0
Or you probably didn't configure it properly, not making it available via the command PATH.
Update
The tutorial indeed doesn't provide much information about from where and how to install Protocol Buffer.
The version described by the tutorial is 2.5.0, available here. You can download the Windows zip here. Then simply unzip it and add its path to the Windows PATH: before checking whether the Maven build will then recognize it, first check whether the protoc --version would fine or not from any command line.
Also note: comments to the tutorial point to other errors as well, double check them in case you still encounter other errors in the overall process.

Error pushing to Heroku when route is removed from Play Framework

In my commit I:
Removed the controller class: com.fractalemagic.Crashes
Removed the relevant lines from conf/routes
Heroku build log:
-----> Play 2.x - Java app detected
-----> Installing OpenJDK 1.8...done
-----> Running: sbt compile stage
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Getting org.scala-sbt sbt 0.13.5 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
44 artifacts copied, 0 already retrieved (13482kB/434ms)
Getting Scala 2.10.4 (for sbt)...
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24459kB/193ms)
[info] Loading project definition from /tmp/scala_buildpack_build_dir/project
[info] Set current project to SomethingMagical (in build file:/tmp/scala_buildpack_build_dir/)
[info] Compiling 6 Scala sources and 25 Java sources to /tmp/scala_buildpack_build_dir/target/scala-2.11/classes...
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:8: error: cannot find symbol
[error] public static final com.fractalemagic.ReverseCrashes Crashes = new com.fractalemagic.ReverseCrashes();
[error] ^
[error] symbol: class ReverseCrashes
[error] location: package com.fractalemagic
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:11: error: package com.fractalemagic.javascript does not exist
[error] public static final com.fractalemagic.javascript.ReverseCrashes Crashes = new com.fractalemagic.javascript.ReverseCrashes();
[error] ^
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:16: error: package com.fractalemagic.ref does not exist
[error] public static final com.fractalemagic.ref.ReverseCrashes Crashes = new com.fractalemagic.ref.ReverseCrashes();
[error] ^
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:8: error: cannot find symbol
[error] public static final com.fractalemagic.ReverseCrashes Crashes = new com.fractalemagic.ReverseCrashes();
[error] ^
[error] symbol: class ReverseCrashes
[error] location: package com.fractalemagic
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:11: error: package com.fractalemagic.javascript does not exist
[error] public static final com.fractalemagic.javascript.ReverseCrashes Crashes = new com.fractalemagic.javascript.ReverseCrashes();
[error] ^
[error] /tmp/scala_buildpack_build_dir/target/scala-2.11/src_managed/main/com/fractalemagic/routes.java:16: error: package com.fractalemagic.ref does not exist
[error] public static final com.fractalemagic.ref.ReverseCrashes Crashes = new com.fractalemagic.ref.ReverseCrashes();
[error] ^
[error] Note: Some input files use or override a deprecated API.
[error] Note: Recompile with -Xlint:deprecation for details.
[error] Note: /tmp/scala_buildpack_build_dir/app/Global.java uses unchecked or unsafe operations.
[error] Note: Recompile with -Xlint:unchecked for details.
[error] 6 errors
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 22 s, completed Aug 2, 2014 8:46:52 PM
! Failed to build app with sbt
! Push rejected, failed to compile Play 2.x - Java app
I did get the same error while trying to run the project locally with Activator but after I ran activator clean it worked fine.
I noticed in the build logs that Heroku only compiles the code:
-----> Running: sbt compile stage
When according to: https://devcenter.heroku.com/articles/play-support#activation
It should also clean.
After reversing the commit I was able to push to Heroku successfully.
The docs you've linked seem a bit outdated. You need to specifically tell heroku to do a clean compile, by setting the environment variable SBT_CLEAN=true
If you're using the heroku toolbelt:
heroku config:set SBT_CLEAN=true -a your-app-name
Heroku Build Behavior
For me, I solve the problem by deleting all content under target and then re-compile.

Resources