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

Does your tool jsonSchema2pojo work with JDK6 or less #644

Closed
sashivit opened this issue Nov 7, 2016 · 2 comments
Closed

Does your tool jsonSchema2pojo work with JDK6 or less #644

sashivit opened this issue Nov 7, 2016 · 2 comments

Comments

@sashivit
Copy link

sashivit commented Nov 7, 2016

We are using Java 6 in our applications.

We wish to use your code to create and load the POJO classes.

While running your code, we are getting below error

jcvas$ jsonschema2pojo --source bss.cha.balanceEnquiryResponse.6.json --target java-gen
jsonschema2pojo[18]: readlink:  not found.
Nov 7, 2016 8:11:25 AM com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector <clinit>
WARNING: Unable to load JDK7 annotation types; will have to skip
Exception in thread "main" java.lang.NoSuchMethodError: java/util/Collections.emptyIterator()Ljava/util/Iterator;
        at com.fasterxml.jackson.databind.util.ClassUtil.emptyIterator(ClassUtil.java:24)
        at com.fasterxml.jackson.databind.JsonNode.elements(JsonNode.java:762)
        at org.jsonschema2pojo.rules.RequiredArrayRule.apply(RequiredArrayRule.java:57)
        at org.jsonschema2pojo.rules.RequiredArrayRule.apply(RequiredArrayRule.java:41)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:130)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:66)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
        at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)
        at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:115)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:66)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:115)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:66)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
        at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
        at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:115)
        at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:66)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
        at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
        at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
        at org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:92)
        at org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)
        at org.jsonschema2pojo.cli.Jsonschema2PojoCLI.main(Jsonschema2PojoCLI.java:48)

We are running Java 1.6

jcvas$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap3260sr8-20100409_01(SR8))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32 jvmap3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT  - r9_20100401_15339
GC   - 20100308_AA)
JCL  - 20100408_01
@thachhoang
Copy link
Collaborator

This should be fixed if we update the Jackson dependency to 2.7.2:

FasterXML/jackson-databind#1134

@joelittlejohn
Copy link
Owner

@thachhoang Excellent, thanks for investigating.

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

3 participants