Fail to start a newly generated project - quarkus

I created a brand new project based on instruction on the website :
mvn io.quarkus:quarkus-maven-plugin:1.11.2.Final:create \
-DprojectGroupId=com.test.picco \
-DprojectArtifactId=picco \
-DclassName="com.test.picco.Application" \
-Dpath="./picco-backend"
then
~/s/picco λ ./mvnw compile ✘ 1
[INFO] Scanning for projects...
[WARNING] The POM for com.google.guava:guava:jar:30.1-jre is missing, no dependency information available
[INFO]
[INFO] ------------------< com.redinterface.timeline:picco >-------------------
[INFO] Building picco 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.11.2.Final:generate-code (default) # picco ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.494 s
[INFO] Finished at: 2021-02-09T22:22:36-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.11.2.Final:generate-code (default) on project picco: Execution default of goal io.quarkus:quarkus-maven-plugin:1.11.2.Final:generate-code failed: A required class was missing while executing io.quarkus:quarkus-maven-plugin:1.11.2.Final:generate-code: com/google/common/util/concurrent/internal/InternalFutureFailureAccess
[ERROR] -----------------------------------------------------
[ERROR] realm = extension>io.quarkus:quarkus-maven-plugin:1.11.2.Final
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/me/.m2/repository/io/quarkus/quarkus-maven-plugin/1.11.2.Final/quarkus-maven-plugin-1.11.2.Final.jar
[ERROR] urls[1] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bootstrap-core/1.11.2.Final/quarkus-bootstrap-core-1.11.2.Final.jar
[ERROR] urls[2] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bootstrap-app-model/1.11.2.Final/quarkus-bootstrap-app-model-1.11.2.Final.jar
[ERROR] urls[3] = file:/Users/me/.m2/repository/org/jboss/logging/commons-logging-jboss-logging/1.0.0.Final/commons-logging-jboss-logging-1.0.0.Final.jar
[ERROR] urls[4] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bootstrap-maven-resolver/1.11.2.Final/quarkus-bootstrap-maven-resolver-1.11.2.Final.jar
[ERROR] urls[5] = file:/Users/me/.m2/repository/org/jboss/logmanager/jboss-logmanager-embedded/1.0.6/jboss-logmanager-embedded-1.0.6.jar
[ERROR] urls[6] = file:/Users/me/.m2/repository/org/apache/maven/maven-embedder/3.6.3/maven-embedder-3.6.3.jar
[ERROR] urls[7] = file:/Users/me/.m2/repository/commons-cli/commons-cli/1.4/commons-cli-1.4.jar
[ERROR] urls[8] = file:/Users/me/.m2/repository/org/apache/maven/resolver/maven-resolver-connector-basic/1.4.1/maven-resolver-connector-basic-1.4.1.jar
[ERROR] urls[9] = file:/Users/me/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-wagon/1.4.1/maven-resolver-transport-wagon-1.4.1.jar
[ERROR] urls[10] = file:/Users/me/.m2/repository/org/apache/maven/wagon/wagon-http/3.3.4/wagon-http-3.3.4.jar
[ERROR] urls[11] = file:/Users/me/.m2/repository/org/apache/maven/wagon/wagon-http-shared/3.3.4/wagon-http-shared-3.3.4.jar
[ERROR] urls[12] = file:/Users/me/.m2/repository/org/jsoup/jsoup/1.11.3/jsoup-1.11.3.jar
[ERROR] urls[13] = file:/Users/me/.m2/repository/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
[ERROR] urls[14] = file:/Users/me/.m2/repository/commons-codec/commons-codec/1.14/commons-codec-1.14.jar
[ERROR] urls[15] = file:/Users/me/.m2/repository/org/apache/httpcomponents/httpcore/4.4.14/httpcore-4.4.14.jar
[ERROR] urls[16] = file:/Users/me/.m2/repository/org/apache/maven/wagon/wagon-file/3.3.4/wagon-file-3.3.4.jar
[ERROR] urls[17] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bootstrap-gradle-resolver/1.11.2.Final/quarkus-bootstrap-gradle-resolver-1.11.2.Final.jar
[ERROR] urls[18] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-io/1.5.0/smallrye-common-io-1.5.0.jar
[ERROR] urls[19] = file:/Users/me/.m2/repository/io/quarkus/quarkus-core-deployment/1.11.2.Final/quarkus-core-deployment-1.11.2.Final.jar
[ERROR] urls[20] = file:/Users/me/.m2/repository/org/wildfly/common/wildfly-common/1.5.4.Final-format-001/wildfly-common-1.5.4.Final-format-001.jar
[ERROR] urls[21] = file:/Users/me/.m2/repository/io/quarkus/gizmo/gizmo/1.0.6.Final/gizmo-1.0.6.Final.jar
[ERROR] urls[22] = file:/Users/me/.m2/repository/org/ow2/asm/asm-util/9.0/asm-util-9.0.jar
[ERROR] urls[23] = file:/Users/me/.m2/repository/org/ow2/asm/asm-tree/9.0/asm-tree-9.0.jar
[ERROR] urls[24] = file:/Users/me/.m2/repository/org/ow2/asm/asm-analysis/9.0/asm-analysis-9.0.jar
[ERROR] urls[25] = file:/Users/me/.m2/repository/org/jboss/jandex/2.2.2.Final/jandex-2.2.2.Final.jar
[ERROR] urls[26] = file:/Users/me/.m2/repository/org/ow2/asm/asm/9.0/asm-9.0.jar
[ERROR] urls[27] = file:/Users/me/.m2/repository/io/quarkus/quarkus-development-mode-spi/1.11.2.Final/quarkus-development-mode-spi-1.11.2.Final.jar
[ERROR] urls[28] = file:/Users/me/.m2/repository/io/quarkus/quarkus-class-change-agent/1.11.2.Final/quarkus-class-change-agent-1.11.2.Final.jar
[ERROR] urls[29] = file:/Users/me/.m2/repository/io/quarkus/quarkus-devtools-utilities/1.11.2.Final/quarkus-devtools-utilities-1.11.2.Final.jar
[ERROR] urls[30] = file:/Users/me/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.4/org.eclipse.sisu.inject-0.3.4.jar
[ERROR] urls[31] = file:/Users/me/.m2/repository/io/quarkus/quarkus-core/1.11.2.Final/quarkus-core-1.11.2.Final.jar
[ERROR] urls[32] = file:/Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar
[ERROR] urls[33] = file:/Users/me/.m2/repository/io/smallrye/config/smallrye-config/1.10.2/smallrye-config-1.10.2.jar
[ERROR] urls[34] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-annotation/1.5.0/smallrye-common-annotation-1.5.0.jar
[ERROR] urls[35] = file:/Users/me/.m2/repository/io/smallrye/config/smallrye-config-common/1.10.2/smallrye-config-common-1.10.2.jar
[ERROR] urls[36] = file:/Users/me/.m2/repository/org/eclipse/microprofile/config/microprofile-config-api/1.4/microprofile-config-api-1.4.jar
[ERROR] urls[37] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-expression/1.5.0/smallrye-common-expression-1.5.0.jar
[ERROR] urls[38] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-function/1.5.0/smallrye-common-function-1.5.0.jar
[ERROR] urls[39] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-constraint/1.5.0/smallrye-common-constraint-1.5.0.jar
[ERROR] urls[40] = file:/Users/me/.m2/repository/io/smallrye/common/smallrye-common-classloader/1.5.0/smallrye-common-classloader-1.5.0.jar
[ERROR] urls[41] = file:/Users/me/.m2/repository/org/jboss/logging/jboss-logging-annotations/2.2.0.Final/jboss-logging-annotations-2.2.0.Final.jar
[ERROR] urls[42] = file:/Users/me/.m2/repository/org/jboss/threads/jboss-threads/3.2.0.Final/jboss-threads-3.2.0.Final.jar
[ERROR] urls[43] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bootstrap-runner/1.11.2.Final/quarkus-bootstrap-runner-1.11.2.Final.jar
[ERROR] urls[44] = file:/Users/me/.m2/repository/io/quarkus/quarkus-builder/1.11.2.Final/quarkus-builder-1.11.2.Final.jar
[ERROR] urls[45] = file:/Users/me/.m2/repository/org/graalvm/sdk/graal-sdk/20.3.1/graal-sdk-20.3.1.jar
[ERROR] urls[46] = file:/Users/me/.m2/repository/io/quarkus/quarkus-platform-descriptor-json/1.11.2.Final/quarkus-platform-descriptor-json-1.11.2.Final.jar
[ERROR] urls[47] = file:/Users/me/.m2/repository/io/quarkus/quarkus-devtools-common/1.11.2.Final/quarkus-devtools-common-1.11.2.Final.jar
[ERROR] urls[48] = file:/Users/me/.m2/repository/io/quarkus/quarkus-devtools-codestarts/1.11.2.Final/quarkus-devtools-codestarts-1.11.2.Final.jar
[ERROR] urls[49] = file:/Users/me/.m2/repository/io/quarkus/quarkus-devtools-message-writer/1.11.2.Final/quarkus-devtools-message-writer-1.11.2.Final.jar
[ERROR] urls[50] = file:/Users/me/.m2/repository/io/quarkus/qute/qute-generator/1.11.2.Final/qute-generator-1.11.2.Final.jar
[ERROR] urls[51] = file:/Users/me/.m2/repository/io/quarkus/qute/qute-core/1.11.2.Final/qute-core-1.11.2.Final.jar
[ERROR] urls[52] = file:/Users/me/.m2/repository/io/smallrye/reactive/mutiny/0.12.5/mutiny-0.12.5.jar
[ERROR] urls[53] = file:/Users/me/.m2/repository/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar
[ERROR] urls[54] = file:/Users/me/.m2/repository/io/quarkus/quarkus-platform-descriptor-api/1.11.2.Final/quarkus-platform-descriptor-api-1.11.2.Final.jar
[ERROR] urls[55] = file:/Users/me/.m2/repository/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar
[ERROR] urls[56] = file:/Users/me/.m2/repository/io/fabric8/maven-model-helper/18/maven-model-helper-18.jar
[ERROR] urls[57] = file:/Users/me/.m2/repository/org/jdom/jdom/1.1.3/jdom-1.1.3.jar
[ERROR] urls[58] = file:/Users/me/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.11.3/jackson-dataformat-yaml-2.11.3.jar
[ERROR] urls[59] = file:/Users/me/.m2/repository/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar
[ERROR] urls[60] = file:/Users/me/.m2/repository/io/quarkus/http/quarkus-http-websockets-jsr/3.0.18.Final/quarkus-http-websockets-jsr-3.0.18.Final.jar
[ERROR] urls[61] = file:/Users/me/.m2/repository/io/quarkus/http/quarkus-http-core/3.0.18.Final/quarkus-http-core-3.0.18.Final.jar
[ERROR] urls[62] = file:/Users/me/.m2/repository/io/quarkus/http/quarkus-http-http-core/3.0.18.Final/quarkus-http-http-core-3.0.18.Final.jar
[ERROR] urls[63] = file:/Users/me/.m2/repository/io/netty/netty-buffer/4.1.49.Final/netty-buffer-4.1.49.Final.jar
[ERROR] urls[64] = file:/Users/me/.m2/repository/io/netty/netty-codec-http/4.1.49.Final/netty-codec-http-4.1.49.Final.jar
[ERROR] urls[65] = file:/Users/me/.m2/repository/io/netty/netty-common/4.1.49.Final/netty-common-4.1.49.Final.jar
[ERROR] urls[66] = file:/Users/me/.m2/repository/io/netty/netty-transport/4.1.49.Final/netty-transport-4.1.49.Final.jar
[ERROR] urls[67] = file:/Users/me/.m2/repository/io/netty/netty-resolver/4.1.49.Final/netty-resolver-4.1.49.Final.jar
[ERROR] urls[68] = file:/Users/me/.m2/repository/io/netty/netty-codec/4.1.49.Final/netty-codec-4.1.49.Final.jar
[ERROR] urls[69] = file:/Users/me/.m2/repository/io/netty/netty-handler/4.1.49.Final/netty-handler-4.1.49.Final.jar
[ERROR] urls[70] = file:/Users/me/.m2/repository/io/quarkus/http/quarkus-http-servlet/3.0.18.Final/quarkus-http-servlet-3.0.18.Final.jar
[ERROR] urls[71] = file:/Users/me/.m2/repository/jakarta/servlet/jakarta.servlet-api/4.0.3/jakarta.servlet-api-4.0.3.jar
[ERROR] urls[72] = file:/Users/me/.m2/repository/jakarta/websocket/jakarta.websocket-api/1.1.2/jakarta.websocket-api-1.1.2.jar
[ERROR] urls[73] = file:/Users/me/.m2/repository/io/quarkus/quarkus-bom-quarkus-platform-descriptor/1.11.2.Final/quarkus-bom-quarkus-platform-descriptor-1.11.2.Final-1.11.2.Final.json
[ERROR] urls[74] = file:/Users/me/.m2/repository/io/quarkus/quarkus-platform-descriptor-resolver-json/1.11.2.Final/quarkus-platform-descriptor-resolver-json-1.11.2.Final.jar
[ERROR] urls[75] = file:/Users/me/.m2/repository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar
[ERROR] urls[76] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar
[ERROR] urls[77] = file:/Users/me/.m2/repository/jakarta/inject/jakarta.inject-api/1.0/jakarta.inject-api-1.0.jar
[ERROR] urls[78] = file:/Users/me/.m2/repository/jakarta/enterprise/jakarta.enterprise.cdi-api/2.0.2/jakarta.enterprise.cdi-api-2.0.2.jar
[ERROR] urls[79] = file:/Users/me/.m2/repository/jakarta/el/jakarta.el-api/3.0.3/jakarta.el-api-3.0.3.jar
[ERROR] urls[80] = file:/Users/me/.m2/repository/jakarta/interceptor/jakarta.interceptor-api/1.2.5/jakarta.interceptor-api-1.2.5.jar
[ERROR] urls[81] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.25/plexus-interpolation-1.25.jar
[ERROR] urls[82] = file:/Users/me/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[83] = file:/Users/me/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[84] = file:/Users/me/.m2/repository/org/apache/maven/maven-builder-support/3.6.3/maven-builder-support-3.6.3.jar
[ERROR] urls[85] = file:/Users/me/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.4.1/maven-resolver-util-1.4.1.jar
[ERROR] urls[86] = file:/Users/me/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
[ERROR] urls[87] = file:/Users/me/.m2/repository/commons-io/commons-io/2.8.0/commons-io-2.8.0.jar
[ERROR] urls[88] = file:/Users/me/.m2/repository/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar
[ERROR] urls[89] = file:/Users/me/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[90] = file:/Users/me/.m2/repository/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar
[ERROR] urls[91] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar
[ERROR] urls[92] = file:/Users/me/.m2/repository/org/apache/commons/commons-lang3/3.11/commons-lang3-3.11.jar
[ERROR] urls[93] = file:/Users/me/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.10.0/maven-artifact-transfer-0.10.0.jar
[ERROR] urls[94] = file:/Users/me/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.0.1/maven-common-artifact-filters-3.0.1.jar
[ERROR] urls[95] = file:/Users/me/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[96] = file:/Users/me/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[97] = file:/Users/me/.m2/repository/jline/jline/2.14.6/jline-2.14.6.jar
[ERROR] urls[98] = file:/Users/me/.m2/repository/org/freemarker/freemarker/2.3.30/freemarker-2.3.30.jar
[ERROR] urls[99] = file:/Users/me/.m2/repository/org/glassfish/jakarta.json/1.1.6/jakarta.json-1.1.6.jar
[ERROR] urls[100] = file:/Users/me/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.3/jackson-databind-2.11.3.jar
[ERROR] urls[101] = file:/Users/me/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.3/jackson-annotations-2.11.3.jar
[ERROR] urls[102] = file:/Users/me/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.3/jackson-core-2.11.3.jar
[ERROR] urls[103] = file:/Users/me/.m2/repository/org/twdata/maven/mojo-executor/2.3.1/mojo-executor-2.3.1.jar
[ERROR] urls[104] = file:/Users/me/.m2/repository/org/jboss/slf4j/slf4j-jboss-logmanager/1.1.0.Final/slf4j-jboss-logmanager-1.1.0.Final.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : com.google.common.util.concurrent.internal.InternalFutureFailureAccess
[ERROR] -> [Help 1]
[ERROR]

This looks a lot like an invalid/partial jar stuck in your local Maven cache.
Could you try with a clean ~/.m2/repository/ (just move yours away before trying)?

Related

Gradle task while init db

task initdb() {
doLast {// Make sure the code is run during execution phase and not configuration phase
def dbUrl = 'jdbc:oracle:thin:#//172.31.0.50:1521/FCJ12PROD'
def dbUsername = 'iba_app'
def dbPassword = 'iba_app'
def dbDriver = 'oracle.driver.jdbc.OracleDriver'
def sql = groovy.sql.Sql.newInstance(dbUrl, dbUsername, dbPassword, dbDriver)
}
}
Daemon will be stopped at the end of the build stopping after processing
Task :initdb FAILED
FAILURE: Build failed with an exception.
Where:
Build file 'C:\CodesIBAR\chasis\build.gradle' line: 220
What went wrong:
Execution failed for task ':initdb'.
Could not set unknown property 'dbDriver' for task ':initdb' of type org.gradle.api.DefaultTask.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

How do I cross-compile the Rodio / alsa-sys crate for a Raspberry PI (armv7-unknown-linux-gnueabihf)?

I would like to cross-compile some Rust code for a Raspberry Pi, i.e. use the armv7-unknown-linux-gnueabihf linker. In this package, I used the Rodio library for interfacing with the sound system. This package compiles and runs fine on the build OS (macOS) but I cant compile it to the target, because I then get this error.
Compiling backtrace-sys v0.1.33 Compiling alsa-sys v0.1.2 Compiling minimp3-sys v0.3.2 Compiling syn v1.0.16 Compiling lewton v0.9.4 error: failed to run custom build command for `alsa-sys v0.1.2`
Caused by: process didn't exit successfully: `$HOME/Documents/Personal/Code/Projects/rust_playground/handtekening/target/debug/build/alsa-sys-643139a54771ba41/build-script-build` (exit code: 101)
--- stderr thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override"', src/libcore/result.rs:1188:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish... error: failed to run custom build command for `backtrace-sys v0.1.33`
Caused by: process didn't exit successfully: `$HOME/Documents/Personal/Code/Projects/rust_playground/handtekening/target/debug/build/backtrace-sys-3dc6e67ada300248/build-script-build` (exit code: 1)
--- stdout cargo:rustc-cfg=rbt TARGET = Some("armv7-unknown-linux-gnueabihf") OPT_LEVEL = Some("0") HOST = Some("x86_64-apple-darwin") CC_armv7-unknown-linux-gnueabihf = None CC_armv7_unknown_linux_gnueabihf = None TARGET_CC = None CC = None CROSS_COMPILE = None CFLAGS_armv7-unknown-linux-gnueabihf = None CFLAGS_armv7_unknown_linux_gnueabihf = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None CARGO_CFG_TARGET_FEATURE = None running: "arm-linux-gnueabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv7-a" "-I" "src/libbacktrace" "-I" "/Users/tresink/Documents/Personal/Code/Projects/rust_playground/handtekening/target/armv7-unknown-linux-gnueabihf/debug/build/backtrace-sys-771c80e09bcc7056/out" "-fvisibility=hidden" "-DBACKTRACE_ELF_SIZE=32" "-DBACKTRACE_SUPPORTED=1" "-DBACKTRACE_USES_MALLOC=1" "-DBACKTRACE_SUPPORTS_THREADS=0" "-DBACKTRACE_SUPPORTS_DATA=0" "-DHAVE_DL_ITERATE_PHDR=1" "-D_GNU_SOURCE=1" "-D_LARGE_FILES=1" "-Dbacktrace_full=__rbt_backtrace_full" "-Dbacktrace_dwarf_add=__rbt_backtrace_dwarf_add" "-Dbacktrace_initialize=__rbt_backtrace_initialize" "-Dbacktrace_pcinfo=__rbt_backtrace_pcinfo" "-Dbacktrace_syminfo=__rbt_backtrace_syminfo" "-Dbacktrace_get_view=__rbt_backtrace_get_view" "-Dbacktrace_release_view=__rbt_backtrace_release_view" "-Dbacktrace_alloc=__rbt_backtrace_alloc" "-Dbacktrace_free=__rbt_backtrace_free" "-Dbacktrace_vector_finish=__rbt_backtrace_vector_finish" "-Dbacktrace_vector_grow=__rbt_backtrace_vector_grow" "-Dbacktrace_vector_release=__rbt_backtrace_vector_release" "-Dbacktrace_close=__rbt_backtrace_close" "-Dbacktrace_open=__rbt_backtrace_open" "-Dbacktrace_print=__rbt_backtrace_print" "-Dbacktrace_simple=__rbt_backtrace_simple" "-Dbacktrace_qsort=__rbt_backtrace_qsort" "-Dbacktrace_create_state=__rbt_backtrace_create_state" "-Dbacktrace_uncompress_zdebug=__rbt_backtrace_uncompress_zdebug" "-Dmacho_get_view=__rbt_macho_get_view" "-Dmacho_symbol_type_relevant=__rbt_macho_symbol_type_relevant" "-Dmacho_get_commands=__rbt_macho_get_commands" "-Dmacho_try_dsym=__rbt_macho_try_dsym" "-Dmacho_try_dwarf=__rbt_macho_try_dwarf" "-Dmacho_get_addr_range=__rbt_macho_get_addr_range" "-Dmacho_get_uuid=__rbt_macho_get_uuid" "-Dmacho_add=__rbt_macho_add" "-Dmacho_add_symtab=__rbt_macho_add_symtab" "-Dmacho_file_to_host_u64=__rbt_macho_file_to_host_u64" "-Dmacho_file_to_host_u32=__rbt_macho_file_to_host_u32" "-Dmacho_file_to_host_u16=__rbt_macho_file_to_host_u16" "-o" "$HOME/Documents/Personal/Code/Projects/rust_playground/handtekening/target/armv7-unknown-linux-gnueabihf/debug/build/backtrace-sys-771c80e09bcc7056/out/src/libbacktrace/alloc.o" "-c" "src/libbacktrace/alloc.c"
--- stderr
error occurred: Failed to find tool. Is `arm-linux-gnueabihf-gcc` installed?
warning: build failed, waiting for other jobs to finish... error: failed to run custom build command for `minimp3-sys v0.3.2`
Caused by: process didn't exit successfully: `$HOME/Documents/Personal/Code/Projects/rust_playground/handtekening/target/debug/build/minimp3-sys-592af14148b11e3c/build-script-build` (exit code: 1)
--- stdout TARGET = Some("armv7-unknown-linux-gnueabihf") OPT_LEVEL = Some("0") HOST = Some("x86_64-apple-darwin") CC_armv7-unknown-linux-gnueabihf = None CC_armv7_unknown_linux_gnueabihf = None TARGET_CC = None CC = None CROSS_COMPILE = None CFLAGS_armv7-unknown-linux-gnueabihf = None CFLAGS_armv7_unknown_linux_gnueabihf = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("true") CARGO_CFG_TARGET_FEATURE = None running: "arm-linux-gnueabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-march=armv7-a" "-I" "minimp3/" "-Wall" "-Wextra" "-DMINIMP3_IMPLEMENTATION" "-o" "$HOME/Documents/Personal/Code/Projects/rust_playground/handtekening/target/armv7-unknown-linux-gnueabihf/debug/build/minimp3-sys-0a9af7541b5f3089/out/minimp3.o" "-c" "minimp3.c"
--- stderr
error occurred: Failed to find tool. Is `arm-linux-gnueabihf-gcc` installed?
warning: build failed, waiting for other jobs to finish... error: linker `arm-linux-gnueabihf` not found | = note: No such file or directory (os error 2)
error: aborting due to previous error
error: could not compile `lewton`. warning: build failed, waiting for other jobs to finish... error: build failed`
I think it is because I didn't compile the rodio package for the target, because all the failing compiling targets are audio related, but I can't find how to include this library in the cross-compilation process.

Can´t find "window" function in Spark Structured Streaming

I´m coding a small example in Spark Structured Streaming where I´m trying to process the output of the netstatcommand and can´t figure out how to invoke the windowfunction.
These are the relevant lines of my build.sbt:
scalaVersion := "2.11.4"
scalacOptions += "-target:jvm-1.8"
libraryDependencies ++= {
val sparkVer = "2.3.0"
Seq(
"org.apache.spark" %% "spark-streaming" % sparkVer % "provided",
"org.apache.spark" %% "spark-streaming-kafka-0-8" % sparkVer % "provided",
"org.apache.spark" %% "spark-core" % sparkVer % "provided" withSources(),
"org.apache.spark" %% "spark-hive" % sparkVer % "provided",
)
}
And the code:
case class NetEntry(val timeStamp: java.sql.Timestamp, val sourceHost: String, val targetHost: String, val status: String)
def convertToNetEntry(x: String): NetEntry = {
// tcp 0 0 eselivpi14:icl-twobase1 eselivpi149.int.e:48442 TIME_WAIT
val array = x.replaceAll("\\s+"," ").split(" ").slice(3,6)
NetEntry(java.sql.Timestamp.valueOf(LocalDateTime.now()), array(0),array(1),array(2))
}
def main(args: Array[String]) {
// Initialize spark context
val spark: SparkSession = SparkSession.builder.appName("StructuredNetworkWordCount").getOrCreate()
spark.sparkContext.setLogLevel("ERROR")
val lines = spark.readStream
.format("socket")
.option("host", args(0))
.option("port", args(1).toInt)
.load()
import spark.implicits._
val df = lines.as[String].map(x => convertToNetEntry(x))
val wordsArr: Dataset[NetEntry] = df.as[NetEntry]
wordsArr.printSchema()
// Never get past this point
val windowColumn = window($"timestamp", "10 minutes", "5 minutes")
val windowedCounts = wordsArr.groupBy( windowColumn, $"targetHost").count()
val query = windowedCounts.writeStream.outputMode("complete").format("console").start()
query.awaitTermination()
}
I have with Spark 2.1, 2,2 and 2.3 with the same results. What is really bizarre is that, I have a Spark Cluster, I log in the Spark Shell and copy all the lines... and it works! Any idea of what am I doing wrong?
The error at compilation time:
[error] C:\code_legacy\edos-dp-mediation-spark-consumer\src\main\scala\com\ericsson\streaming\structured\StructuredStreamingMain.scala:39: not found: value window
[error] val windowColumn = window($"timestamp", "10 minutes", "5 minutes")
[error] ^
[warn] 5 warnings found
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 19 s, completed 16-mar-2018 20:13:40
Update: To make things weirder, I have check the API docs and I could not found a valid reference here either:
https://spark.apache.org/docs/2.3.0/api/scala/index.html#org.apache.spark.sql.SparkSession$implicits$
You need to import the window function to compile it, which is already imported in spark-shell.
Add this import statement:
import org.apache.spark.sql.functions.window

Hibernate, Oracle, Play: Unable to build EntityManagerFactory error

I'm getting a really vague exception from Hibernate when trying to use it with Oracle.(it works normally with MySQL)
I have the following configuration:
Play Framework: 2.3.7
ojdbc14.jar
Hibernate: 4.3.8.Final
I'm using Oracle 10i
The application manages to connect, but fails when trying to build the Entity Manager.
I tried to build it manually, but I got the same error when using Play's annotation #play.db.jpa.Transactional
For example: Accessing via raw JDBC works normally.
My database settings in application.conf:
db.default.driver=oracle.jdbc.driver.OracleDriver
db.default.url="jdbc:oracle:thin:#IP:1521:SID"
db.default.user=USER_NAME
db.default.pass=ROOT
db.default.jndiName=DefaultDS
jpa.default=defaultPersistenceUnit
My Persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>DefaultDS</non-jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
</properties>
</persistence-unit>
</persistence>
Here's the exception:
play.api.UnexpectedException: Unexpected exception[PersistenceException: Unable to build entity manager factory]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:166) ~[play_2.11-2.3.7.jar:2.3.7]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(App licationProvider.scala:128) ~[play_2.11-2.3.7.jar:2.3.7]
Caused by: javax.persistence.PersistenceException: Unable to build entity manager factory
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:83) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) ~[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final]
at play.db.jpa.JPAPlugin.onStart(JPAPlugin.java:38) ~[play-java-jpa_2.11-2.3.7.jar:2.3.7]
Caused by: java.lang.NullPointerException: null
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:244) ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
/////////////////////////////////////////////
UPDATED:
The properties that hibernate receives are:
0 = {HashMap$Node#10729} "gopherProxySet" -> "false"
1 = {HashMap$Node#10730} "awt.toolkit" -> "sun.lwawt.macosx.LWCToolkit"
2 = {HashMap$Node#10731} "file.encoding.pkg" -> "sun.io"
3 = {HashMap$Node#10732} "java.specification.version" -> "1.8"
4 = {HashMap$Node#10733} "sun.cpu.isalist" ->
5 = {HashMap$Node#10734} "sun.jnu.encoding" -> "UTF-8"
6 = {HashMap$Node#10735} "hibernate.dialect" -> "org.hibernate.dialect.Oracle10gDialect"
7 = {HashMap$Node#10736} "java.class.path" -> "/Users/rodrigoarantes1/Library/Application Support/IntelliJIdea14/Scala/launcher/sbt-launch.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar"
8 = {HashMap$Node#10737} "java.naming.provider.url" -> "/"
9 = {HashMap$Node#10738} "sbt.global.base" -> "/private/var/folders/8l/k806t46d2fl5sq2rt6gzp7z00000gp/T/sbt-global-plugin1stub"
10 = {HashMap$Node#10739} "java.vm.vendor" -> "Oracle Corporation"
11 = {HashMap$Node#10740} "sun.arch.data.model" -> "64"
12 = {HashMap$Node#10741} "jline.shutdownhook" -> "false"
13 = {HashMap$Node#10742} "java.vendor.url" -> "http://java.oracle.com/"
15 = {HashMap$Node#10744} "javax.persistence.jdbc.user" -> "USERNAME"
16 = {HashMap$Node#10745} "hibernate.transaction.factory_class" -> "class org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory"
17 = {HashMap$Node#10746} "javax.persistence.jdbc.url" -> "jdbc:oracle:thin:#127.0.0.1:1521:XE"
18 = {HashMap$Node#10747} "jline.terminal" -> "none"
19 = {HashMap$Node#10748} "os.name" -> "Mac OS X"
20 = {HashMap$Node#10749} "java.vm.specification.version" -> "1.8"
21 = {HashMap$Node#10750} "sun.java.launcher" -> "SUN_STANDARD"
23 = {HashMap$Node#10752} "sun.boot.library.path" -> "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib"
24 = {HashMap$Node#10753} "sun.java.command" -> "xsbt.boot.Boot run"
25 = {HashMap$Node#10754} "http.nonProxyHosts" -> "local|*.local|169.254/16|*.169.254/16"
26 = {HashMap$Node#10755} "sun.cpu.endian" -> "little"
27 = {HashMap$Node#10756} "user.home" -> "/Users/rodrigoarantes1"
28 = {HashMap$Node#10757} "user.language" -> "en"
29 = {HashMap$Node#10758} "java.specification.vendor" -> "Oracle Corporation"
30 = {HashMap$Node#10759} "java.home" -> "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre"
31 = {HashMap$Node#10760} "file.separator" -> "/"
32 = {HashMap$Node#10761} "line.separator" -> "\n"
33 = {HashMap$Node#10762} "java.vm.specification.vendor" -> "Oracle Corporation"
34 = {HashMap$Node#10763} "java.specification.name" -> "Java Platform API Specification"
35 = {HashMap$Node#10764} "java.awt.graphicsenv" -> "sun.awt.CGraphicsEnvironment"
36 = {HashMap$Node#10765} "javax.persistence.jdbc.driver" -> "oracle.jdbc.driver.OracleDriver"
37 = {HashMap$Node#10766} "sun.boot.class.path" -> "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/classes"
38 = {HashMap$Node#10767} "jline.esc.timeout" -> "0"
39 = {HashMap$Node#10768} "sun.management.compiler" -> "HotSpot 64-Bit Tiered Compilers"
40 = {HashMap$Node#10769} "ftp.nonProxyHosts" -> "local|*.local|169.254/16|*.169.254/16"
41 = {HashMap$Node#10770} "java.runtime.version" -> "1.8.0_45-b14"
42 = {HashMap$Node#10771} "java.naming.factory.initial" -> "tyrex.naming.MemoryContextFactory"
43 = {HashMap$Node#10772} "user.name" -> "rodrigoarantes1"
44 = {HashMap$Node#10773} "path.separator" -> ":"
45 = {HashMap$Node#10774} "os.version" -> "10.10.4"
46 = {HashMap$Node#10775} "java.endorsed.dirs" -> "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/endorsed"
47 = {HashMap$Node#10776} "java.runtime.name" -> "Java(TM) SE Runtime Environment"
48 = {HashMap$Node#10777} "sbt.log.noformat" -> "true"
49 = {HashMap$Node#10778} "hibernate.ejb.persistenceUnitName" -> "oraclePersistenceUnit"
50 = {HashMap$Node#10779} "file.encoding" -> "UTF8"
51 = {HashMap$Node#10780} "sun.nio.ch.bugLevel" ->
52 = {HashMap$Node#10781} "java.vm.name" -> "Java HotSpot(TM) 64-Bit Server VM"
53 = {HashMap$Node#10782} "java.vendor.url.bug" -> "http://bugreport.sun.com/bugreport/"
54 = {HashMap$Node#10783} "java.io.tmpdir" -> "/var/folders/8l/k806t46d2fl5sq2rt6gzp7z00000gp/T/"
55 = {HashMap$Node#10784} "java.version" -> "1.8.0_45"
57 = {HashMap$Node#10786} "os.arch" -> "x86_64"
58 = {HashMap$Node#10787} "java.vm.specification.name" -> "Java Virtual Machine Specification"
59 = {HashMap$Node#10788} "java.awt.printerjob" -> "sun.lwawt.macosx.CPrinterJob"
60 = {HashMap$Node#10789} "sun.os.patch.level" -> "unknown"
61 = {HashMap$Node#10790} "java.library.path" -> ":/Library/Oracle/instantclient_11_2:/Users/rodrigoarantes1/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.:/Users/rodrigoarantes1/SourceTree-Repos/Project/target/native_libraries/64bits"
62 = {HashMap$Node#10791} "java.vendor" -> "Oracle Corporation"
63 = {HashMap$Node#10792} "java.vm.info" -> "mixed mode"
64 = {HashMap$Node#10793} "java.vm.version" -> "25.45-b02"
65 = {HashMap$Node#10794} "hibernate.bytecode.use_reflection_optimizer" -> "false"
66 = {HashMap$Node#10795} "hibernate.connection.datasource" -> "OracleDS"
67 = {HashMap$Node#10796} "sun.io.unicode.encoding" -> "UnicodeBig"
68 = {HashMap$Node#10797} "java.ext.dirs" -> "/Users/rodrigoarantes1/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"
69 = {HashMap$Node#10798} "javax.persistence.jdbc.password" -> "ROOT"
70 = {HashMap$Node#10799} "java.class.version" -> "52.0"
71 = {HashMap$Node#10800} "socksNonProxyHosts" -> "local|*.local|169.254/16|*.169.254/16"
More Details:
The metadata generated by hibernate is:
connection = {OracleConnection#10996}
url = {String#10997} "jdbc:oracle:thin:#127.0.0.1:1521:XE"
user = {String#10998} "USER_NAME"
password = {String#10999} "ROOT"
database = {String#11000} "127.0.0.1:1521:XE"
auto_commit = true
protocol = {String#11001} "thin"
db_access = {TTC7Protocol#11002}
conversion = {TTCConversion#11003}
lob_dbaccess = null
XA_wants_error = false
UsingXA = false
m_txn_mode = 0
fdo = null
big_endian = null
statement_table = {Hashtable#11004} size = 0
closed = false
m_clientIdSet = false
m_clientId = null
default_batch = 1
default_row_prefetch = 10
report_remarks = false
include_synonyms = false
restrict_getTables = false
m_accumulateBatchResult = true
m_j2ee13Compliant = false
m_v8compatible = false
looseTimestampDateCheck = false
dataSizeScale = 1
noCachingBuffer = false
trans_level = 2
map = null
m_javaObjectMap = {Hashtable#11005} size = 0
descriptorCache = {Hashtable#11006} size = 0
statement_holding_line = null
m_dbMetaData = {OracleDatabaseMetaData#10994}
connection = {OracleConnection#10996}
url = {String#10997} "jdbc:oracle:thin:#127.0.0.1:1521:XE"
user = {String#10998} "USER_NAME"
password = {String#10999} "ROOT"
database = {String#11000} "127.0.0.1:1521:XE"
auto_commit = true
protocol = {String#11001} "thin"
db_access = {TTC7Protocol#11002}
conversion = {TTCConversion#11003}
lob_dbaccess = null
XA_wants_error = false
UsingXA = false
m_txn_mode = 0
fdo = null
big_endian = null
statement_table = {Hashtable#11004} size = 0
closed = false
m_clientIdSet = false
m_clientId = null
default_batch = 1
default_row_prefetch = 10
report_remarks = false
include_synonyms = false
restrict_getTables = false
m_accumulateBatchResult = true
m_j2ee13Compliant = false
m_v8compatible = false
looseTimestampDateCheck = false
dataSizeScale = 1
noCachingBuffer = false
trans_level = 2
map = null
m_javaObjectMap = {Hashtable#11005} size = 0
descriptorCache = {Hashtable#11006} size = 0
statement_holding_line = null
m_dbMetaData = {OracleDatabaseMetaData#10994}
connection = {OracleConnection#10996}
url = {String#10997} "jdbc:oracle:thin:#127.0.0.1:1521:XE"
user = {String#10998} "USER_NAME"
password = {String#10999} "ROOT"
database = {String#11000} "127.0.0.1:1521:XE"
auto_commit = true
protocol = {String#11001} "thin"
db_access = {TTC7Protocol#11002}
conversion = {TTCConversion#11003}
lob_dbaccess = null
XA_wants_error = false
UsingXA = false
m_txn_mode = 0
fdo = null
big_endian = null
statement_table = {Hashtable#11004} size = 0
closed = false
m_clientIdSet = false
m_clientId = null
default_batch = 1
default_row_prefetch = 10
report_remarks = false
include_synonyms = false
restrict_getTables = false
m_accumulateBatchResult = true
m_j2ee13Compliant = false
m_v8compatible = false
looseTimestampDateCheck = false
dataSizeScale = 1
noCachingBuffer = false
trans_level = 2
map = null
m_javaObjectMap = {Hashtable#11005} size = 0
descriptorCache = {Hashtable#11006} size = 0
statement_holding_line = null
m_dbMetaData = {OracleDatabaseMetaData#10994}
physicalStatus = true
logicalHandle = false
m_opc = null
m_opc_oc = null
m_osql = {OracleSql#11007}
m_warning = null
m_readOnly = false
m_startTime = 0
statementCache = null
m_stmtClearMetaData = false
m_process_escapes = true
m_defaultAutoRefetch = true
m_occ = null
m_privData = null
defaultFixedString = false
m_svptStmt = null
wrapper = null
connectionProperties = {Properties#11008} size = 3
timeout = null
m_clientData = null
m_sessionTimeZone = null
m_dbTzCalendar = null
procedureResultUnknown = 0
procedureNoResult = 1
procedureReturnsResult = 2
procedureColumnUnknown = 0
procedureColumnIn = 1
procedureColumnInOut = 2
procedureColumnOut = 4
procedureColumnReturn = 5
procedureColumnResult = 3
procedureNoNulls = 0
procedureNullable = 1
procedureNullableUnknown = 2
columnNoNulls = 0
columnNullable = 1
columnNullableUnknown = 2
versionColumnUnknown = 0
versionColumnNotPseudo = 1
versionColumnPseudo = 2
importedKeyCascade = 0
importedKeyRestrict = 1
importedKeySetNull = 2
typeNoNulls = 0
typeNullable = 1
typeNullableUnknown = 2
typePredNone = 0
typePredChar = 1
typePredBasic = 2
typeSearchable = 3
tableIndexStatistic = 0
tableIndexClustered = 1
tableIndexHashed = 2
tableIndexOther = 3
attributeNoNulls = 0
attributeNullable = 1
attributeNullableUnknown = 2
sqlStateXOpen = 1
sqlStateSQL99 = 2
physicalStatus = true
logicalHandle = false
m_opc = null
m_opc_oc = null
m_osql = {OracleSql#11007}
isV8Compatible = false
current_argument = 1
parameterCount = 0
i = 26
length = 26
c = 'E' 69
first = false
in_string = false
odbc_sql = {String#11009} "SET TRANSACTION READ WRITE"
oracle_sql = {StringBuffer#11010} "SET TRANSACTION READ WRITE"
token_buffer = {StringBuffer#11011} ""
isLocate = false
m_warning = null
m_readOnly = false
m_startTime = 0
statementCache = null
m_stmtClearMetaData = false
m_process_escapes = true
m_defaultAutoRefetch = true
m_occ = null
m_privData = null
defaultFixedString = false
m_svptStmt = null
wrapper = null
connectionProperties = {Properties#11008} size = 3
0 = {Hashtable$Entry#11018} "user" -> "USER_NAME"
1 = {Hashtable$Entry#11019} "dll" -> "ocijdbc9"
2 = {Hashtable$Entry#11020} "protocol" -> "thin"
timeout = null
m_clientData = null
m_sessionTimeZone = null
m_dbTzCalendar = null
procedureResultUnknown = 0
procedureNoResult = 1
procedureReturnsResult = 2
procedureColumnUnknown = 0
procedureColumnIn = 1
procedureColumnInOut = 2
procedureColumnOut = 4
procedureColumnReturn = 5
procedureColumnResult = 3
procedureNoNulls = 0
procedureNullable = 1
procedureNullableUnknown = 2
columnNoNulls = 0
columnNullable = 1
columnNullableUnknown = 2
versionColumnUnknown = 0
versionColumnNotPseudo = 1
versionColumnPseudo = 2
importedKeyCascade = 0
importedKeyRestrict = 1
importedKeySetNull = 2
typeNoNulls = 0
typeNullable = 1
typeNullableUnknown = 2
typePredNone = 0
typePredChar = 1
typePredBasic = 2
typeSearchable = 3
tableIndexStatistic = 0
tableIndexClustered = 1
tableIndexHashed = 2
tableIndexOther = 3
attributeNoNulls = 0
attributeNullable = 1
attributeNullableUnknown = 2
sqlStateXOpen = 1
sqlStateSQL99 = 2
physicalStatus = true
logicalHandle = false
m_opc = null
m_opc_oc = null
m_osql = {OracleSql#11007}
isV8Compatible = false
current_argument = 1
parameterCount = 0
i = 26
length = 26
c = 'E' 69
first = false
in_string = false
odbc_sql = {String#11009} "SET TRANSACTION READ WRITE"
oracle_sql = {StringBuffer#11010} "SET TRANSACTION READ WRITE"
token_buffer = {StringBuffer#11011} ""
isLocate = false
m_warning = null
m_readOnly = false
m_startTime = 0
statementCache = null
m_stmtClearMetaData = false
m_process_escapes = true
m_defaultAutoRefetch = true
m_occ = null
m_privData = null
defaultFixedString = false
m_svptStmt = null
wrapper = null
connectionProperties = {Properties#11008} size = 3
timeout = null
m_clientData = null
m_sessionTimeZone = null
m_dbTzCalendar = null
procedureResultUnknown = 0
procedureNoResult = 1
procedureReturnsResult = 2
procedureColumnUnknown = 0
procedureColumnIn = 1
procedureColumnInOut = 2
procedureColumnOut = 4
procedureColumnReturn = 5
procedureColumnResult = 3
procedureNoNulls = 0
procedureNullable = 1
procedureNullableUnknown = 2
columnNoNulls = 0
columnNullable = 1
columnNullableUnknown = 2
versionColumnUnknown = 0
versionColumnNotPseudo = 1
versionColumnPseudo = 2
importedKeyCascade = 0
importedKeyRestrict = 1
importedKeySetNull = 2
typeNoNulls = 0
typeNullable = 1
typeNullableUnknown = 2
typePredNone = 0
typePredChar = 1
typePredBasic = 2
typeSearchable = 3
tableIndexStatistic = 0
tableIndexClustered = 1
tableIndexHashed = 2
tableIndexOther = 3
attributeNoNulls = 0
attributeNullable = 1
attributeNullableUnknown = 2
sqlStateXOpen = 1
sqlStateSQL99 = 2
The Exception being thrown by Hibernate:
File: JdbcServicesImpl.java
Method: meta.supportsNamedParameters();
SQLState = null
vendorCode = 17023
next = null
detailMessage = {String#13599} "Unsupported feature"
cause = {SQLException#13595} "java.sql.SQLException: Unsupported feature"
stackTrace = {StackTraceElement[0]#13600}
suppressedExceptions = {Collections$UnmodifiableRandomAccessList#13601} size = 0
Could someone help me figuring out what the problem might be and how to solve it?
Any help is really appreciated.
Thank you
Since I havent used play, my answer is not a copy and paste but it will show you the way how to do it.
It seems that you are missing a lot of properties in your persistence unit. You are not providing required fields such as username, password, url schema etc. Please have a look at:
https://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html/configuration.html
An example for hsqldb is from the docs above:
<persistence>
<persistence-unit name="manager1" transaction-type="RESOURCE_LOCAL">
<class>org.hibernate.ejb.test.Cat</class>
<class>org.hibernate.ejb.test.Distributor</class>
<class>org.hibernate.ejb.test.Item</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:."/>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/
<property name="hibernate.max_fetch_depth" value="3"/>
<!-- cache configuration -->
<property name="hibernate.ejb.classcache.org.hibernate.ejb.test.Item" value="read-write"/>
<property name="hibernate.ejb.collectioncache.org.hibernate.ejb.test.Item.distributors" value="read-write, RegionName"/>
<!-- alternatively to <class> and <property> declarations, you can use a regular hibernate.cfg.xml file -->
<!-- property name="hibernate.ejb.cfgfile" value="/org/hibernate/ejb/test/hibernate.cfg.xml"/ -->
</properties>
</persistence-unit>
</persistence>
The issue was related to the Oracle driver.
My original configuration works fine with the driver ojdbc7.jar
So my play/jpa configuration remained as:
application.conf
db.default.driver=oracle.jdbc.driver.OracleDriver
db.default.url="jdbc:oracle:thin:#IP:1521:SID"
db.default.user=USER_NAME
db.default.pass=ROOT
db.default.jndiName=DefaultDS
jpa.default=defaultPersistenceUnit
persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>DefaultDS</non-jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
</properties>
</persistence-unit>
</persistence>
I hope it helps someone
EDITED:
I also tried with ojdbc14.jar because I needed to connect o an oracle 8i server.
You only need to add the following property to your persistence.xml
<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>
Thanks

Error Returning boss_db data via websocket in chicago boss

I am trying to return data I get using boss_db over a websocket connection. In this example I want to return the questions I fetch, you can see the logs print out the question, however there is some error which is causing terminated with reason: bad return value: ok.
Below is my code and error:
websocket/fan_games_game_websocket.erl
-module(fan_games_game_websocket, [Req, SessionId]).
-behaviour(boss_service_handler).
-record(state,{users}).
%% API
-export([
init/0,
handle_incoming/4,
handle_join/3,
handle_broadcast/2,
handle_close/4,
handle_info/2,
terminate/2
]).
init() ->
io:format("~p (~p) starting...~n", [?MODULE, self()]),
%timer:send_interval(1000, ping),
{ok, #state{users=dict:new()}}.
handle_join(ServiceName, WebSocketId, State) ->
error_logger:info_msg("~p ~p ~p", [ServiceName, WebSocketId, SessionId]),
#state{users=Users} = State,
{noreply, #state{users=dict:store(WebSocketId, SessionId, Users)}}.
handle_close(Reason, ServiceName, WebSocketId, State) ->
#state{users=Users} = State,
io:format("ServiceName ~p, WebSocketId ~p, SessiondId ~p, close for Reason ~p~n",
[ServiceName, WebSocketId, SessionId, Reason]),
{noreply, #state{users=dict:erase(WebSocketId, Users)}}.
handle_broadcast(Message, State) ->
io:format("Broadcast Message ~p~n",[Message]),
{noreply, State}.
handle_incoming(_ServiceName, WebSocketId, Message, State) ->
error_logger:info_msg(Message),
Questions = boss_db:find(question, []),
error_logger:info_msg("~p~n", [Questions]),
WebSocketId ! {text, list_to_binary(Questions)},
{noreply, State}.
handle_info(state, State) ->
#state{users=Users} = State,
error_logger:info_msg("state:~p~n", [Users]),
{noreply, State};
handle_info(ping, State) ->
error_logger:info_msg("pong:~p~n", [now()]),
{noreply, State};
handle_info(tic_tac, State) ->
#state{users=Users} = State,
Fun = fun(X) when is_pid(X)-> X ! {text, "tic tac"} end,
All = dict:fetch_keys(Users),
[Fun(E) || E <- All],
{noreply, State};
handle_info(_Info, State) ->
{noreply, State}.
terminate(_Reason, _State) ->
ok.
question.erl
-module(question, [Id, GameId, Text]).
-has({answers, many}).
-belongs_to(game).
Update
Here are my updated logs with your suggestions:
Here are the logs from a sample request submitting "a"
11:14:25.401 [info] a
fan_games_game_websocket (<0.299.0>) starting...
11:14:25.401 [info] [{question,"question-2","game-2","Who will have the most rushing yards in the first quarter?"}]
11:14:25.402 [error] ** Boss Service Handler fan_games_game_websocket terminating in handle_incoming/4
for the reason error:badarg
ServiceUrl: "/websocket/game"
WebSocketId: <0.285.0>
SessionId : undefined
Message : <<"a">>
State : {state,{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}}
** Stacktrace: [{erlang,list_to_binary,[[{question,"question-2","game-2","Who will have the most rushing yards in the first quarter?"}]],[]},{fan_games_game_websocket,handle_incoming,5,[{file,"/Users/blanecordes/Documents/Code/erlang/fan_game/fan_games/src/websocket/fan_games_game_websocket.erl"},{line,42}]},{boss_service_worker,handle_cast,2,[{file,"src/boss/boss_service_worker.erl"},{line,173}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,604}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]
11:14:25.402 [error] gen_server fan_games_game_websocket terminated with reason: bad return value: ok
11:14:25.402 [error] CRASH REPORT Process <0.297.0> with 0 neighbours exited with reason: bad return value: ok in gen_server:terminate/6 line 744
11:14:25.402 [error] Supervisor {global,boss_service_sup} had child fan_games_game_websocket started with boss_service_worker:start_link(fan_games_game_websocket, <<"/websocket/game">>) at <0.297.0> exit with reason bad return value: ok in context child_terminated
I believe the problem comes from the line
WebSocketId ! {text, <<Questions>>},
in handle_incoming/4, because <<Questions>> is not a proper binary. Try changing it to this:
WebSocketId ! {text, list_to_binary(Questions)},
instead.

Resources