Closed liuyinling closed 12 months ago
What are the 10 test errors mentioned in the log?
Here are all the errors in the terminal.
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ImmutableJsonArrayTest.assertImmutability:56 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonArray
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.ImmutableJsonParseOptions
org.eclipse.ditto.json.JsonCharEscaper
org.eclipse.ditto.json.JsonValue
org.eclipse.ditto.json.ImmutableJsonObjectNull
org.eclipse.ditto.json.ImmutableJsonArrayNull
org.eclipse.ditto.json.JsonValueFieldDefinition
org.eclipse.ditto.json.JsonMergePatch
org.eclipse.ditto.json.JsonKey
org.eclipse.ditto.json.ImmutableJsonNull
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonValueParser
org.eclipse.ditto.json.JsonCollectors
org.eclipse.ditto.json.ImmutableJsonLong
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFieldDefinition
org.eclipse.ditto.json.JsonFactory
org.eclipse.ditto.json.JavaValueFieldDefinition
org.eclipse.ditto.json.JsonParseException
org.eclipse.ditto.json.JsonObjectMerger
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonArray'.
This is probably my fault, not yours, and I am sorry.
I'd love to get an opportunity to fix this, please report as an issue at:
https://github.com/MutabilityDetector/MutabilityDetector/issues/
Pasting in this error message and stack trace, and if possible,
information about the code causing the error.
For example, one of:
.class files (preferably with source);
compilable .java files;
a jar (again preferably with source);
or, if your project is open source, information on where I can get the code from
(I'm happy to checkout and build your project in order to investigate the error).
Apologies, and thank you for using Mutability Detector.
[ERROR] ImmutableJsonFieldSelectorFactoryTest.assertImmutability:41 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonFieldSelectorFactory
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonFieldSelectorFactory'.
[ERROR] ImmutableJsonFieldSelectorTest.assertImmutability:40 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonFieldSelector
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.JsonValue
org.eclipse.ditto.json.ImmutableJsonObjectNull
org.eclipse.ditto.json.JsonKey
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFieldDefinition
org.eclipse.ditto.json.ImmutableJsonNull
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonCollectors
org.eclipse.ditto.json.JsonFactory
org.eclipse.ditto.json.JsonObjectMerger
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonFieldSelector'.
[ERROR] ImmutableJsonFieldTest.assertImmutability:55 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonField
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonFactory
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonField'.
[ERROR] ImmutableJsonKeyTest.assertImmutability:31 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonKey
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonKey'.
[ERROR] ImmutableJsonObjectTest.assertImmutability:75 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonObject
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFactory
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonObject'.
[ERROR] ImmutableJsonPatchTest.assertImmutability:37 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonPatch
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonPatch'.
[ERROR] ImmutableJsonPointerTest.assertImmutability:42 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonPointer
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.ImmutableJsonParseOptions
org.eclipse.ditto.json.JsonCharEscaper
org.eclipse.ditto.json.JsonValue
org.eclipse.ditto.json.ImmutableJsonObjectNull
org.eclipse.ditto.json.ImmutableJsonArrayNull
org.eclipse.ditto.json.JsonValueFieldDefinition
org.eclipse.ditto.json.JsonMergePatch
org.eclipse.ditto.json.JsonKey
org.eclipse.ditto.json.ImmutableJsonNull
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonValueParser
org.eclipse.ditto.json.JsonCollectors
org.eclipse.ditto.json.ImmutableJsonLong
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFieldDefinition
org.eclipse.ditto.json.JsonFactory
org.eclipse.ditto.json.JavaValueFieldDefinition
org.eclipse.ditto.json.JsonParseException
org.eclipse.ditto.json.JsonObjectMerger
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonPointer'.
[ERROR] ImmutableJsonStringTest.assertImmutability:36 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.ImmutableJsonString
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.ImmutableJsonParseOptions
org.eclipse.ditto.json.JsonCharEscaper
org.eclipse.ditto.json.JsonValue
org.eclipse.ditto.json.ImmutableJsonObjectNull
org.eclipse.ditto.json.ImmutableJsonArrayNull
org.eclipse.ditto.json.JsonValueFieldDefinition
org.eclipse.ditto.json.JsonMergePatch
org.eclipse.ditto.json.JsonKey
org.eclipse.ditto.json.ImmutableJsonNull
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonValueParser
org.eclipse.ditto.json.JsonCollectors
org.eclipse.ditto.json.ImmutableJsonLong
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFieldDefinition
org.eclipse.ditto.json.JsonFactory
org.eclipse.ditto.json.JavaValueFieldDefinition
org.eclipse.ditto.json.JsonParseException
org.eclipse.ditto.json.JsonObjectMerger
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.ImmutableJsonString'.
[ERROR] JavaStringToEscapedJsonStringTest.assertImmutability:34 » MutabilityAnalysis
An unhandled error occurred. Please read message at end of this output.
Class being analysed: org.eclipse.ditto.json.JavaStringToEscapedJsonString
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
org.eclipse.ditto.json.ImmutableJsonBoolean
org.eclipse.ditto.json.JsonValue
org.eclipse.ditto.json.ImmutableJsonObjectNull
org.eclipse.ditto.json.JsonKey
org.eclipse.ditto.json.ImmutableJsonInt
org.eclipse.ditto.json.JsonFieldDefinition
org.eclipse.ditto.json.ImmutableJsonNull
org.eclipse.ditto.json.ImmutableJsonDouble
org.eclipse.ditto.json.JsonCollectors
org.eclipse.ditto.json.JsonFactory
org.eclipse.ditto.json.JsonObjectMerger
An unhandled error occurred while analysing the class 'org.eclipse.ditto.json.JavaStringToEscapedJsonString'.
Then I assume that could have to do with JDK 18. Eclipse Ditto is currently compiled with JDK 17 - we did not yet test it with greater versions.
So either skip the unit tests by building -DskipTests
or please build Ditto with JDK 17 (as you might also run into other issues).
I tried with JDK 17. I got these three errors.
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] IndexInitializerIT.<clinit>:53 » ExceptionInInitializer
[ERROR] MongoReadJournalIT.<clinit>:73 » NoClassDefFound Could not initialize class org.eclipse.ditto.internal.utils.test.docker.mongo.MongoContainerFactory
[ERROR] MongoTimestampPersistenceIT.<clinit>:53 » NoClassDefFound Could not initialize class org.eclipse.ditto.internal.utils.test.docker.mongo.MongoContainerFactory
[INFO]
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0
This one looks like you don't have docker running.
The engine of docker was running.
@thjaeckle this command mvn clean install -DskipTests
works well.
However, when I build local Ditto Docker snapshot images by using ./build-images.sh
, I got the following error
=> ERROR [4/4] COPY ./dist ./dist 0.0s
------
> [4/4] COPY ./dist ./dist:
------
Dockerfile:17
--------------------
15 |
16 | COPY ./index.html .
17 | >>> COPY ./dist ./dist
18 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 6026d1d0-f35c-4c48-a6cf-68de82b927d4::w6b571i2pc20htqz30pguehem: "/dist": not found
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/t089mgvqx8dahctc03owkfur4
Please have a look here: #1699 We did not yet manage to address this - e.g. perform step 3. from the linked issue.
I updated to ./build-images.sh
script and by default excluded the UI build - so this should work now for you.
Yes, indeed, ./build-images.sh
script works well.
However, when I executed docker-compose up -d
command, I got the following error parsing /Users/yinlingliu/Git/ditto/deployment/docker/docker-compose.yml: yaml: line 13: did not find expected key
Hello, I am using maven to build ditto. The terminal shows the errors in the following. It tells the error relating to JSON. I would like to know how to fix it.
I am using Macbook M1 Pro with Sonoma 14.1.2. The JDK version is 18. The maven version 3.9.6.
If you need more information, just let me know. Thanks a lot!