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

Fixes #3640: Custom procedures declaration fails in 5.x #3647

Merged
merged 3 commits into from Aug 23, 2023
Merged

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Jul 5, 2023

WIP: in 5.10.0 the Signature is changed again. Waiting for release to check what is changed

Fixes #3640

The issue affects any 5.x version.

Sporadically the reflection finds 2 constructors and cycles starting with the one having 13 parameters, but in that case the following error is thrown, because it finds this constructor (which is btw Deprecated) before the next non-deprecated one.

Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch

Anyway, reflection should no longer be needed, since previously we could have e.g. an APOC 4.x compatible with Neo4j 4.x.y (with ProcedureSignature having 14 elements) and 4.x.z (with ProcedureSignature having 13 elements).

In Neo4j 5 it shouldn't happen, because, for example, APOC 5.9.0 is compatible with Neo4j 5.9.x, and theoretically, as it says here, the x version increments only in case of hotfixes, therefore should not cause breaking changes.


Tried adding some junit tests, with both enterprise and docker, but it always works as it starts cycling starting the 14-element one first, even if you try restarting the database several times

@vga91 vga91 force-pushed the issue-3640 branch 2 times, most recently from 0b11b0d to 1194caa Compare July 5, 2023 13:36
@vga91 vga91 changed the title Fixes #3640: Custom procedures declaration fails in 5.9.0 Fixes #3640: Custom procedures declaration fails in 5.x Jul 14, 2023
@vga91 vga91 merged commit 917d66d into dev Aug 23, 2023
5 of 7 checks passed
@vga91 vga91 deleted the issue-3640 branch August 23, 2023 13:21
recrwplay pushed a commit to recrwplay/neo4j-apoc-procedures that referenced this pull request Aug 31, 2023
…eo4j-contrib#3647)

* Fixes neo4j-contrib#3640: Custom procedures declaration fails in 5.9.0

* debug error in 5.10.0

* 5.10 changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom procedures declaration fails in 5.9.0
1 participant