hyperledger-firefly / hyperledger-firefly/cordaconnect

gradlew build failed

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Description

failed the process with following errors

> Configure project :
The testCompile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the testImplementation configuration instead.
at build_3dl7ww11ps2tswshl6s0qi1d2$_run_closure2.doCall(/home/ff/firefly-cordaconnect/build.gradle:16)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Configure project :connector
The runtime configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the runtimeOnly configuration instead.
at build_15qcytdyk67pw8mtd1zvyqpl3$_run_closure4.doCall(/home/ff/firefly-cordaconnect/connector/build.gradle:67)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Task :connector:compileJava FAILED
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:269: error: method orElseThrow in class Optional cannot be applied to given types;
EventStreamInfo createdStream = eventStreamRepository.findById(id).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:281: error: method orElseThrow in class Optional cannot be applied to given types;
return existingStream.orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:287: error: cannot find symbol
if(existingStream.isEmpty()) {
^
symbol: method isEmpty()
location: variable existingStream of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:308: error: method orElseThrow in class Optional cannot be applied to given types;
EventStreamInfo updatedStream = eventStreamRepository.findById(eventStreamId).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:317: error: cannot find symbol
if(existingStream.isEmpty()) {
^
symbol: method isEmpty()
location: variable existingStream of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:337: error: cannot find symbol
if(existingStream.isEmpty()) {
^
symbol: method isEmpty()
location: variable existingStream of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:357: error: cannot find symbol
if(existingStream.isEmpty()) {
^
symbol: method isEmpty()
location: variable existingStream of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:397: error: method orElseThrow in class Optional cannot be applied to given types;
EventStreamInfo streamInfo = eventStreamRepository.findById(subscriptionData.getStream()).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:401: error: method orElseThrow in class Optional cannot be applied to given types;
newSub = subscriptionRepository.findById(id).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:408: error: method orElseThrow in class Optional cannot be applied to given types;
return subscriptionRepository.findById(subscriptionId).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:418: error: cannot find symbol
if(subscriptionInfo.isEmpty()) {
^
symbol: method isEmpty()
location: variable subscriptionInfo of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:432: error: cannot find symbol
if(subscriptionInfo.isEmpty()) {
^
symbol: method isEmpty()
location: variable subscriptionInfo of type Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStreamService.java:439: error: method orElseThrow in class Optional cannot be applied to given types;
subInfo = subscriptionRepository.findById(subscriptionId).orElseThrow();
^
required: Supplier
found: no arguments
reason: cannot infer type-variable(s) X
(actual and formal argument lists differ in length)
where X,T are type-variables:
X extends Throwable declared in method orElseThrow(Supplier)
T extends Object declared in class Optional
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/Subscription.java:89: error: cannot find symbol
.withContractStateTypes(Set.of(clazz))
^
symbol: method of(Class)
location: interface Set
where CAP#1 is a fresh type-variable:
CAP#1 extends ContractState from capture of ? extends ContractState
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/Subscription.java:143: error: cannot find symbol
.withContractStateTypes(Set.of(stateTypeClass))
^
symbol: method of(Class)
location: interface Set
where CAP#1 is a fresh type-variable:
CAP#1 extends ContractState from capture of ? extends ContractState
/home/ff/firefly-cordaconnect/connector/src/main/java/io/kaleido/cordaconnector/service/EventStream.java:102: error: cannot find symbol
Map checkpoints = Map.copyOf(this.subscriptionCheckpoints);
^
symbol: method copyOf(ConcurrentHashMap)
location: interface Map
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
16 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':connector: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

BUILD FAILED in 1s
4 actionable tasks: 1 executed, 3 up-to-date

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.