0

I have a maven project that is running smoothly on JAVA 7 but recently I wanted to migrate everything from 1.7 to JDK 1.8 but I've started getting error traces because of JIBX libraries. On a similar thread : [Check this StackOverflow link][1]- I found that only JIBX version 1.3.0 or higher is compatible with JDK 8.

So I made the following changes in my POM.xml :

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ejb-compile.dependency.ant-nodeps.version>1.6.5</ejb-compile.dependency.ant-nodeps.version>
<jdk-home>${jdk16.home}</jdk-home>
<maven.ejb.skip>true</maven.ejb.skip>
<jaxp.version>1.3</jaxp.version>
<jibx.version>1.3.1</jibx.version>
<distributed.context.api.version>1.1.12</distributed.context.api.version>
<distributed.context.impl.version>1.1.12</distributed.context.impl.version>
<generic.context.version>0.1.2</generic.context.version>
<something.uf.version>2.5.9</something.uf.version>
<!-- JConnect -->
<jconnect.version>0.11.1</jconnect.version>
<jconnect.majorversion>0.11</jconnect.majorversion>

But I'm getting the following stack trace and I have no idea from where it is picking jibx 1.2.2 as is seen in the error :

[INFO]
[INFO] maven-jibx-plugin:1.2.2-AMADEUS-3:bind (default) connectors-verbhandler-1axml
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.pom (2.1 kB at 4.7 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.pom (1.8 kB at 4.2 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.pom (1.7 kB at 3.9 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.pom (1.8 kB at 4.1 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.pom (1.7 kB at 3.9 kB/s)   
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.jar
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.jar (49 kB at 40 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.jar (136 kB at 107 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.jar (271 kB at 112 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.jar (470 kB at 145 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.jar (435 kB at 106 kB/s)
[INFO] Running JiBX binding compiler (single-module mode) on 1 binding file(s)
[INFO] ----------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------
[INFO] Total time: 33.787 s
[INFO] Finished at: 2018-09-10T12:41:15+05:30
[INFO] ----------------------------------
[ERROR] Failed to execute goal org.jibx:maven-jibx-plugin:1.2.2-AMADEUS-3:bind (default) on project connectors-verbhandler-1axml: Error
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [HELP 1] htto:/cwiki.apache.org/confluence/displav/MAVEN/MoToExecutionException
[ERROR] After correcting the problems, you can resume the build with the command

I also searched for 1.2.2 declaration in my workspace but couldn't find anything, tried in .m2 folder's settings.xml but still no help. Can anybody please provide any leads here? Thanks

Due to the question character limit, here is a link to the full Link of POM.xml - https://ideone.com/IfN9FK

James Risner
  • 5,451
  • 11
  • 25
  • 47
Raman Verma
  • 113
  • 9
  • Can you share your full pom.xml please? – Mureinik Sep 10 '18 at 08:50
  • I think you have 1.2.2 in other dependencies. run this command and check jibx version: mvn dependency:tree – Rahim Dastar Sep 10 '18 at 09:24
  • @RahimDastar Thanks for you inputs, I run that command and I could see some traces regarding jibx library : "org.jibx:jibx-run:jar:1.3.1:compile " and " org.jibx:jibx-extras:jar:1.3.1:compile" Does this mean correct version 1.3.1 is being used ? – Raman Verma Sep 10 '18 at 10:19
  • @Mureinik I have updated the full pom, can you check ? – Raman Verma Sep 10 '18 at 10:24
  • Possible duplicate of [Failed to execute goal org.jibx:maven-jibx-plugin:1.2.6:bind when upgrading from Java 1.6 to 1.8](https://stackoverflow.com/questions/40494748/failed-to-execute-goal-org-jibxmaven-jibx-plugin1-2-6bind-when-upgrading-from) – Adam Ostrožlík Sep 10 '18 at 10:27
  • @AdamOstrožlík I have already given that answer refernce in my question, but that doesn't answer my question, I have an entire different issue, I can't figure why jibx version 1.2.2 is getting picked at the time of build. – Raman Verma Sep 10 '18 at 10:34

2 Answers2

1

You aren't specifying the jibx version when you declare the jib dependency:

<plugin>
  <groupId>org.jibx</groupId>
  <artifactId>maven-jibx-plugin</artifactId>
  <version>1.3.0</version> <!-- Here! -->
  <configuration>
    <directory>src/main/jibx</directory>
    <includes>
      <includes>*.xml</includes>
    </includes>
    <verbose>${jibx.verbose}</verbose>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>bind</goal>
      </goals>
    </execution>
  </executions>
</plugin>
Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • Thanks @Mureinik, Actually I have two POMs - one for all the projects and one within a single project. I have attached the main POM and the project specific POM is this one - https://ideone.com/w22UKo I believe you're suggesting changes in the above POM correct ? – Raman Verma Sep 10 '18 at 10:38
  • Thank You so much, build is successful, this really helps (Y) – Raman Verma Sep 10 '18 at 10:53
0

For Java 1.8+, use the below dependency. It will work fine. I verified it.

            <plugin>
                <groupId>org.jibx</groupId>
                <artifactId>maven-jibx-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bind</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <directory>src/main/jibx-bindings</directory>
                    <includes>
                        <include>*binding*.xml</include>
                    </includes>
                    <verbose>true</verbose>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.bcel</groupId>
                        <artifactId>bcel</artifactId>
                        <version>6.3</version>
                    </dependency>
                </dependencies>
            </plugin>
Manjunatha B
  • 276
  • 3
  • 9