Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Dickson, On Fri, Apr 1, 2022 at 4:24 PM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > However when I introduced a second bindings file with a separate package > mentioned in both bindings.xml files. The access classes for both bindings > are generated in the package mentioned in the first bindings.xml. > OK - but does that cause a problem? I'm a little fuzzy on this but I think JiBX generates more than one type of class. Notice there are "access" classes, "factory" classes, and "munge adapter" classes. I'm guessing that when you perform one binding operation with multiple binding files, JiBX just sticks (some of) the generated classes in the first package it finds because they are global... or something like that. -Archie -- Archie L. Cobbs ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Archie, For a single binding file it works fine, JIBX_*.access class file is generated in the package mentioned in the bindings.xml file. However when I introduced a second bindings file with a separate package mentioned in both bindings.xml files. The access classes for both bindings are generated in the package mentioned in the first bindings.xml. Thanks and Regards, Dickson Rodrigues On Fri, Apr 1, 2022 at 3:46 PM Archie Cobbs wrote: > Hi Dickson, > > On Fri, Apr 1, 2022 at 1:51 PM Dickson Rodrigues < > rodrigues.dick...@gmail.com> wrote: > >> Will you please take a look at the attached project and see why we >> get the access files generated in the billing package? I am using ant >> 1.9.14 and running it on mac. >> > > Hang on - the original problem was that JiBX was generating files in the > default package instead of the same package as the model classes. > > My suggestion was that by adding a missing "package" attribute to the > element, that would fix the problem, which - in my test at least > - it did. > > I never suggested that the converse was true, i.e., that by removing the > "package" attribute from the element that you would somehow cause > JiBX to not generate ANY files in the model package. > > In my experience JiBX almost always generates classes in the model > package, for reasons having to do with Java package-private accessibility. > > -Archie > > -- > Archie L. Cobbs > ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Dickson, On Fri, Apr 1, 2022 at 1:51 PM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Will you please take a look at the attached project and see why we get the > access files generated in the billing package? I am using ant 1.9.14 and > running it on mac. > Hang on - the original problem was that JiBX was generating files in the default package instead of the same package as the model classes. My suggestion was that by adding a missing "package" attribute to the element, that would fix the problem, which - in my test at least - it did. I never suggested that the converse was true, i.e., that by removing the "package" attribute from the element that you would somehow cause JiBX to not generate ANY files in the model package. In my experience JiBX almost always generates classes in the model package, for reasons having to do with Java package-private accessibility. -Archie -- Archie L. Cobbs ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Dickson, Happy to help. Of course now I'm curious what the key difference is... keep us posted. -Archie On Fri, Apr 1, 2022 at 11:08 AM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Hi Archie, > > Thanks a lot for your response and spending time on this. > > I created a new sample project just like you did and it worked for me as > well. However when I try the same configuration in my project it doesn't > seem to work. I will continue to debug and keep you posted on how it goes. > > Thanks again Archie!! > > Thanks and Regards, > Dickson Rodrigues > > > On Thu, Mar 31, 2022 at 4:10 PM Archie Cobbs > wrote: > >> Not sure why but I was unable to reproduce your issue using a slightly >> modified version of your files. >> >> Here's a shell script trace: >> >> $ tree >> . >> ├── binding.xml >> ├── build.xml >> ├── lib >> │ ├── jibx-bind-1.3.3.jar >> │ └── jibx-run-1.3.3.jar >> └── src >> └── java >> └── com >> └── blahblah >> └── model >> └── account >> ├── Account.java >> └── AccountResult.java >> >> 7 directories, 6 files >> $ cat build.xml >> >> >> >> >> >> >> >> >> >> > removeNotFollowedSymlinks="true" includeEmptyDirs="true"/> >> >> >> >> >> >compiler="modern" >>deprecation="true" >>srcdir="${basedir}/src/java" >>destdir="${basedir}/build/classes" >>source="1.8" >>target="1.8" >>debug="true"> >> >> >> >> >> >> > classpathref="test.classpath"/> >> >> >> >> >> >> >> >> >> >> >> >> $ cat binding.xml >> >> >> >> > class="com.blahblah.model.account.AccountResult"> >> >> > type="com.blahblah.model.account.Account" ordered="false"> >> >> > field="accountNumber" usage="optional"/> >> >> >> >> >> $ cat src/java/com/blahblah/model/account/AccountResult.java >> package com.blahblah.model.account; >> >> import java.util.ArrayList; >> import java.util.List; >> >> public class AccountResult { >> >> private List accounts; >> } >> $ cat src/java/com/blahblah/model/account/Account.java >> package com.blahblah.model.account; >> >> public class Account { >> >> private String idNumber; >> private String accountNumber; >> >> } >> $ ant >> Buildfile: /Users/archie/bugs/jibx/build.xml >> >> javac: >> [mkdir] Created dir: /Users/archie/bugs/jibx/build/classes >> [javac] Compiling 2 source files to >> /Users/archie/bugs/jibx/build/classes >> >> jibx-bind: >> >> BUILD SUCCESSFUL >> Total time: 0 seconds >> $ tree build >> build >> └── classes >> └── com >> └── blahblah >> └── model >> └── account >> ├── Account.class >> ├── AccountResult.class >> ├── JiBX_accountBindingAccountResult_access.class >> ├── JiBX_accountBindingFactory.class >> └── JiBX_accountBindingMungeAdapter.class >> >> 5 directories, 5 files >> $ >> >> -Archie >> >> >> >> -Archie >> >> On Thu, Mar 31, 2022 at 1:53 PM Dickson Rodrigues < >> rodrigues.dick...@gmail.com> wrote: >> >>> >>> Hi Archie, >>> >>> Thanks for responding. >>> >>> Please see the details below, >>> >>> Build.xml >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Jars included - >>> >>> ant-1.8.4.jar >>> ant-launcher-1.8.4.jar >>> bcel-6.4.1.jar >>> jibx-bind-1.3.3.jar >>> jibx-run-1.3.3.jar >>> joda-time-2.10.5.jar >>> xpp3-1.1.3.4.O.jar >>> jibx-extras-1.3.3.jar >>> >>> >>> Removed the old jibx jars from the lib directory >>> >>> binding file - >>> >>> >>> >> class="com.blahblah.model.account.AccountResult"> >>> >> factory="com.blahblah.model.account.AccountResult.listFactory"> >>> >> ordered="false"> >>> >>> >> usage="optional"/> >>> >>> >>> >>> >>> >>> >>> JiBX_accountBindingAccountResult_access.class is generated under package >>> com.blahblah.model.billing. Infact all the _access files for my bindings >>> are generated under the same package. Looks like it take the package name >>> from the first binding file. >>> >>> Please let me know if you need more information. >>> >>> >>> Thanks and Regards, >>> Dickson Rodrigues >>> >>> >>> On Thu, Mar 31, 2022 at 12:50 PM Archie Cobbs >>> wrote: >>> Can you create and post a *minimal* test case Maven project demonstrating the problem? On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Hi, > > I am facing the same issue as few others who have reported those here. > https://sourceforge.net/p/jibx/mailman/message/35070901/
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Archie, Thanks a lot for your response and spending time on this. I created a new sample project just like you did and it worked for me as well. However when I try the same configuration in my project it doesn't seem to work. I will continue to debug and keep you posted on how it goes. Thanks again Archie!! Thanks and Regards, Dickson Rodrigues On Thu, Mar 31, 2022 at 4:10 PM Archie Cobbs wrote: > Not sure why but I was unable to reproduce your issue using a slightly > modified version of your files. > > Here's a shell script trace: > > $ tree > . > ├── binding.xml > ├── build.xml > ├── lib > │ ├── jibx-bind-1.3.3.jar > │ └── jibx-run-1.3.3.jar > └── src > └── java > └── com > └── blahblah > └── model > └── account > ├── Account.java > └── AccountResult.java > > 7 directories, 6 files > $ cat build.xml > > > > > > > > > > removeNotFollowedSymlinks="true" includeEmptyDirs="true"/> > > > > > compiler="modern" >deprecation="true" >srcdir="${basedir}/src/java" >destdir="${basedir}/build/classes" >source="1.8" >target="1.8" >debug="true"> > > > > > > classpathref="test.classpath"/> > > > > > > > > > > > > $ cat binding.xml > > > > class="com.blahblah.model.account.AccountResult"> > > type="com.blahblah.model.account.Account" ordered="false"> > > field="accountNumber" usage="optional"/> > > > > > $ cat src/java/com/blahblah/model/account/AccountResult.java > package com.blahblah.model.account; > > import java.util.ArrayList; > import java.util.List; > > public class AccountResult { > > private List accounts; > } > $ cat src/java/com/blahblah/model/account/Account.java > package com.blahblah.model.account; > > public class Account { > > private String idNumber; > private String accountNumber; > > } > $ ant > Buildfile: /Users/archie/bugs/jibx/build.xml > > javac: > [mkdir] Created dir: /Users/archie/bugs/jibx/build/classes > [javac] Compiling 2 source files to > /Users/archie/bugs/jibx/build/classes > > jibx-bind: > > BUILD SUCCESSFUL > Total time: 0 seconds > $ tree build > build > └── classes > └── com > └── blahblah > └── model > └── account > ├── Account.class > ├── AccountResult.class > ├── JiBX_accountBindingAccountResult_access.class > ├── JiBX_accountBindingFactory.class > └── JiBX_accountBindingMungeAdapter.class > > 5 directories, 5 files > $ > > -Archie > > > > -Archie > > On Thu, Mar 31, 2022 at 1:53 PM Dickson Rodrigues < > rodrigues.dick...@gmail.com> wrote: > >> >> Hi Archie, >> >> Thanks for responding. >> >> Please see the details below, >> >> Build.xml >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Jars included - >> >> ant-1.8.4.jar >> ant-launcher-1.8.4.jar >> bcel-6.4.1.jar >> jibx-bind-1.3.3.jar >> jibx-run-1.3.3.jar >> joda-time-2.10.5.jar >> xpp3-1.1.3.4.O.jar >> jibx-extras-1.3.3.jar >> >> >> Removed the old jibx jars from the lib directory >> >> binding file - >> >> >> > class="com.blahblah.model.account.AccountResult"> >> > factory="com.blahblah.model.account.AccountResult.listFactory"> >> > ordered="false"> >> >> > usage="optional"/> >> >> >> >> >> >> >> JiBX_accountBindingAccountResult_access.class is generated under package >> com.blahblah.model.billing. Infact all the _access files for my bindings >> are generated under the same package. Looks like it take the package name >> from the first binding file. >> >> Please let me know if you need more information. >> >> >> Thanks and Regards, >> Dickson Rodrigues >> >> >> On Thu, Mar 31, 2022 at 12:50 PM Archie Cobbs >> wrote: >> >>> Can you create and post a *minimal* test case Maven project >>> demonstrating the problem? >>> >>> On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < >>> rodrigues.dick...@gmail.com> wrote: >>> Hi, I am facing the same issue as few others who have reported those here. https://sourceforge.net/p/jibx/mailman/message/35070901/ and https://sourceforge.net/p/jibx/mailman/message/35115289/ I have added the dependency jars, updated the classpath to include those jars. I have tried giving the package name in the bindings file as well. I am running out of ideas. Anyone have any suggestions? *To admins* : Will you please post this on the threads mentioned above (https://sourceforge.net/p/jibx/mailman/message/35070901/ and
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Not sure why but I was unable to reproduce your issue using a slightly modified version of your files. Here's a shell script trace: $ tree . ├── binding.xml ├── build.xml ├── lib │ ├── jibx-bind-1.3.3.jar │ └── jibx-run-1.3.3.jar └── src └── java └── com └── blahblah └── model └── account ├── Account.java └── AccountResult.java 7 directories, 6 files $ cat build.xml $ cat binding.xml $ cat src/java/com/blahblah/model/account/AccountResult.java package com.blahblah.model.account; import java.util.ArrayList; import java.util.List; public class AccountResult { private List accounts; } $ cat src/java/com/blahblah/model/account/Account.java package com.blahblah.model.account; public class Account { private String idNumber; private String accountNumber; } $ ant Buildfile: /Users/archie/bugs/jibx/build.xml javac: [mkdir] Created dir: /Users/archie/bugs/jibx/build/classes [javac] Compiling 2 source files to /Users/archie/bugs/jibx/build/classes jibx-bind: BUILD SUCCESSFUL Total time: 0 seconds $ tree build build └── classes └── com └── blahblah └── model └── account ├── Account.class ├── AccountResult.class ├── JiBX_accountBindingAccountResult_access.class ├── JiBX_accountBindingFactory.class └── JiBX_accountBindingMungeAdapter.class 5 directories, 5 files $ -Archie -Archie On Thu, Mar 31, 2022 at 1:53 PM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > > Hi Archie, > > Thanks for responding. > > Please see the details below, > > Build.xml > > > > > > > > > > > > > > > > > > > > > > > Jars included - > > ant-1.8.4.jar > ant-launcher-1.8.4.jar > bcel-6.4.1.jar > jibx-bind-1.3.3.jar > jibx-run-1.3.3.jar > joda-time-2.10.5.jar > xpp3-1.1.3.4.O.jar > jibx-extras-1.3.3.jar > > > Removed the old jibx jars from the lib directory > > binding file - > > > class="com.blahblah.model.account.AccountResult"> > factory="com.blahblah.model.account.AccountResult.listFactory"> > ordered="false"> > > usage="optional"/> > > > > > > > JiBX_accountBindingAccountResult_access.class is generated under package > com.blahblah.model.billing. Infact all the _access files for my bindings > are generated under the same package. Looks like it take the package name > from the first binding file. > > Please let me know if you need more information. > > > Thanks and Regards, > Dickson Rodrigues > > > On Thu, Mar 31, 2022 at 12:50 PM Archie Cobbs > wrote: > >> Can you create and post a *minimal* test case Maven project demonstrating >> the problem? >> >> On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < >> rodrigues.dick...@gmail.com> wrote: >> >>> Hi, >>> >>> I am facing the same issue as few others who have reported those here. >>> https://sourceforge.net/p/jibx/mailman/message/35070901/ and >>> https://sourceforge.net/p/jibx/mailman/message/35115289/ >>> I have added the dependency jars, updated the classpath to include those >>> jars. I have tried giving the package name in the bindings file as well. >>> >>> I am running out of ideas. Anyone have any suggestions? >>> >>> *To admins* : Will you please post this on the threads mentioned above ( >>> https://sourceforge.net/p/jibx/mailman/message/35070901/ and >>> https://sourceforge.net/p/jibx/mailman/message/35115289/) to see if >>> they were able to resolve the issue and can help me. >>> >>> Thanks and Regards, >>> Dickson Rodrigues >>> ___ >>> jibx-users mailing list >>> jibx-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jibx-users >>> >> -- >> Archie L. Cobbs >> ___ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> > ___ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > -- Archie L. Cobbs ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Hi Archie, Thanks for responding. Please see the details below, Build.xml Jars included - ant-1.8.4.jar ant-launcher-1.8.4.jar bcel-6.4.1.jar jibx-bind-1.3.3.jar jibx-run-1.3.3.jar joda-time-2.10.5.jar xpp3-1.1.3.4.O.jar jibx-extras-1.3.3.jar Removed the old jibx jars from the lib directory binding file - JiBX_accountBindingAccountResult_access.class is generated under package com.blahblah.model.billing. Infact all the _access files for my bindings are generated under the same package. Looks like it take the package name from the first binding file. Please let me know if you need more information. Thanks and Regards, Dickson Rodrigues On Thu, Mar 31, 2022 at 12:50 PM Archie Cobbs wrote: > Can you create and post a *minimal* test case Maven project demonstrating > the problem? > > On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < > rodrigues.dick...@gmail.com> wrote: > >> Hi, >> >> I am facing the same issue as few others who have reported those here. >> https://sourceforge.net/p/jibx/mailman/message/35070901/ and >> https://sourceforge.net/p/jibx/mailman/message/35115289/ >> I have added the dependency jars, updated the classpath to include those >> jars. I have tried giving the package name in the bindings file as well. >> >> I am running out of ideas. Anyone have any suggestions? >> >> *To admins* : Will you please post this on the threads mentioned above ( >> https://sourceforge.net/p/jibx/mailman/message/35070901/ and >> https://sourceforge.net/p/jibx/mailman/message/35115289/) to see if they >> were able to resolve the issue and can help me. >> >> Thanks and Regards, >> Dickson Rodrigues >> ___ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> > -- > Archie L. Cobbs > ___ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package
Can you create and post a *minimal* test case Maven project demonstrating the problem? On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Hi, > > I am facing the same issue as few others who have reported those here. > https://sourceforge.net/p/jibx/mailman/message/35070901/ and > https://sourceforge.net/p/jibx/mailman/message/35115289/ > I have added the dependency jars, updated the classpath to include those > jars. I have tried giving the package name in the bindings file as well. > > I am running out of ideas. Anyone have any suggestions? > > *To admins* : Will you please post this on the threads mentioned above ( > https://sourceforge.net/p/jibx/mailman/message/35070901/ and > https://sourceforge.net/p/jibx/mailman/message/35115289/) to see if they > were able to resolve the issue and can help me. > > Thanks and Regards, > Dickson Rodrigues > ___ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > -- Archie L. Cobbs ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users
Re: [jibx-users] JiBX 1.3.3
Hi Don, Just wanted to say thank you! I'm still using JiBX in several projects and it continues to work beautifully for my purposes. Glad it's going to continue to be usable for a long time. -Archie On Mon, Jan 27, 2020 at 10:09 AM Don Corley wrote: > JiBX 1.3.3 has been released. > > This release includes the following changes: > 1. Dependencies updated, such as joda-time and BCEL. > 2. maven-jibx-plugin has been renamed to jibx-maven-plugin to comply with > plugin naming rules. > 3. Compatibility with Java 6, 7, 8, 9, 10, 11, 12, and 13+. > > You can find the release file here: > https://sourceforge.net/projects/jibx/files/ > > Maven artifacts are available in maven central. > You can find the instructions on the JiBX site: > http://jibx.sourceforge.net/jibx-maven-plugin/index.html > > Enter your issues here: > https://github.com/jibx -> Issues > > Cheers! > > Don > ___ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > -- Archie L. Cobbs ___ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users