Skip to content

"Path not present" error when processing multiple JSON files having objects with the same name #1427

Closed

Description

@tokarenko

jsonschema2pojo 1.1.2 fails with "Path not present: watcher" error when processing multiple json files having objects with the same name, e.g.:

... and the following configuration:

    <plugins>
        <plugin>
            <groupId>org.jsonschema2pojo</groupId>
            <artifactId>jsonschema2pojo-maven-plugin</artifactId>
            <version>1.1.2</version>
            <configuration>
                <generateBuilders>true</generateBuilders>
                <includeToString>false</includeToString>
                <includeHashcodeAndEquals>false</includeHashcodeAndEquals>
                <annotationStyle>none</annotationStyle>
                <includeAdditionalProperties>false</includeAdditionalProperties>
                <initializeCollections>false</initializeCollections>
            </configuration>
            <executions>
                <execution>
                    <id>execution-with-error</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                         <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
                         <sourceType>json</sourceType>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>

The error persists if I move json-files into different subdirectories of "sourceDirectory". I expect that json-files in different subdirectories will result in POJOs with different packages to avoid naming conflicts.

Activity

  1. added a commit that references this issue on Jan 18, 2023
    6bee180
  2. added 2 commits that reference this issue on Jan 22, 2023
    e896079
    7478fc3
  3. changed the title [-]jsonschema2pojo 1.1.2 fails with "Path not present: watcher" error when processing multiple json files having objects with the same name[/-] [+]"Path not present" error when processing multiple JSON files having objects with the same name[/+] on Jan 26, 2023
  4. added this to the 1.1.4 milestone on Jan 26, 2023
  5. added a commit that references this issue on Feb 15, 2023
    9439a84
  6. added 2 commits that reference this issue on Feb 15, 2023
    fa54b49
    15e4229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions