Jodd 3.6.6 and JsonSerializer error on java 1.6

33 views
Skip to first unread message

David Marko

unread,
Nov 19, 2015, 3:16:35 AM11/19/15
to Jodders
I'm trying to use JsonSerializer with very simple bean with just string property and the code "String json = new JsonSerializer().serialize(item);" raises the error as below. Any idea whats wrong?

Exception in thread "AgentThread: JavaAgent" java.lang.NoSuchMethodError: jodd/Jodd.init(Ljava/lang/Class;)V
at jodd.json.JoddJson.init(JoddJson.java:77)
at jodd.json.JoddJson.<clinit>(JoddJson.java:73)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:199)
at jodd.json.JsonSerializer.<init>(JsonSerializer.java:30)
at tcl.JsonExporter.run(JsonExporter.java:18)

Jodders

unread,
Nov 19, 2015, 3:36:48 AM11/19/15
to Jodders
Hello Hello!

It appears that your are missing the jodd-core.jar in your classpath. Jodd.init is the class from the Jodd-core, and jodd-json depends on jodd-core. We made this simple way of figuring if dependencies are missing as soon as possible.

David Marko

unread,
Nov 19, 2015, 3:45:27 AM11/19/15
to Jodders
I'm using full jodd-3.6.6.jar ... jodd.core is inside

Dne čtvrtek 19. listopadu 2015 9:36:48 UTC+1 Jodders napsal(a):

David Marko

unread,
Nov 19, 2015, 3:59:04 AM11/19/15
to Jodders
I working with serializer in IBM Domino. I tried the same code outside and its working fine. It must me something IBM related. They use IBM Java 1.6  :-(


Dne čtvrtek 19. listopadu 2015 9:36:48 UTC+1 Jodders napsal(a):
Hello Hello!

Jodders

unread,
Nov 19, 2015, 4:03:52 AM11/19/15
to Jodders
Strange :)

Do you have maybe different Jodd versions in the classpath?
On a7f9c28c3cc978da49ba2548fbdf59a2b28d81a9 we added the Jodd.init(Class) method; so maybe there is some old jodd-core in the classpath somewhere?

Can you put BP in JoddJson static initializer and see which Jodd class it is accessing to?

David Marko

unread,
Nov 19, 2015, 4:11:35 AM11/19/15
to Jodders
great hint!! I found old Jodd 3.5.2 on classpath and it caused the error. Now its working fine ... great !!!

Dne čtvrtek 19. listopadu 2015 10:03:52 UTC+1 Jodders napsal(a):

Igor Spasić

unread,
Nov 19, 2015, 4:13:05 AM11/19/15
to dmar...@gmail.com, Jodders
Awesome! Great we figured it out quickly :)

--
Jodd - The Unbearable Lightness of Java - http://jodd.org
---
You received this message because you are subscribed to the Google Groups "Jodders" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jodders+u...@googlegroups.com.
To post to this group, send email to jod...@googlegroups.com.
Visit this group at http://groups.google.com/group/jodders.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages