amino-os / Amino.Run-Demos

Amino.Run - Demo Applications
Apache License 2.0
5 stars 6 forks source link

Unable to compile Face Recognition example #24

Closed obaidamin closed 5 years ago

obaidamin commented 5 years ago

Hello all,

I followed the instructions provided for running the face recognition example. However, I am unable to build the project and getting following error:

# ./gradlew build
> Task :compileJava FAILED
/home/face-recognition-demo/src/main/java/facerecog/Recognition.java:13: error: type SapphireObject does not take parameters
public class Recognition implements SapphireObject<DefaultSapphirePolicy> {
                                                  ^
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* 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.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s
1 actionable task: 1 executed

Any idea what's going wrong. Thanks, Obaid

PS: If there is a mailing list or any other issue tracker for this project can you please point me to that. Thanks!

quinton-hoole commented 5 years ago

Thanks @obaidamin for the bug report. And congratulations for being the first non team member to report an issue! :-)

It looks like that example code is slightly out of date w.r.t. the Sapphire core. We'll have to fix that tomorrow.

In summary what needs to be done is remove the parameter from SapphireObject, which specifies the DeploymentManager associated with the SapphireObject. That has been replaced by a yaml config file.

If you're feeling brave, take a look at:

https://github.com/Huawei-PaaS/DCAP-Sapphire/blob/master/sapphire/examples/kvstore/src/main/java/sapphire/demo/KeyValueStore.java#L13

and

https://github.com/Huawei-PaaS/DCAP-Sapphire/blob/master/sapphire/examples/kvstore/src/main/resources/KeyValueStore.yaml

and feel free to send a PR to fix this.

quinton-hoole commented 5 years ago

PS: I can also add you to our slack channel, so that you can get more realtime responses from the team.

quinton-hoole commented 5 years ago

Actually I see #23 already addresses this problem. It just needs to be merged. We will try to do that tomorrow.

cc @DonghuiZhuo @neerajkc

quinton-hoole commented 5 years ago

I just merged #23 .

Please sync and try again @obaidamin

quinton-hoole commented 5 years ago

I'm going to close issue for now. Feel free to re-open if you're still unable to build or run the example.

neerajkc commented 5 years ago

@obaidamin @quinton-hoole-2 : #23 indeed takes care of this. @obaidamin where you able to build the docker image? It turns out the link to jdk1.8.0_181-b13 on line 78 of the Dockerfile is outdated. Oracle has archived that version and the link now redirects to a login page. You may want to update that line to point to http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz

obaidamin commented 5 years ago

Thanks @quinton-hoole the problem is fixed.

@neerajkc: Yes I had to change Docker file for that. It was a minor change so didn't bother you guys :).