typesafe activator dependency error - scala

I just download the last activator version (version 1.2.12 - offline distribution) and I have found some errors in dependency when I follow the documentation in order to create a new scala project (https://www.playframework.com/documentation/2.3.x/NewApplication).
How can I get the unresolved dependency?
Can I install like mvn:install the missing dependency?
[info] Updating {file:/home/myhome/workspaceScala/play-scala/project/}play-scala-build...
[info] Resolving com.typesafe.play#routes-compiler_2.10;2.3.8 ...
[error] Server access Error: Connection timed out url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/routes-compiler_2.10/2.3.8/ivys/ivy.xml
[error] Server access Error: Connection timed out url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/routes-compiler_2.10/2.3.8/jars/routes-compiler_2.10.jar
[info] Resolving commons-io#commons-io;2.0.1 ...
[error] Server access Error: Connection timed out url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/commons-io/commons-io/2.0.1/ivys/ivy.xml
[info] Resolving com.typesafe.play#sbt-run-support_2.10;2.3.8 ...
[error] Server access Error: Connection timed out url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[error] Server access Error: Connection timed out url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/jars/sbt-run-support_2.10.jar

Thank you singhakash and Sarvesh, it is a network problem.
I think the best solution is to set environment variable ACTIVATOR_OPTS.
I add this line to my .bashrc file (~/.bashrc):
export ACTIVATOR_OPTS="-Dhttp.proxyUser=MyProxyAccount -Dhttp.proxyPassword=MyProxyPwd -Dhttp.proxyHost=MyProxyIp -Dhttp.proxyPort=MyProxyPort"
Thanks a lot

Related

Keycloak 6.0.1 - Getting Started - securing servlet app fails to load

Running new Keycloak 6.0.1 install. Following "Getting Started" - using keycloak-quickstarts/app-profile-jee-vanilla application. Wildfly version is 16.0.0.Final. Why am I unable to load the vanilla.war file?
This is the error after running: mvn clean wildfly:deploy
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) on project keycloak-app-profile-jee-vanilla: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"vanilla.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory.
[ERROR] Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory.
[ERROR] Caused by: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory."}}}}
This question may be a possible duplicate of: How To Resolve "The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory"
However, I'm assuming you're following the following documentation: Getting Started Guide - Keycloak.
If that's the case, following the Github README for the quickstart is much better. Here's the link: keycloak-quickstarts
The README is more tailored for this quickstart project. Also, the documentation on the official page for this particular quickstart project isn't well ordered and might easily throw you off the bench.

Getting OutOfMemoryException :Permgern space issue in jenkins

I am getting OutOfMemoryExeption:Permgern space issue when building a Maven project in Jenkins.
At the end of the building process message is showing as "Build Success" .But after that line below error msg is printing.
Fatal Error : Permgern space
Once this exception comes ,every time whole Jenkins is getting hanged i.e no
corresponding page of Jenkins even if dash board is not opening.
Below is the Command Line argument error for Jenkins.
Java HotSpot(TM) 64-bit Server VM Warning : Exception java.lang.OutOfMemoryError
occured dispatching signal unknown to handler - The VM may need to forcibly terminated.
Below is the error details from the console O/P of job-
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building EmployeeInformation 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
**[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.161 s
[INFO] Finished at: 2016-09-11T00:55:52+05:30
[INFO] Final Memory: 5M/76M**
[INFO] ------------------------------------------------------------------------
Parsing POMs
Established TCP socket on 49708
[Employee_Management] $ "C:\Program Files\Java\jdk1.7.0_03/bin/java" -cp "C:\Users\pc\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\Program Files\Apache\maven\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;C:\Program Files\Apache\maven\apache-maven-3.3.9/conf/logging" jenkins.maven3.agent.Maven32Main "C:\Program Files\Apache\maven\apache-maven-3.3.9" C:\Users\pc\.jenkins\war\WEB-INF\lib\remoting-2.62.jar C:\Users\pc\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\Users\pc\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-**commons-1.7.jar 49708
FATAL: PermGen space
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
FATAL: PermGen space**
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:144)
at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74)
Caused by: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
at hudson.remoting.Launcher.main(Launcher.java:530)
at hudson.remoting.Launcher.main(Launcher.java:513)
at hudson.remoting.Launcher.main(Launcher.java:504)
at hudson.remoting.Launcher.main(Launcher.java:500)
... 6 more
Below are some of the possible steps I tried to solve-
(1)In POM.XML below tag added.
attached image link for Changed permgern space configuration in POM.xml
(2)Set JAVA_OPTS in enviroment variable.
attached image link for setting enviromental variables
But,unfortunately none of them working.Still issue is there.
After searching some where,I got to know
-XX:PermSize=256m -XX:MaxPermSize=512m declaration will resolve the issue.But I am not sure Where and How to give the above declaration.
Guys,Plz go through the above links I attached and let me know If any thing I did wrong.
Any help will be appreciated.
BR//
Abinash
Add your options to the _JAVA_OPTIONS environment variable -- this will work for sure.
Otherwise, for customizing the compiler options in your Maven build environment, there's several possibilities. See this question for an overview.

Scala Play Framework: Header doesn't exists

I am trying to run play application and it runs correctly. However, while serving to few APIs, I get following error:
[error] play - Cannot invoke the action, eventually got an error: java.lang.RuntimeException: Header doesn't exist
[error] application -
! #714mk098l - Internal server error, for (POST) [/ivi/customer/login/] ->
play.api.Application$$anon$1: Execution exception[[RuntimeException: Header doesn't exist]]
at play.api.Application$class.handleError(Application.scala:296) ~[play_2.10-2.3.9.jar:2.3.9]
at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.10-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.9.jar:2.3.9]
at scala.Option.map(Option.scala:145) [scala-library-2.10.5.jar:na]
Caused by: java.lang.RuntimeException: Header doesn't exist
at scala.sys.package$.error(package.scala:27) ~[scala-library-2.10.5.jar:na]
at play.api.mvc.Headers$$anonfun$apply$10.apply(Http.scala:338) ~[play_2.10-2.3.9.jar:2.3.9]
at play.api.mvc.Headers$$anonfun$apply$10.apply(Http.scala:338) ~[play_2.10-2.3.9.jar:2.3.9]
at scala.Option.getOrElse(Option.scala:120) [scala-library-2.10.5.jar:na]
at play.api.mvc.Headers$class.apply(Http.scala:338) ~[play_2.10-2.3.9.jar:2.3.9]
I feel like this should related to configuration rather than code issue. Can someone please guide here?

typesafe activator ui not launching

play.api.Application$$anon$1: Execution exception[[IllegalArgumentException: req
uirement failed: Source file 'C:\Users\shriv_000\.activator\1.3.6\templates\inde
x.db_e25b80033130c08.tmp' is a directory.]]
at play.api.Application$class.handleError(Application.scala:296) ~[play_
2.11-2.3.9.jar:2.3.9]
at play.api.DefaultApplication.handleError(Application.scala:402) [play_
2.11-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfu
n$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:205) [play_2.11-2.3.9.jar
:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfu
n$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:202) [play_2.11-2.3.9.jar
:2.3.9]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.s
cala:36) [scala-library.jar:0.13.8]
Caused by: java.lang.IllegalArgumentException: requirement failed: Source file '
C:\Users\shriv_000\.activator\1.3.6\templates\index.db_e25b80033130c08.tmp' is a
directory.
at scala.Predef$.require(Predef.scala:219) ~[scala-library.jar:0.13.8]
at sbt.IO$.copyFile(IO.scala:584) ~[client-all-2-11-0.3.5.jar:0.3.5]
at sbt.IO$.move(IO.scala:786) ~[client-all-2-11-0.3.5.jar:0.3.5]
at activator.package$RichIO$.createViaTemporary$extension(package.scala:
30) ~[activator-templates-cache-1.0-a0afb008ea619bf9d87dc010156cddffa8a6f880.jar
:1.3.6]
at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$r
esolveIndexTo$1.apply(UriRemoteTemplateRepository.scala:228) ~[activator-templat
es-cache-1.0-a0afb008ea619bf9d87dc010156cddffa8a6f880.jar:1.0-a0afb008ea619bf9d8
7dc010156cddffa8a6f880]
[info] application - onStop received closing down the app
I am at activator 1.3.6
I have seen TypeSafe Activator installation error and it might be different then my problem. I have been able to create and launch a play project.
The solution provided there did not work for me.
I see this problem frequently.
I found a workaround. Try to execute activator as an administrator.

Problem install lift framework on Fedora

I'm trying to start the lift_basic project from the latest version of lift (2.4-M1).
I'm following the docs - untarred the tarball, then changed into scala_29/lift_basic and ran ./sbt update but it fails with:
Getting Scala 2.7.7 ...
:: retrieving :: org.scala-tools.sbt#boot-scala
confs: [default]
2 artifacts copied, 0 already retrieved (9911kB/112ms)
Getting org.scala-tools.sbt sbt_2.7.7 0.7.5 ...
:: retrieving :: org.scala-tools.sbt#boot-app
confs: [default]
16 artifacts copied, 0 already retrieved (4271kB/107ms)
[info] Recompiling project definition...
[info] Source analysis: 1 new/modified, 0 indirectly invalidated, 0 removed.
sbt.UndefinedValue: Value for property '<unnamed>' from /var/www/html/projects/lift/lift-lift_24_sbt-14a1743/scala_29/lift_basic/project/build.properties is undefined.
at sbt.BasicEnvironment$UserProperty.sbt$BasicEnvironment$UserProperty$$inheritedValue(Environment.scala:155)
at sbt.BasicEnvironment$UserProperty$$anonfun$resolveDefaultFirst$1.apply(Environment.scala:135)
at sbt.BasicEnvironment$UserProperty$$anonfun$resolveDefaultFirst$1.apply(Environment.scala:135)
at sbt.BasicEnvironment$UserProperty.sbt$BasicEnvironment$UserProperty$$getDefault(Environment.scala:143)
at sbt.BasicEnvironment$UserProperty.resolveDefaultFirst(Environment.scala:135)
at sbt.BasicEnvironment$UserProperty.resolve(Environment.scala:120)
at sbt.Environment$Property.value(Environment.scala:16)
at LiftProject.<init>(LiftProject.scala:4)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at sbt.Project$.constructProject(Project.scala:391)
at sbt.Project$$anonfun$9.apply(Project.scala:365)
at sbt.Project$$anonfun$9.apply(Project.scala:364)
at scala.Either$RightProjection.map(Either.scala:239)
at sbt.Project$.loadProject(Project.scala:364)
at sbt.Project$.loadProject(Project.scala:355)
at sbt.Project$.loadProject(Project.scala:343)
at sbt.Project$.loadProject(Project.scala:340)
at sbt.xMain.run(Main.scala:47)
at sbt.xMain.run0$1(Main.scala:35)
at sbt.xMain.run(Main.scala:42)
at xsbt.boot.Launch$.run(Launch.scala:53)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error loading project: sbt.UndefinedValue: Value for property '<unnamed>' from /var/www/html/projects/lift/lift-lift_24_sbt-14a1743/scala_29/lift_basic/project/build.properties is undefined.
Does anyone know where I'm going wrong?
Thanks
I just tried this out myself (on Ubuntu 10.04) and I'm getting the exact same error. It's attempting to get a build configuration property and for some reason failing. I don't know enough about the SBT internals to offer a full solution, but I can show you how to get around it for now.
Simply open up the project/build/LiftProject.scala and on line 4, change
val liftVersion = property[Version].value.toString
to
val liftVersion = "2.4-M3" //use the value in project/build.properties for lift.version
After I did this, SBT was able to update and the example project compiled and ran without error.