heroku - dependency issue causing Scala Play build to fail on heroku
I'm a bit of newbie to the Scala and the Play framework (2.6.x). See git push heroku master
failure screenshot below.
I'm requiring the jsoup dependency in build.sbt
(the first one):
libraryDependencies += "org.jsoup" % "jsoup" % "1.11.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
And using it in my controller:
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
...
val res = scala.io.Source.fromURL(data.url)("ISO-8859-1").mkString
val s = Jsoup.parse(res).title
In addition I attempted to use it as an unmanaged dependency by adding it to the lib/ folder, though I still get the same Heroku error.
Interestingly, the app works OK and without errors locally. Is there something I'm missing? Thanks.
Edit:
Beginning of build log:
Failure:
scala heroku playframework
add a comment |
I'm a bit of newbie to the Scala and the Play framework (2.6.x). See git push heroku master
failure screenshot below.
I'm requiring the jsoup dependency in build.sbt
(the first one):
libraryDependencies += "org.jsoup" % "jsoup" % "1.11.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
And using it in my controller:
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
...
val res = scala.io.Source.fromURL(data.url)("ISO-8859-1").mkString
val s = Jsoup.parse(res).title
In addition I attempted to use it as an unmanaged dependency by adding it to the lib/ folder, though I still get the same Heroku error.
Interestingly, the app works OK and without errors locally. Is there something I'm missing? Thanks.
Edit:
Beginning of build log:
Failure:
scala heroku playframework
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing ascompilePlatBinaryScala
. My build starts withremote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.
– ygor
Nov 20 '18 at 19:03
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49
add a comment |
I'm a bit of newbie to the Scala and the Play framework (2.6.x). See git push heroku master
failure screenshot below.
I'm requiring the jsoup dependency in build.sbt
(the first one):
libraryDependencies += "org.jsoup" % "jsoup" % "1.11.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
And using it in my controller:
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
...
val res = scala.io.Source.fromURL(data.url)("ISO-8859-1").mkString
val s = Jsoup.parse(res).title
In addition I attempted to use it as an unmanaged dependency by adding it to the lib/ folder, though I still get the same Heroku error.
Interestingly, the app works OK and without errors locally. Is there something I'm missing? Thanks.
Edit:
Beginning of build log:
Failure:
scala heroku playframework
I'm a bit of newbie to the Scala and the Play framework (2.6.x). See git push heroku master
failure screenshot below.
I'm requiring the jsoup dependency in build.sbt
(the first one):
libraryDependencies += "org.jsoup" % "jsoup" % "1.11.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
And using it in my controller:
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
...
val res = scala.io.Source.fromURL(data.url)("ISO-8859-1").mkString
val s = Jsoup.parse(res).title
In addition I attempted to use it as an unmanaged dependency by adding it to the lib/ folder, though I still get the same Heroku error.
Interestingly, the app works OK and without errors locally. Is there something I'm missing? Thanks.
Edit:
Beginning of build log:
Failure:
scala heroku playframework
scala heroku playframework
edited Nov 20 '18 at 19:46
kriskanya
asked Nov 20 '18 at 17:25
kriskanyakriskanya
122110
122110
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing ascompilePlatBinaryScala
. My build starts withremote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.
– ygor
Nov 20 '18 at 19:03
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49
add a comment |
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing ascompilePlatBinaryScala
. My build starts withremote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.
– ygor
Nov 20 '18 at 19:03
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing as
compilePlatBinaryScala
. My build starts with remote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.– ygor
Nov 20 '18 at 19:03
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing as
compilePlatBinaryScala
. My build starts with remote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.– ygor
Nov 20 '18 at 19:03
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49
add a comment |
1 Answer
1
active
oldest
votes
My guess is, that you created Play project from a template. Initial template contains both build.sbt
but also gradle build (build.gradle
, gradlew
, gradlew.bat
. Locally, you use sbt
for compilation. However, Heroku picks up Gradle build.
Problem: You added the dependency only to build.sbt
, but not into gradle.build
file.
If you do not really need Gradle, than I suggest to delete Gradle build files from your repository and try to push again.
If you want to keep Heroku using Gradle, than you have to maintain both types of build files.
There also probably is a way how to instruct Heroku to use sbt
as preferred choice.
If I'd like to keep gradle, do simply add a line todependencies
? Something likeplay 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).
– kriskanya
Nov 20 '18 at 20:12
Hmm,play "org.jsoup:jsoup':1.11.3"
works for me. Than I rungradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?
– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page withAn error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, justRelease v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398344%2fheroku-dependency-issue-causing-scala-play-build-to-fail-on-heroku%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My guess is, that you created Play project from a template. Initial template contains both build.sbt
but also gradle build (build.gradle
, gradlew
, gradlew.bat
. Locally, you use sbt
for compilation. However, Heroku picks up Gradle build.
Problem: You added the dependency only to build.sbt
, but not into gradle.build
file.
If you do not really need Gradle, than I suggest to delete Gradle build files from your repository and try to push again.
If you want to keep Heroku using Gradle, than you have to maintain both types of build files.
There also probably is a way how to instruct Heroku to use sbt
as preferred choice.
If I'd like to keep gradle, do simply add a line todependencies
? Something likeplay 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).
– kriskanya
Nov 20 '18 at 20:12
Hmm,play "org.jsoup:jsoup':1.11.3"
works for me. Than I rungradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?
– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page withAn error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, justRelease v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
add a comment |
My guess is, that you created Play project from a template. Initial template contains both build.sbt
but also gradle build (build.gradle
, gradlew
, gradlew.bat
. Locally, you use sbt
for compilation. However, Heroku picks up Gradle build.
Problem: You added the dependency only to build.sbt
, but not into gradle.build
file.
If you do not really need Gradle, than I suggest to delete Gradle build files from your repository and try to push again.
If you want to keep Heroku using Gradle, than you have to maintain both types of build files.
There also probably is a way how to instruct Heroku to use sbt
as preferred choice.
If I'd like to keep gradle, do simply add a line todependencies
? Something likeplay 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).
– kriskanya
Nov 20 '18 at 20:12
Hmm,play "org.jsoup:jsoup':1.11.3"
works for me. Than I rungradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?
– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page withAn error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, justRelease v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
add a comment |
My guess is, that you created Play project from a template. Initial template contains both build.sbt
but also gradle build (build.gradle
, gradlew
, gradlew.bat
. Locally, you use sbt
for compilation. However, Heroku picks up Gradle build.
Problem: You added the dependency only to build.sbt
, but not into gradle.build
file.
If you do not really need Gradle, than I suggest to delete Gradle build files from your repository and try to push again.
If you want to keep Heroku using Gradle, than you have to maintain both types of build files.
There also probably is a way how to instruct Heroku to use sbt
as preferred choice.
My guess is, that you created Play project from a template. Initial template contains both build.sbt
but also gradle build (build.gradle
, gradlew
, gradlew.bat
. Locally, you use sbt
for compilation. However, Heroku picks up Gradle build.
Problem: You added the dependency only to build.sbt
, but not into gradle.build
file.
If you do not really need Gradle, than I suggest to delete Gradle build files from your repository and try to push again.
If you want to keep Heroku using Gradle, than you have to maintain both types of build files.
There also probably is a way how to instruct Heroku to use sbt
as preferred choice.
edited Nov 20 '18 at 20:03
answered Nov 20 '18 at 19:57
ygorygor
1,1161615
1,1161615
If I'd like to keep gradle, do simply add a line todependencies
? Something likeplay 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).
– kriskanya
Nov 20 '18 at 20:12
Hmm,play "org.jsoup:jsoup':1.11.3"
works for me. Than I rungradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?
– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page withAn error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, justRelease v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
add a comment |
If I'd like to keep gradle, do simply add a line todependencies
? Something likeplay 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).
– kriskanya
Nov 20 '18 at 20:12
Hmm,play "org.jsoup:jsoup':1.11.3"
works for me. Than I rungradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?
– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page withAn error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, justRelease v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
If I'd like to keep gradle, do simply add a line to
dependencies
? Something like play 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).– kriskanya
Nov 20 '18 at 20:12
If I'd like to keep gradle, do simply add a line to
dependencies
? Something like play 'org.jsoup:jsoup:1.11.3'
(which didn't work btw).– kriskanya
Nov 20 '18 at 20:12
Hmm,
play "org.jsoup:jsoup':1.11.3"
works for me. Than I run gradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?– ygor
Nov 20 '18 at 20:53
Hmm,
play "org.jsoup:jsoup':1.11.3"
works for me. Than I run gradlew.bat compilePlayBinaryScala
. What did not work ? Any error received ?– ygor
Nov 20 '18 at 20:53
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page with
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, just Release v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Sorry, should have been more specific. It looks like the build is not failing, but when I visit the url, all I see is a page with
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
. Logs don't say anything, just Release v2 created by user...
– kriskanya
Nov 20 '18 at 21:03
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
Yes, I know, you now need to setup your heroku procfile
– ygor
Nov 20 '18 at 21:07
1
1
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
But that should be a new question. Btw, did my answer solve your compilation problem?
– ygor
Nov 20 '18 at 21:08
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398344%2fheroku-dependency-issue-causing-scala-play-build-to-fail-on-heroku%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I have troubles replicating this. E.g., when I push my Scala Play app to Heroku, I see no such thing as
compilePlatBinaryScala
. My build starts withremote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage
What about yours? Please post whole build log.– ygor
Nov 20 '18 at 19:03
Are you using gradle for build?
– ygor
Nov 20 '18 at 19:15
Yes. I've posted the screenshots above.
– kriskanya
Nov 20 '18 at 19:49