Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplebindings #92

Merged
merged 18 commits into from
Jan 24, 2024
Merged

Multiplebindings #92

merged 18 commits into from
Jan 24, 2024

Conversation

GregorioMonari
Copy link
Contributor

Description

This pull request adds Multiple Bindings capabilities (feat nov 22) to the client-api and 2 other minor changes:

  • fix: jmx on default 7090 port (1)
  • fix: setting port and host by env vars (2)
    both on (nov 8)

Type of change

  • Bug fix
  • New feature

Changelog

  • (2) ./Dockerfile: added jmx configuration by env and cmdline
  • ./client-api/.../Bindings.java: added null to some methods return statements
  • ./client-api/.../RDFTerm.java: added null to isBnode return types
  • ./client-api/.../Aggregator.java: added multiple forced bindings
  • ./client-api/.../Client.java: addDefaultDatatype
  • ./client-api/.../ForcedBindings.java: added solution constructor
  • ./client-api/.../JSAP.java: getUpdateMultipleBindings
  • ./client-api/.../MultipleForcedBindings.java: new class
  • ./client-api/.../Producer: added multiple forced bindings
  • (1)(2) ./engine/src/main/resources/jmx.properties: removed fixed port and host configuration, now it is configured via env and cmd (see dockerfile)

@GregorioMonari
Copy link
Contributor Author

  • If endpoint and host parameters are set, SEPA throws null pointer exception at EngineProperties.java. Needs fix!
  • blazegraph port is 8080 and not 9999 -> needs to be changed in endpoint-blazegraph.jpar

@GregorioMonari
Copy link
Contributor Author

There seems to be a problem with paths on windows while running client-api tests. When running the test it.unibo.arces.wot.sepa.api.ITSPARQL11SEProtocol the following error is thrown on windows:

java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Utente/git/SEPA/client-api/target/test-classes/sepatest.jsap
	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
	at java.base/java.nio.file.Path.of(Path.java:147)
	at it.unibo.arces.wot.sepa.commons.properties.SPARQL11Properties.getReaderFromUri(SPARQL11Properties.java:244)
	at it.unibo.arces.wot.sepa.commons.properties.SPARQL11Properties.<init>(SPARQL11Properties.java:162)
	at it.unibo.arces.wot.sepa.commons.properties.SPARQL11SEProperties.<init>(SPARQL11SEProperties.java:127)
	at it.unibo.arces.wot.sepa.pattern.JSAP.<init>(JSAP.java:209)
	at it.unibo.arces.wot.sepa.pattern.JSAP.<init>(JSAP.java:205)
	at it.unibo.arces.wot.sepa.ConfigurationProvider.<init>(ConfigurationProvider.java:55)
	at it.unibo.arces.wot.sepa.api.ITSPARQL11SEProtocol.beginTest(ITSPARQL11SEProtocol.java:36)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
	at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:108)
	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	Suppressed: java.lang.NullPointerException: Cannot invoke "it.unibo.arces.wot.sepa.api.SPARQL11SEProtocol.close()" because "it.unibo.arces.wot.sepa.api.ITSPARQL11SEProtocol.client" is null
		at it.unibo.arces.wot.sepa.api.ITSPARQL11SEProtocol.endTest(ITSPARQL11SEProtocol.java:52)
		... 26 more

NOTES

  • The bug is in the client-api tests, so as an additional test i tried to build and run the java-dashboard, which uses the same client-api, and they work. So this is a weird error.
  • Maybe this could be the cause why some CI tests fail?

@GregorioMonari GregorioMonari requested a review from relu91 January 22, 2024 17:05
Copy link
Contributor

@relu91 relu91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed CI, tests sometimes fail on Windows and it might happen in CI too. Let's fix later.

@relu91 relu91 merged commit 7810a7e into master Jan 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants