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

Nitrite native support #1298

Closed
JiriOndrusek opened this issue Jun 3, 2020 · 7 comments · Fixed by #2254
Closed

Nitrite native support #1298

JiriOndrusek opened this issue Jun 3, 2020 · 7 comments · Fixed by #2254

Comments

@JiriOndrusek
Copy link
Contributor

No description provided.

@JiriOndrusek
Copy link
Contributor Author

Please, assign to me.

JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Jun 19, 2020
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Jun 23, 2020
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Jun 23, 2020
@JiriOndrusek
Copy link
Contributor Author

Native support for nitrite is blocked by an issue in Quarkus oracle/graal#460.
This error causes:

Caused by: java.lang.IllegalArgumentException: Could not serialize IndexMetaService.IndexMeta(index=Index(indexType=NonUnique, field=address, collectionName=org.apache.camel.quarkus.component.nitrite.it.Employee), indexMap=$nitrite_index|org.apache.camel.quarkus.component.nitrite.it.Employee|address|NonUnique, isDirty=false) [1.4.200/0]
...
...
...
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectOutputStream.writeObject()
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:101)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:68)
at org.h2.mvstore.type.ObjectDataType.serialize(ObjectDataType.java:356)

WIP for the nitrite support is prepared in this commit JiriOndrusek@1eb6cb8
(it contains working integration tests, which are successfull in JVM but fail in native because of unsupportedFeatureError)

@ppalaga
Copy link
Contributor

ppalaga commented Nov 26, 2020

I have sent a PR #2035 with the tests adapted from your branch, @JiriOndrusek

The Java Serialization support in GraalVM looks to be on a good way oracle/graal#2730

So the native support is actually blocked by oracle/graal#2730

@JiriOndrusek
Copy link
Contributor Author

Because oracle/graal#2730 is fixed in GraalVM 21.0 , it should be possible to finish this issue.
I've updated work in progress into a new commit: JiriOndrusek@48a709c

Unfortunately I see a different exception:

at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:3290)
... 2 more
Caused by: java.lang.IllegalArgumentException: Could not serialize [19403199913046]NO₂ [1.4.200/0]
at org.h2.mvstore.DataUtils.newIllegalArgumentException(DataUtils.java:924)
at org.h2.mvstore.type.ObjectDataType.serialize(ObjectDataType.java:359)
at org.h2.mvstore.type.ObjectDataType$SerializedObjectType.write(ObjectDataType.java:1527)
at org.h2.mvstore.type.ObjectDataType.write(ObjectDataType.java:127)
at org.h2.mvstore.type.ObjectDataType.write(ObjectDataType.java:121)
at org.h2.mvstore.Page.write(Page.java:669)
at org.h2.mvstore.Page$Leaf.writeUnsavedRecursive(Page.java:1525)
at org.h2.mvstore.MVStore.storeNow(MVStore.java:1427)
at org.h2.mvstore.MVStore.store(MVStore.java:1334)
... 6 more
Caused by: java.lang.UnsupportedOperationException: Serialization of class definitions not supported
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:14)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1135)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
at org.h2.mvstore.type.ObjectDataType.serialize(ObjectDataType.java:356)
... 13 more

I found opened issue on GraalVM (oracle/graal#2685), which shows very similar exception with a statement, that it is happening on GraalVM 21.0
It looks like this extension is still blocked...

@JiriOndrusek
Copy link
Contributor Author

But I try to dig into ot in case, the reason of the issue is not caused by serialization

@jamesnetherton
Copy link
Contributor

Although serialization support is present in GraalVM 21.x, AFAIK there is no user friendly support for it in Quarkus yet.

So you'd have to manually add build args like:

quarkus.native.additional-build-args=-H:SerializationConfigurationResources=my-serialization-configs.json

@JiriOndrusek
Copy link
Contributor Author

Thanks I'll try to configure it.

JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 15, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 15, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 15, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 15, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 15, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 16, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 16, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 16, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 16, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 16, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 19, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 24, 2021
JiriOndrusek added a commit to JiriOndrusek/camel-quarkus that referenced this issue Feb 24, 2021
ppalaga pushed a commit that referenced this issue Feb 25, 2021
@ppalaga ppalaga added this to the 1.8.0 milestone Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants