hi,
I have several mappings in our JiBX application which we access by binding
Name.
I have got the following Exception
org.jibx.runtime.JiBXException: Unable to access binding information for
class entity.businessDomain.letter.Letter
Make sure classes generated by the binding compiler are available at
runtime
Unable to access binding information for class
entity.businessDomain.letter.Letter
Make sure classes generated by the binding compiler are available at
runtime
java.lang.ClassNotFoundException:
entity.businessDomain.letter.JiBX_CBP_B1Factory
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at
org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.java:104)
at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:178)
at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:197)
at
entity.businessDomain.letter.generation.xml.XmlBinding.toXml(XmlBinding.java:28)
at
entity.businessDomain.letter.generation.LetterCreationService.printLetters(LetterCreationService.java:95)
at
entity.businessDomain.letter.generation.LetterCreationService.run(LetterCreationService.java:68)
at java.lang.Thread.run(Thread.java:595)
entity.businessDomain.letter.Letter is the class for which i have written
the binding file.
CBP_B1 is the name of the binding. The thing to note here is that I have
successfully marshallled another object using the same binding in the same
run.
But it failed for a perticular object with ClassNotFoundException. I also
checked the jar files for the class
entity.businessDomain.letter.JiBX_CBP_B1Factory
and it appears in there.
One more thing I am doing is , I am using 5 threads at a time to pick
Letter Objects from a BlockingQueue and then Marshall them. The
marshalling code
is not synchronised.
The method i Use for Marshalling is
public static void toXml(ILetter letter, String bindingName, Writer wr,
String path) throws JiBXException, IOException {
IBindingFactory bfact = BindingDirectory.getFactory
(bindingName,
Letter.class);
IMarshallingContext mctx =
bfact.createMarshallingContext();
mctx.setOutput(wr);
mctx.startDocument("UTF-8", null);
mctx.setIndent(4);
mctx.getXmlWriter().writeDocType("letter_requests", path,
null, null);
mctx.marshalDocument(letter);
}
Is JiBX Marshalling Threadsafe?
Is that something which might be causing the problem. I can not think of
any reason why a ClassNotFoundException should be thrown when it is in the
classpath.
Also When in other cases it has been successfully marshalled using the
same binding, in the same run.
We desparately need to find the problem. Any ideas will be a great help.
I hope i have covered all the information, if you need more please let me
know.
thaanks & regards,
Jaideep Deshmukh
Senior J2EE Developer
e: mailto:jdeshm...@closepf.com
w: http://www.closepf.com
CLOSE PREMIUM FINANCE
21st Floor, Tolworth Tower
Ewell Road, Tolworth
Surbiton, Surrey KT6 7EL
United Kingdom
This message (including any attachments) is confidential and may be privileged.
If you have received it by mistake please notify the sender by return e-mail
and delete this message from your system. Any unauthorised use or dissemination
of this message in whole or in part is strictly prohibited. Please note that
e-mails are susceptible to change. Close Premium Finance shall not be liable
for the improper or incomplete transmission of the information contained in
this communication nor for any delay in its receipt or damage to your system.
Close Premium Finance does not guarantee that the integrity of this
communication has been maintained nor that this communication is free of
viruses, interceptions or interference.
Close Premium Finance, Registered in England and Wales, Registered Office: 10
Crown Place, London, EC2A 4FT. Authorised and regulated by the Financial
Services Authority
Close Brothers Limited and Close Premium Finance (Ireland) Ltd trading as Close
Premium Finance Ireland are authorised and regulated by the Financial Services
Authority in the UK, Registered Office: 10 Crown Place, London, EC2A 4FT.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users