{"action":"created","issue":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/607","repository_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo","labels_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/607/comments","events_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/607/events","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/607","id":170942573,"number":607,"title":"generate-api , needs to report the path to the field for failure.","user":{"login":"chabhishek123","id":1962228,"avatar_url":"https://avatars.githubusercontent.com/u/1962228?v=3","gravatar_id":"","url":"https://api.github.com/users/chabhishek123","html_url":"https://github.com/chabhishek123","followers_url":"https://api.github.com/users/chabhishek123/followers","following_url":"https://api.github.com/users/chabhishek123/following{/other_user}","gists_url":"https://api.github.com/users/chabhishek123/gists{/gist_id}","starred_url":"https://api.github.com/users/chabhishek123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chabhishek123/subscriptions","organizations_url":"https://api.github.com/users/chabhishek123/orgs","repos_url":"https://api.github.com/users/chabhishek123/repos","events_url":"https://api.github.com/users/chabhishek123/events{/privacy}","received_events_url":"https://api.github.com/users/chabhishek123/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-12T19:30:02Z","updated_at":"2016-09-24T09:32:55Z","closed_at":"2016-09-24T09:32:54Z","body":"I am trying to create pojo from schema. I am noticing the error . It will help if which field ( line number, file ) where the error is observed. The error is : \r\nCaused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties\r\n\tat org\r\n\r\nI have checked through script if the same field is present twice, it is not present. Please help me fix this.\r\n\r\n\r\nCOMPLETE STACK TRACE:\r\n\r\n[ERROR] Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties -> [Help 1]\r\norg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)\r\n\tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)\r\n\tat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)\r\n\tat org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)\r\n\tat org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)\r\n\tat org.apache.maven.cli.MavenCli.main(MavenCli.java:141)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)\r\nCaused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)\r\n\t... 19 more\r\nCaused by: java.lang.IllegalArgumentException: trying to create the same field twice: additionalProperties\r\n\tat com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:425)\r\n\tat com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:396)\r\n\tat org.jsonschema2pojo.rules.AdditionalPropertiesRule.addAdditionalPropertiesField(AdditionalPropertiesRule.java:128)\r\n\tat org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:108)\r\n\tat org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:43)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:135)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)\r\n\tat org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)\r\n\tat org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)\r\n\tat org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)\r\n\tat org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)\r\n\tat org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)\r\n\tat org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)\r\n\tat org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)\r\n\tat org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:92)\r\n\tat org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)\r\n\tat org.jsonschema2pojo.maven.Jsonschema2PojoMojo.execute(Jsonschema2PojoMojo.java:594)\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)\r\n\t... 20 more"},"comment":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/comments/249355472","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/607#issuecomment-249355472","issue_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/607","id":249355472,"user":{"login":"joelittlejohn","id":686384,"avatar_url":"https://avatars.githubusercontent.com/u/686384?v=3","gravatar_id":"","url":"https://api.github.com/users/joelittlejohn","html_url":"https://github.com/joelittlejohn","followers_url":"https://api.github.com/users/joelittlejohn/followers","following_url":"https://api.github.com/users/joelittlejohn/following{/other_user}","gists_url":"https://api.github.com/users/joelittlejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/joelittlejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelittlejohn/subscriptions","organizations_url":"https://api.github.com/users/joelittlejohn/orgs","repos_url":"https://api.github.com/users/joelittlejohn/repos","events_url":"https://api.github.com/users/joelittlejohn/events{/privacy}","received_events_url":"https://api.github.com/users/joelittlejohn/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T09:32:54Z","updated_at":"2016-09-24T09:32:54Z","body":"Closing this as we don't have enough info. It's likely that @ctrimble has diagnosed this correctly. Another possibility is passing a JSON schema as input but setting sourceType to JSON (this is a common way of accidentally including a field named additionalProperties that you didn't expect). Since you mention that you don't have additionalProperties defined as a field anywhere, maybe the latter problem is what's happening here."}}
{"actor":{"display_login":"joelittlejohn"}}