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

Default constructor error #11

Closed
abiessener opened this issue Jan 23, 2020 · 5 comments
Closed

Default constructor error #11

abiessener opened this issue Jan 23, 2020 · 5 comments

Comments

@abiessener
Copy link

Hi there --

Thanks for the lib.

I'm using kbson inside kMongo. That part works great.

Trying to use kbson to manually serialize/deserialize doesn't work, though. I can't even instantiate the class.

java.lang.NoSuchMethodError: com.github.jershell.kbson.Configuration.<init>(ZLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V

	at com.github.jershell.kbson.KBson.<init>(KBson.kt:12)
	at com.github.jershell.kbson.KBson.<clinit>(KBson.kt:41)

Not sure what to do here, honestly.

@jershell
Copy link
Owner

jershell commented Feb 1, 2020

Hi, I can not reproduce it. Did you clear and rebuild your project? What is a version?

@jbmolle
Copy link

jbmolle commented Feb 3, 2020

Hi @abiessener
The problem comes from KMongo library.
KMongo forked this library and overwrote some files in the package. You can see the code on KMongo github, kmongo-kbson package.
In particular Configuration has 1 more variable in KMongo.
So when you're using KMongo and KBson together you have a problem with Configuration initializer. Java methods don't have the same signature.

@jershell
Copy link
Owner

jershell commented Feb 3, 2020

@zigzago Hi, can you help us with this story, I have no idea what to do in this situation?

@zigzago
Copy link
Collaborator

zigzago commented Feb 18, 2020

The fork was not intended to stay. I need to investigate the diff between the two code bases, send other PRs to kbson and then remove the kmongo kbson fork. I've created an issue to follow this work: Litote/kmongo#173

As a workaround, use only kbson kmongo fork when kmongo is present in your classpath.

@lamba92
Copy link

lamba92 commented May 28, 2020

Having the same issue, but the artifact is present and loaded in the classpath. IntelliJ correctly sees it and let me navigate the code until Configuration. I'll investigate.

@zigzago zigzago closed this as completed Jul 10, 2020
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

No branches or pull requests

5 participants