Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build TheHive from sources on Windows #602

Open
JamesCullum opened this issue Jun 7, 2018 · 27 comments
Open

Unable to build TheHive from sources on Windows #602

JamesCullum opened this issue Jun 7, 2018 · 27 comments
Assignees

Comments

@JamesCullum
Copy link

JamesCullum commented Jun 7, 2018

Request Type

Bug

Work Environment

Question Answer
OS version (server) Win 10, x64 (supposed to be local dev environment)
OS version (client) Win 10, x64
TheHive version / git hash 82f3dbe
Package Type From source

Problem Description

I would like to set up a local dev environment to add features. I am inside a corporate environment and have the necessary proxy variables set. I followed the instructions to build it from source, but only get an error during compilation, preventing me from proceeding: java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main

I tried to fix it myself but was unable to get any information about this call. I didn't find any place that refers to this file or folder. I was unable to find the command that gets called at this point.

I was already able to get around a few errors on the way and will create a PR to fix those, once I've got everything set up.

Steps to Reproduce

  1. cd C:
  2. git clone https://github.com/TheHive-Project/TheHive.git
  3. cd TheHive
  4. (Prevent error by creating file in conf/sbtconfig.txt with content -Dsbt.io.jdktimestamps=true)
  5. (Prevent error by adding ".cmd" to npm, bower and grunt process calls in project/FrontEnd.scala)
  6. bin\activator.bat clean stage

Complementary information

C:\TheHive2>bin\activator.bat clean stage
ACTIVATOR_HOME=C:\TheHive2
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from C:\TheHive2\project
[info] Compiling 4 Scala sources to C:\TheHive2\project\target\scala-2.12\sbt-1.0\classes ...
[info] Done compiling.
[info] Loading settings from build.sbt,version.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[warn] Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
[info] Set current project to TheHive (in build file:/C:/TheHive2/)
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[success] Total time: 2 s, completed 07.06.2018 15:59:17
[info] Preparing front-end for prod ...
[info] npm install
[info] Scalariform auto formatting enabled
[info] Scalariform auto formatting enabled
[info] Scalariform auto formatting enabled
[info] Applying Scalariform preferences found in C:\TheHive2\.\.scalariform.conf
[info] Applying Scalariform preferences found in C:\TheHive2\.\.scalariform.conf
[info] Applying Scalariform preferences found in C:\TheHive2\.\.scalariform.conf
[info] Scalariform auto formatting enabled
[info] Applying Scalariform preferences found in C:\TheHive2\.\.scalariform.conf
[info] Formatting 11 Scala sources ProjectRef(uri("file:/C:/TheHive2/"), "thehiveCortex")(compile) ...
[info] Formatting 4 Scala sources ProjectRef(uri("file:/C:/TheHive2/"), "thehiveMetrics")(compile) ...
[info] Formatting 11 Scala sources ProjectRef(uri("file:/C:/TheHive2/"), "thehiveMisp")(compile) ...
[info] Formatting 53 Scala sources ProjectRef(uri("file:/C:/TheHive2/"), "thehiveBackend")(compile) ...
[info] Scalariform auto formatting enabled
[info] Applying Scalariform preferences found in C:\TheHive2\.\.scalariform.conf
[info] Packaging C:\TheHive2\thehive-metrics\target\scala-2.12\thehivemetrics_2.12-3.0.10-sources.jar ...
[info] Packaging C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10-sources.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Packaging C:\TheHive2\target\scala-2.12\thehive_2.12-3.0.10-sources.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-misp\target\scala-2.12\thehivemisp_2.12-3.0.10-sources.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-cortex\target\scala-2.12\thehivecortex_2.12-3.0.10-sources.jar ...
[info] Done packaging.
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[info] Updating thehiveBackend...
[info] Done updating.
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.code.findbugs:jsr305:3.0.1 is selected over 1.3.9
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 3.0.1)
[warn]      +- com.google.guava:guava:22.0                        (depends on 1.3.9)
[warn]  * com.google.guava:guava:22.0 is selected over {20.0, 16.0.1, 19.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 19.0)
[warn]      +- org.elasticsearch.plugin:x-pack-api:5.6.2          (depends on 16.0.1)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.6 is selected over {2.5.3, 2.4.19}
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.7          (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]      +- com.typesafe.play:play-ws-standalone_2.12:1.1.3    (depends on 2.5.3)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.6 is selected over {2.4.17, 2.4.19}
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.6 ()        (depends on 2.5.6)
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.6 ()         (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn]      +- com.sksamuel.elastic4s:elastic4s-streams_2.12:5.6.0 (depends on 2.4.17)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Wrote C:\TheHive2\thehive-cortex\target\scala-2.12\thehivecortex_2.12-3.0.10.pom
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[info] Wrote C:\TheHive2\thehive-misp\target\scala-2.12\thehivemisp_2.12-3.0.10.pom
[info] Wrote C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10.pom
[info] Wrote C:\TheHive2\thehive-metrics\target\scala-2.12\thehivemetrics_2.12-3.0.10.pom
[warn] Credentials file C:\Users\JamesCullum\.bintray\.credentials does not exist
[info] Wrote C:\TheHive2\target\scala-2.12\thehive_2.12-3.0.10.pom
[info] Updating thehiveCortex...
[info] Updating thehiveMetrics...
[info] Updating thehiveMisp...
[info] Main Scala API documentation to C:\TheHive2\thehive-backend\target\scala-2.12\api...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.code.findbugs:jsr305:3.0.1 is selected over 1.3.9
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 3.0.1)
[warn]      +- com.google.guava:guava:22.0                        (depends on 1.3.9)
[warn]  * com.google.guava:guava:22.0 is selected over {20.0, 16.0.1, 19.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 19.0)
[warn]      +- org.elasticsearch.plugin:x-pack-api:5.6.2          (depends on 16.0.1)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.6 is selected over {2.5.3, 2.4.19}
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.7          (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]      +- com.typesafe.play:play-ws-standalone_2.12:1.1.3    (depends on 2.5.3)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.6 is selected over {2.4.17, 2.4.19}
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.6 ()        (depends on 2.5.6)
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.6 ()         (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn]      +- com.sksamuel.elastic4s:elastic4s-streams_2.12:5.6.0 (depends on 2.4.17)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 59 Scala sources and 2 Java sources to C:\TheHive2\thehive-backend\target\scala-2.12\classes ...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.code.findbugs:jsr305:3.0.1 is selected over 1.3.9
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 3.0.1)
[warn]      +- com.google.guava:guava:22.0                        (depends on 1.3.9)
[warn]  * com.google.guava:guava:22.0 is selected over {20.0, 16.0.1, 19.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 19.0)
[warn]      +- org.elasticsearch.plugin:x-pack-api:5.6.2          (depends on 16.0.1)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.6 is selected over {2.5.3, 2.4.19}
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.7          (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]      +- com.typesafe.play:play-ws-standalone_2.12:1.1.3    (depends on 2.5.3)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.6 is selected over {2.4.17, 2.4.19}
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.6 ()        (depends on 2.5.6)
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.6 ()         (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn]      +- com.sksamuel.elastic4s:elastic4s-streams_2.12:5.6.0 (depends on 2.4.17)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Packaging C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10-web-assets.jar ...
[info] Done packaging.
model contains 172 documentable templates
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.code.findbugs:jsr305:3.0.1 is selected over 1.3.9
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 3.0.1)
[warn]      +- com.google.guava:guava:22.0                        (depends on 1.3.9)
[warn]  * com.google.guava:guava:22.0 is selected over {20.0, 16.0.1, 19.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 19.0)
[warn]      +- org.elasticsearch.plugin:x-pack-api:5.6.2          (depends on 16.0.1)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.6 is selected over {2.5.3, 2.4.19}
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.7          (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]      +- com.typesafe.play:play-ws-standalone_2.12:1.1.3    (depends on 2.5.3)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.6 is selected over {2.4.17, 2.4.19}
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.6 ()        (depends on 2.5.6)
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.6 ()         (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn]      +- com.sksamuel.elastic4s:elastic4s-streams_2.12:5.6.0 (depends on 2.4.17)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating ...
[info] Main Scala API documentation successful.
[info] Packaging C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10-javadoc.jar ...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.code.findbugs:jsr305:3.0.1 is selected over 1.3.9
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 3.0.1)
[warn]      +- com.google.guava:guava:22.0                        (depends on 1.3.9)
[warn]  * com.google.guava:guava:22.0 is selected over {20.0, 16.0.1, 19.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]      +- net.codingwell:scala-guice_2.12:4.1.0              (depends on 19.0)
[warn]      +- org.elasticsearch.plugin:x-pack-api:5.6.2          (depends on 16.0.1)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.6 is selected over {2.5.3, 2.4.19}
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.7          (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]      +- com.typesafe.play:play-ws-standalone_2.12:1.1.3    (depends on 2.5.3)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.6 is selected over {2.4.17, 2.4.19}
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.6 ()        (depends on 2.5.6)
[warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.6 ()         (depends on 2.5.6)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn]      +- com.sksamuel.elastic4s:elastic4s-streams_2.12:5.6.0 (depends on 2.4.17)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done packaging.
[info] Done compiling.
[info] Compiling 4 Scala sources to C:\TheHive2\thehive-metrics\target\scala-2.12\classes ...
[info] Compiling 11 Scala sources to C:\TheHive2\thehive-cortex\target\scala-2.12\classes ...
[info] Compiling 11 Scala sources to C:\TheHive2\thehive-misp\target\scala-2.12\classes ...
[info] Packaging C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-metrics\target\scala-2.12\thehivemetrics_2.12-3.0.10-web-assets.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-misp\target\scala-2.12\thehivemisp_2.12-3.0.10-web-assets.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-cortex\target\scala-2.12\thehivecortex_2.12-3.0.10-web-assets.jar ...
[info] Done packaging.
[info] Packaging C:\TheHive2\thehive-backend\target\scala-2.12\thehivebackend_2.12-3.0.10-sans-externalized.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging C:\TheHive2\thehive-metrics\target\scala-2.12\thehivemetrics_2.12-3.0.10.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging C:\TheHive2\thehive-cortex\target\scala-2.12\thehivecortex_2.12-3.0.10.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging C:\TheHive2\thehive-misp\target\scala-2.12\thehivemisp_2.12-3.0.10.jar ...
[info] Packaging C:\TheHive2\target\scala-2.12\thehive_2.12-3.0.10-javadoc.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Packaging C:\TheHive2\target\scala-2.12\thehive_2.12-3.0.10.jar ...
[info] Done packaging.
[error] java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
[error]         at java.nio.file.Files.readAttributes(Files.java:1737)
[error]         at java.nio.file.Files.getLastModifiedTime(Files.java:2266)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
[error]         at java.nio.file.Files.readAttributes(Files.java:1737)
[error]         at java.nio.file.Files.getLastModifiedTime(Files.java:2266)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
[error]         at java.nio.file.Files.readAttributes(Files.java:1737)
[error]         at java.nio.file.Files.getLastModifiedTime(Files.java:2266)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] java.io.IOException: Cannot run program "npm.cmd" (in directory "C:\TheHive2\ui"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden
[error]         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
[error]         at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:102)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$anonfun$runBuffered$1(ProcessBuilderImpl.scala:150)
[error]         at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
[error]         at sbt.internal.util.BufferedLogger.buffer(BufferedLogger.scala:101)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:150)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:116)
[error]         at FrontEnd$.$anonfun$projectSettings$3(FrontEnd.scala:31)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
[error]         at java.lang.ProcessImpl.create(Native Method)
[error]         at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
[error]         at java.lang.ProcessImpl.start(ProcessImpl.java:137)
[error]         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[error]         at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:102)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$anonfun$runBuffered$1(ProcessBuilderImpl.scala:150)
[error]         at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
[error]         at sbt.internal.util.BufferedLogger.buffer(BufferedLogger.scala:101)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:150)
[error]         at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:116)
[error]         at FrontEnd$.$anonfun$projectSettings$3(FrontEnd.scala:31)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[INFO] [06/07/2018 16:01:10.279] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
[error] (thehiveMetrics / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error] (thehiveMisp / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error] (thehiveCortex / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive2\thehive-backend\target\web\classes\main
[error] Total time: 112 s, completed 07.06.2018 16:01:09
@axpatito
Copy link

axpatito commented Jun 7, 2018

I had the same issue as well. I built the project with sbt with some success.

Today I'm able to run locally, but I have not been able to build using activator.

My environment is also W10 with everything installed in it's default path.

I would recommend the following so you can start working, it is just a workaroud and you loose a ton of dev capabilites:

  • cd into your TheHive folder
  • sbt
    if an sbt console pops up, then you are good to go.
  • inside the sbt console, run -Dconfig.file="C:\path\to\application.conf"

At this point you should be able to point your browser to the project.

@JamesCullum
Copy link
Author

JamesCullum commented Jun 8, 2018

Hey axpatito,

Thank you very much for the trick. While it does start the server, I get a 404 for most assets.
Have you experienced that issue with your workaround already?

Console prints out this error

[error] a.d.Dispatcher - Illegal char <:> at index 16: 0c120e4bbe53a544:26f3f15e:163de29804f:-8000:465
java.nio.file.InvalidPathException: Illegal char <:> at index 16: 0c120e4bbe53a544:26f3f15e:163de29804f:-8000:465
        at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPath.parse(Unknown Source)
        at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at sun.nio.fs.AbstractPath.resolve(Unknown Source)
        at org.elastic4play.services.TempSrv.releaseTemporaryFiles(TempSrv.scala:64)
        at org.elastic4play.services.TempSrv.releaseTemporaryFiles(TempSrv.scala:60)
        at org.elastic4play.services.TempFilter$$anonfun$apply$1.applyOrElse(TempSrv.scala:77)
        at org.elastic4play.services.TempFilter$$anonfun$apply$1.applyOrElse(TempSrv.scala:77)

@axpatito
Copy link

axpatito commented Jun 8, 2018

Yup, you will get those non stop. It is due to the missnaming of temp files on Windows. I just ignore those warning and can continue to work. As stated before, this is just a workaround.

I don't understand why you are getting 404's, the application should be running nicely.

@To-om
Copy link
Contributor

To-om commented Jun 9, 2018

If temporary files is needed, they are stored in the context of the HTTP request. At the end of the request, theses files are deleted. In order to track them, they are stored in a directory named with the ID of the request, which contains ":". I didn't realize that it is not permitted by Windows.
This will be fixed in the next release.

@To-om To-om self-assigned this Jun 9, 2018
@To-om To-om added the bug label Jun 9, 2018
@To-om To-om added this to the next release milestone Jun 9, 2018
@JamesCullum
Copy link
Author

Hey @To-om ,

Are you talking about the 404 error from the workaround or the initial issue with the unexpected NoSuchFileException?

@To-om
Copy link
Contributor

To-om commented Jun 12, 2018

I'm talking about your error Illegal char <:> at index 16: 0c120e4bbe53a544:26f3f15e:163de29804f:-8000:465
Regarding 404 error on assets, are you sure they are correctly built ? You can build them manually by executing:

cd ui
npm install
bower install
grunt build

and check output for errors (cf. docs)

@JamesCullum
Copy link
Author

The error is only created because the build process via activator doesn't work and the workaround doesn't use it properly. Building manually does work.

The real issue is the crash during the build process itself, which axpatito confirmed to make it unavailable on Windows completely.

@To-om
Copy link
Contributor

To-om commented Jun 19, 2018

I'm not sure I can help you to build TheHive in Windows. I seems that main build tool (sbt) fails to execute npm, bower or grunt tools. You can try to customize how sbt run these tools by editing project/FrontEnd.scala in line 30, 32 and 34.

@JamesCullum
Copy link
Author

JamesCullum commented Jun 19, 2018

I did that already to fix the immediate compiling errors that are visible. However, I don't get any visible source for the last error, which prevents the building, so I don't really have any starting point.

@To-om To-om modified the milestones: next release, 3.1.0 (Cerana 1) Jun 21, 2018
@To-om
Copy link
Contributor

To-om commented Jul 2, 2018

Regarding the error java.nio.file.InvalidPathException: Illegal char <:> at index 16: 0c120e4bbe53a544:26f3f15e:163de29804f:-8000:465, the fix has been published: TheHive-Project/elastic4play#59

@JamesCullum
Copy link
Author

JamesCullum commented Jul 2, 2018

Can you update the bower.json file so that the new version of the angular-image-resizer is included?
It had a very similiar issues and is one of the dependancies. See issue here.

@nadouani nadouani changed the title java.nio.file.NoSuchFileException: ..\thehive-backend\target\web\classes\main Unable to build TheHive from sources on Windows Jul 2, 2018
@nadouani
Copy link
Contributor

nadouani commented Jul 2, 2018

Hello @JamesCullum

Could you please take care of these attempts (changing bower.json and testing) because we don't use windows.

If your fixes work, then we will be happy to include them, but right now, we don't the bandwidth to work on this.

I'll keep this issue open, remove it from 3.1.0 release. If you end up fixing it, we could include your PR on 3.1.0.

Thanks for your understanding

@JamesCullum
Copy link
Author

Hey @nadouani,

I executed those changes already and took care of it by communicating to the other developer. The version just needs to be bumped to 2.0.3.

The failed build itself keeps on existing, so it still doesn't work on Windows.

While I understand where your idea is coming from, I am not sure if it is a good idea to keep away free developer resources due to missing developer resources. If it would be possible to build on Windows, there would be more people that could help. By choosing to not make it available to develop on Windows, the work will stay within your team and the changes that I planned on integrating won't be able to help other users.

If it is permanently impossible to build on Windows, I have to make all changes in a dirty way - I don't like it and other users could benefit from it, if me and other Windows developers were able to assist. To be frank, Windows has by far the highest OS share - I'm not sure why you would exclude that one, of all.

@nadouani
Copy link
Contributor

nadouani commented Jul 2, 2018

@JamesCullum I've never said we want to keep away free developer resources, please read what I said again.

Do you really think we don't want it to work on Windows?

I've just said, we don't have resources, and time to work on this issue, and you a WELCOME to contribute, we are not against contribution and helping other users.

So please, feel free and shoot any Pull Request you think could help the project ;)

@nadouani nadouani removed this from the 3.1.0 (Cerana 1) milestone Jul 2, 2018
@JamesCullum
Copy link
Author

Of course it would be nice to work on Windows. I mean that setting it as low-priority and fix-whenever will make it impossible for other developers to help. This will make the backlog longer and longer, as less developers are working on it. And this in return will keep the windows compatibility away forever.

So while you would appreciate it working on Windows, it won't be available on it by itself. The used technology stack is very specific and no one is apparently able to debug this issue on why the files do not get build. This means that the only people realistically fixing it anytime soon would be the people who don't use Windows and have no interest in fixing it, considering its a low priority.

Maybe this is the misunderstanding - I know that you would like to have it fixed. I am just saying that this is unlikely to be fixed with this approach.

@nadouani
Copy link
Contributor

nadouani commented Jul 2, 2018

The low-priority label is juste something we use to priorities the effort we put on the issues, it's not to tell the other developer to not consider working on the issue.

If you think that removing this label is a good idea, then, ok I can do it :)

@To-om
Copy link
Contributor

To-om commented Jul 16, 2018

@JamesCullum can you confirm the pull-request done by @billmurrin solves your problem ?

@JamesCullum
Copy link
Author

JamesCullum commented Jul 17, 2018

I've implemented this already. See

  1. (Prevent error by adding ".cmd" to npm, bower and grunt process calls in project/FrontEnd.scala)

This does fix it failing completely, but does not fix the compiling crash.

@billmurrin
Copy link

billmurrin commented Jul 17, 2018

@JamesCullum I compiled mine using the develop branch from elastic4play, 1.6.0

git clone https://github.com/TheHive-Project/elastic4play.git
cd elastic4play
git checkout develop
sbt +publishLocal

In TheHive Project (I'm also using develop branch), modify project/Dependencies

    val elastic4play = "org.thehive-project" %% "elastic4play" % "1.6.0-SNAPSHOT"

Now if you try to compile on Windows with bin\activator clean stage, does it work?

I believe the 1.6.0 elastic4play will be merged into master when 3.1.0 is released at the end of the month.

@JamesCullum
Copy link
Author

Where do you put the folders? Can you give me your folder structure?
I only find folders with that name inside dynamically generated target folders.

@billmurrin
Copy link

Hi @JamesCullum,

I have elastic4play and TheHive in their own folders.

Something like

C:\Projects\elastic4play
C:\Projects\TheHive

The git clone command I put above would be executed from within C:\Projects folder so that it creates the elastic4play directory.

After you clone the repo, cd into the elastic4play folder, checkout develop git checkout develop, then build the plugin with sbt +publishLocal. From there, go back into TheHive folder cd C:\Projects\TheHive, update the project\Dependencies file with the 1.6.0-SNAPSHOT version of elastic4play, and then build the project with bin\activator clean stage.

When you compile TheHive, it will pull the compiled elastic4play 1.6.0-SNAPSHOT from your local repository, the path is something like C:\Users\YOUR_USER\.ivy2\local\org.thehive-project\elastic4play_2.12\1.6.0-SNAPSHOT.

I hope that helps.

@JamesCullum
Copy link
Author

Thank you for the assistance. I've did it exactly like you described and it found and used the new elastic4play version. However, the error itself stays the same: java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main

@billmurrin
Copy link

Aloha @JamesCullum, is this the same TheHive folder that you've been building within?

If so, I've found that clearing the contents of the target directory to be helpful with clearing errors generated by previous builds.

Not sure if all data is purged between builds despite using clean, it seems that cleanFiles can be used to purge all generated content. Related thread: https://groups.google.com/forum/#!topic/play-framework/7daFsYtKExs

@axpatito
Copy link

I can confirm this is the solution to build on Windows. No error messages are shown, it works great! Thanks @billmurrin

@JamesCullum
Copy link
Author

JamesCullum commented Jul 19, 2018

Thank you @billmurrin for the assistance. I've deleted all target folders, but still get the same issue. However, do I understand it correctly that now this is a local issue?

@axpatito @billmurrin Which OS are you using exactly? Are you not even getting the error with timestamps, which requires one of the workarounds?

@billmurrin
Copy link

Hi @JamesCullum.

I'm not getting any errors back related to timestamps. I'm testing on Win 10 Pro.

Just to test, I tried adding the sbtconfig.txt file like you did and it still built without any errors on my end.

On the error you posted with the stack trace above, it referenced line 31 of FrontEnd.scala. Would you mind pasting that section here?

@JamesCullum
Copy link
Author

Hey @billmurrin,

Thank you for the strong support!
Please find below my latest stack trace below.
It does not refer to FrontEnd.scala anymore (and I do not have the original file anymore).

[error] java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.getLastModifiedTime(Unknown Source)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error]         at java.lang.Thread.run(Unknown Source)
[error] java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.getLastModifiedTime(Unknown Source)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error]         at java.lang.Thread.run(Unknown Source)
[INFO] [07/23/2018 09:54:24.310] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
[error] java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main
[error]         at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
[error]         at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.readAttributes(Unknown Source)
[error]         at java.nio.file.Files.getLastModifiedTime(Unknown Source)
[error]         at sbt.internal.io.JavaMilli$.getModifiedTime(Milli.scala:321)
[error]         at sbt.internal.io.Milli$.getModifiedTime(Milli.scala:352)
[error]         at sbt.io.IO$.getModifiedTime(IO.scala:1143)
[error]         at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1212)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:150)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.util.FileInfo$Style.$anonfun$apply$1(FileInfo.scala:62)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]         at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
[error]         at scala.collection.SetLike.map(SetLike.scala:101)
[error]         at scala.collection.SetLike.map$(SetLike.scala:101)
[error]         at scala.collection.AbstractSet.map(Set.scala:47)
[error]         at sbt.util.FileInfo$Style.apply(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$Style.apply$(FileInfo.scala:62)
[error]         at sbt.util.FileInfo$lastModified$.apply(FileInfo.scala:125)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:58)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1307)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[error]         at java.util.concurrent.FutureTask.run(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error]         at java.lang.Thread.run(Unknown Source)
[error] (thehiveMetrics / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main
[error] (thehiveMisp / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main
[error] (thehiveCortex / Compile / doc) java.nio.file.NoSuchFileException: C:\TheHive3\thehive-backend\target\web\classes\main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants