Dennis Sosnoski wrote:
In the process of adding a FAQ for this I realized the information I gave in this was not accurate for JiBX_MungeAdapter.class. This should be going into the package of the first <mapping> class processed, providing that class is modifiable (a .class file, not part of a .jar) and not an interface. If the first <mapping> class is from a .jar file, or is an interface, it'll be generated in the empty package, which would probably go into the working directory.
Does that explain what you're seeing?
- Dennis
Following is a snippet from the doc for "binding"
package - Java package used for created binding factory class. By default this is the same package as the class associated with the first *mapping* child element. If present, the value must be a Java package name (as in "org.jibx.runtime").
I specified package in two binding files and it complained. The situation was binding file A dealt with class in a package X in working directory M (binding package spec="X"), file B dealt with classes in package Y in working directory M and a package Z in working directory N (binding package spec="Y"). The complain was that Factory class for the second binding could not be found in directory N/Y. However, if I remove the package spec in the second binding file, things worked fine. Is this something that I am messing up? Or an issue in JiBX?
- Venkatesh
Dennis Sosnoski wrote:
You can specify the package to be used for the generated classes with the package="..." attribute of the <binding> element. Let me know if this doesn't work properly for you.
This seems to be a FAQ, now, so I'll add it to the list.
- Dennis
Venkatesh Prasad Ranganath wrote:
Hi,
I have 2 packages that contains JiBX-handled classes. However, the classes in package A are public but the classes in package B are package-private. I execute jibx compiler with 2 binding files (one for each package). If the working directory during compilation was that of B, everything works fine at runtime. If the working directory was that of package B, then I see an IllegalAccessError when classes in B are accessed by JiBX_MungeAdapter. The reason being that only one JiBX_MungeAdapter class is generated and it happens to be generated in the compilation directory. Can I generate JiBX_MungeAdapter in each package that contains a JiBX-handled class during one compilation? If so, how? Also, how do I accomplish this from within Ant? If not, it would be great to provide such a switch in the compiler. This way the access specifiers of the class need not altered just for the purpose of using JiBX.
In case, any or all of my analysis is wrong, please do correct me.
waiting for reply,
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
