Pushing my repository (JAVA app) to heroku fails - java

Im building an app in playframework 2.2., and when I run the app locally with play run it runs fine but when I try to upload to heroku with git push heroku master it starts uploading fine but after a while it always ends with these errors:
[info] downloading http://s3pository.heroku.com/maven-central/org/par
ed/parboiled-core/1.1.5/parboiled-core-1.1.5.jar ...
[info] [SUCCESSFUL ] org.parboiled#parboiled-core;1.1.5!parboiled-c
jar(bundle) (245ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm/4.1/asm-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm;4.1!asm.jar (198ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-tree/4.1/asm-tree-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-tree;4.1!asm-tree.jar (109ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-analysis/4.1/asm-analysis-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-analysis;4.1!asm-analysis.jar
ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-util/4.1/asm-util-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-util;4.1!asm-util.jar (354ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/scala-compiler/2.10.3/scala-compiler-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.3!scala-com
r.jar (8070ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/jline/2.10.3/jline-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#jline;2.10.3!jline.jar (307ms)
[info] Done updating.
[info] Compiling 5 Scala sources and 11 Java sources to /tmp/scala_bu
ack_build_dir/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.3. Compil
..
[info] Compilation completed in 23.023 s
[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.j
45: illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
[error] 1 error
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 387 s, completed Mar 25, 2014 4:20:51 PM
! Failed to build app with sbt
! Push rejected, failed to compile Play 2.x - Java app
To git#heroku.com:glacial-plateau-2895.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glacial-plateau-2895.git'
Can someone help me?
I've searched but i didn't find similar problems that could help me.
Thanks in advance.

[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.java:45:
illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
Means that the JDK on your Heroku environment is Java 6 whereas your code is Java 7. Upgrade ;)
Here's info how to...

If you want to use java 7 on Heroku, you'll need to add a file with a directive in the root folder of your project. Details here - https://devcenter.heroku.com/articles/add-java-version-to-an-existing-maven-app

Related

Maven fails to compile QuestDB from source with 'ambiguous reference to Record'

I've been running QuestDB from docker, but to try latest version from master, I followed documentation on GitHub but cannot build from source. The output from the console when I try run any maven commands (mvn clean test or build) looks like:
[INFO] QuestDB core 5.0.6-SNAPSHOT ........................ FAILURE [ 7.103 s]
[INFO] JMH benchmarks for QuestDB 1.0 ..................... SKIPPED
[INFO] QuestDB 5.0.6-SNAPSHOT ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.192 s
[INFO] Finished at: 2021-01-13T15:14:10+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project questdb: Compilation failure: Compilation failure:
[ERROR] /Users/fmay/proj/qdb/questdb/core/src/main/java/io/questdb/griffin/engine/functions/SymbolFunction.java:[50,39] error: reference to Record is ambiguous
...
I'm trying to build using latest Mac os 11.1.
QuestDB needs to be built with Java 11, check which version is running with
java -version
If you have something different and you use homebrew, you can use brew to install openJDK 11 with
brew install openjdk#11

Building smart-home-dashboard source code fails

I'm proceeding with the README.md procedure at the following URL, but when compiling, I get the following error message and cannot proceed.
https://github.com/actions-on-google/smart-home-dashboard
[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[Help 1]
I put the source code near the C drive, but it didn't solve.
If anyone knows how to solve it, Would you tell me how to solve?
OS:Windows 10
Result of command line:
C:\test>mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT
[WARNING]
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
unique: com.googlecode.objectify:objectify:jar -> duplicate
declaration of version 5.1.22 # line 164, column 15
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique
but found duplicate declaration of plugin
org.apache.maven.plugins:maven-war-plugin # line 304, column 13
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[WARNING]
[INFO]
------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO]
------------------------------------------------------------------------
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
[WARNING] The project
com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT uses prerequisites
which is only intended for maven-plugin projects but not for non
maven-plugin projects. For such purposes you should use the
maven-enforcer-plugin. See
https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO]
[INFO] -------------------< com.google.homegraph:dashboard >-------------------
[INFO] Building dashboard 0.1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- protobuf-maven-plugin:0.5.0:compile (default) # dashboard ---
[INFO] Compiling 1579 proto file(s) to
C:\test\target\generated-sources\protobuf\java
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.583 s
[INFO] Finished at: 2019-10-22T18:03:49+09:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I'm sorry, it seems my procedure was wrong.
I didn't have to do manually the "Build from source" field in README.md,
I copied extra files in this step.
It was automatically added when compiling at the beginning of the work.
Finally, I was able to compile in the following environment.
OS:Linux (CentOS7)
maven version:3.3.9 (I matched it to the version written in `pom.xml`.)

Deploying to heroku play framework java

I get this error when deploying my play 2.3 java project. This is my first time deploying
[info] Set current project to scala_buildpack_build_dir (in build file:/tmp/scala_buildpack_build_dir/)
[success] Total time: 0 s, completed Aug 4, 2014 1:29:13 AM
[info] Updating {file:/tmp/scala_buildpack_build_dir/}scala_buildpack_build_dir...
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.4 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.4 ...
[info] Resolving org.scala-lang#jline;2.10.4 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[success] Total time: 0 s, completed Aug 4, 2014 1:29:13 AM
[error] Not a valid command: stage (similar: last-grep, set, last)
[error] Not a valid project ID: stage
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: stage (similar: state, target, tags)
[error] stage
[error] ^
! Failed to build app with sbt

Error while building Hadoop src using maven

I want to install hadoop single node setup on windows7 64 bit. I have installed cygwin, windows SDK 7.1, maven 3.1.1 and jdk 1.6.33.
Running Hadoop single node setup on windows 7 is very trooublesome.
While buiding the "mvn package -Pdist,native-win -DskipTests -Dtar" i am getting below error.
Can someone help how to fix this error or any other way to build hadoop on windows 7 64 bit?
portion of the Error log is as follows:
[INFO] Apache Hadoop Main ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.461s
[INFO] Finished at: Wed Jun 11 19:42:25 IST 2014
[INFO] Final Memory: 53M/339M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
5.1:compile (default-compile) on project hadoop-common: Compilation failure: Com
pilation failure:
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolPB.java:[26,65] package org.apache.ha
doop.ipc.proto.RefreshCallQueueProtocolProtos does not exist
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolPB.java:[36,33] package RefreshCallQu
eueProtocolService does not exist
[ERROR] D:\hdfs\hadoop-common-project\hadoop-common\src\main\java\org\apache\had
oop\ipc\protocolPB\RefreshCallQueueProtocolServerSideTranslatorPB.java:[24,65] p
ackage org.apache.hadoop.ipc.proto.RefreshCallQueueProtocolProtos does not exist
You can download the latest hadoop release from this url:
http://apache.mirrors.tds.net/hadoop/common/stable/hadoop-2.2.0.tar.gz
You are complicating yourself for no reason: you only need to build hadoop in windows if your system is 32 bits (and good luck on that: I've been trying it for 3 weeks!). Since your system is 64 all you need to do is download a precompiled package

Compiling PrimeFaces 1.1

I am trying to modify the PrimeFaces 1.1 sources to fit my application needs. However I ran into trouble compiling the sources.
I am using the sources from:
http://repository.prime.com.tr/org/primefaces/primefaces/1.1/
Downloaded and extracted:
primefaces-1.1-sources.jar
However when i try to run the primefaces-1.1.pom it fails because its referencing to some XML files which contains the tag info, but I couldn't find those in the sources. I assume this build file is for PrimeFaces 2.x?
Or am i missing something? Would be great if you could help me!
Using Maven "Install"
"c:\program files (x86)\jetbrains\intellij idea 10.0\jre\jre\bin\java" -Dclassworlds.conf=D:\Werk\Binaries\Maven\bin\m2.conf -Dmaven.home=D:\Werk\Binaries\Maven -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\bin" -Dfile.encoding=windows-1252 -classpath "D:\Werk\Binaries\Maven\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -f C:\Users\Mark\Downloads\primefaces-1.1-sources\pom.xml install
[WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.primefaces:primefaces:jar:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 156, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building primefaces 1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-ui-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-touch-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- maven-jsf-plugin:1.1.3:generate-tld (generate-ui) # primefaces ---
[INFO] Generating TLD
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711s
[INFO] Finished at: Thu Dec 30 11:29:43 CET 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld (generate-ui) on project primefaces: Execution generate-ui of goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Process finished with exit code 1
If you just need to modify a single class (or a few), it may be easiest to take that class's source code alone, modify and compile it with the rest of Primefaces as JAR in the classpath, then replace that single class file in the JAR.

Categories