Dennis, Thanks for your reply. I am sure that I have just one class I am working with. I just run the search. Any other ideas how to resolve it? I can actually see the added methods to the class from the jdeveloper but when I run it I get that error? I have spend couple of days trying to resolve it. What would be your suggestion on correct approach? Thanks. robert
-----Original Message----- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 12:21 AM To: Robert Augustyn Cc: [EMAIL PROTECTED] Subject: Re: [jibx-users] nable to access binding information, after successful binding? This has happened before for a developer (I think also using JBuilder, though I can't find the email) when they actually had two sets of classes they were working with due to different classpaths. One set of classes were modified by the binding compiler, but not the set they were actually trying to run. I'd strongly suspect the same thing is happening for you. - Dennis Robert Augustyn wrote: > Hi, > I am not able to get the simplest test to work :( and would appreciate > your help. > I am able to successfully bind and then when I run test it fails on > > ibf = BindingDirectory.getFactory(bin,target); > > What gives? I must be doing something fundamentally wrong but I have > searched the list and did not find anything on the subject. > > I know that methods got successfully added to the class .... > > Thanks for taking the time ... > > this is an error: > Unable to access binding information for class com.unisys.tmp.Customer > > org.jibx.runtime.JiBXException: Unable to access binding information > for class com.unisys.tmp.Customer > Root cause: java.lang.NoSuchFieldException: JiBX_bindingList > > at > org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:107) > > at com.unisys.tmp.Test.main(Test.java:16) > > Caused by: java.lang.NoSuchFieldException: JiBX_bindingList > > at java.lang.Class.getField0(Class.java:1735) > .... > > > Source of my test.java > > IBindingFactory ibf = null; > > Class target = com.unisys.tmp.Customer.class; > > Customer cust = new Customer(); > > String bin = > "H:\\jdev905\\jdev\\mywork\\Workspace1\\jix\\classes\\com\\unisys\\tmp\\ binding.xml"; > > try { > > ibf = BindingDirectory.getFactory(bin,target); > > IUnmarshallingContext uctx = ibf.createUnmarshallingContext(); > > Object obj = uctx.unmarshalDocument(new FileInputStream( > > "H:\\jdev905\\jdev\\mywork\\Workspace1\\jix\\classes\\com\\unisys\\tmp > \\data.xml"), > > null); > > if (!target.isInstance(obj)) { > > System.err.println("Unmarshalled result not expected type"); > > } > > } catch (JiBXException ex1) { > > System.err.println(ex1.getMessage()); > > } > > <binding> > > <mapping name="customer" class="com.unisys.tmp.Customer"> > > <value name="first-name" field="firstName"/> > > <value name="last-name" field="lastName"/> > > </mapping> > > </binding> > > > > <customer> > > <first-name>John</first-name> > > <last-name>Smith</last-name> > > </customer> > > package com.unisys.tmp; > > public class Customer { > > public String firstName; > > public String lastName; > > } > > Buildfile: H:\jdev905\jdev\mywork\Workspace1\jix\src\build1.xml > [bind] Using the following paths: > [bind] H:\jdev905\jdev\mywork\Workspace1\jix\classes > [bind] H:\jdev905\java\jibx\lib\jibx-run.jar > [bind] Using the following binding paths: > [bind] com/unisys/tmp/binding.xml > [bind] binding com_unisys_tmp_binding: > [bind] context (mp#=1) (cv#=0) (fm#=0) > [bind] mapping class com.unisys.tmp.Customer to element customer > [bind] element wrapper customer > [bind] object binding for com.unisys.tmp.Customer > [bind] structure ordered > [bind] element first-name from property firstName > (java.lang.String) > [bind] element last-name from property lastName > (java.lang.String) > [bind] > [bind] Wrote 3 files > [bind] > [bind] com.unisys.tmp.Customer output file size is 2570 bytes > [bind] Found 6 methods: > [bind] void marshal > [bind] void unmarshal > [bind] int JiBX_getIndex > [bind] com.unisys.tmp.Customer > JiBX_com_unisys_tmp_binding_newinstance_1_0 > [bind] void JiBX_com_unisys_tmp_binding_unmarshal_1_0 > [bind] void JiBX_com_unisys_tmp_binding_marshal_1_0 > [bind] > [bind] com.unisys.tmp.JiBX_com_unisys_tmp_bindingCustomer_access > output file size is 1927 bytes > [bind] Found 4 methods: > [bind] void marshal > [bind] java.lang.Object unmarshal > [bind] boolean isPresent > [bind] boolean isExtension > [bind] > [bind] com.unisys.tmp.JiBX_com_unisys_tmp_bindingFactory output > file size is 1539 bytes > [bind] Found 3 methods: > [bind] org.jibx.runtime.IBindingFactory getInstance > [bind] org.jibx.runtime.IMarshallingContext > createMarshallingContext > [bind] org.jibx.runtime.IUnmarshallingContext > createUnmarshallingContext > [bind] > [bind] Kept 0 files unchanged: > [bind] > [bind] Deleted 0 files: > > __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
