Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:49:48+00:00 2026-06-03T09:49:48+00:00

I managed to bind the files generated through an XSD successfully and i got

  • 0

I managed to bind the files generated through an XSD successfully and i got the following files in my dir

C:\jibx\tutorial\example25>dir
Volume in drive C is WINDOWS
Volume Serial Number is 1C8F-663E

Directory of C:\jibx\tutorial\example25

05/06/2012  07:12 PM    <DIR>          .
05/06/2012  07:12 PM    <DIR>          ..
05/06/2012  07:12 PM             3,313 Address.class
05/06/2012  07:08 PM             3,447 Address.java
05/06/2012  07:10 PM             2,912 binding.xml
05/06/2012  07:12 PM             2,516 Customer.class
05/06/2012  07:08 PM             1,763 Customer.java
05/06/2012  07:12 PM             2,582 Item.class
05/06/2012  07:08 PM             1,878 Item.java
05/06/2012  07:12 PM             2,529 JiBX_bindingFactory.class
05/06/2012  07:12 PM             2,384 JiBX_bindingMungeAdapter.class
05/06/2012  07:12 PM             2,490 JiBX_bindingOrder_access.class
05/06/2012  07:12 PM             7,539 Order.class
05/06/2012  07:09 PM             4,869 Order.java
05/06/2012  07:11 PM             1,034 Shipping.class
05/06/2012  07:09 PM               879 Shipping.java
05/06/2012  12:22 AM             5,137 starter.xsd
          15 File(s)         45,272 bytes
           2 Dir(s)  160,023,375,872 bytes free

Now i copied these files into a newly created JAVA project in eclipse , created a package called example25 in that project and pasted those files there
I then used the following code and ran it in the debug mode

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.Iterator;

import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IMarshallingContext;
import org.jibx.runtime.IUnmarshallingContext;
import org.jibx.runtime.JiBXException;
import example25.*;


public class Test
{

public static void main(String[] args)
{

        try
        {

            // unmarshal customer information from file
            IBindingFactory bfact = BindingDirectory.getFactory(Order.class);
            IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
            FileInputStream in = new FileInputStream("D:\\Java Libraries\\jibx\\dwcode2\\starter.xml");
            Order order = (Order)uctx.unmarshalDocument(in, null);

            // compute the total amount of the order
            float total = 0.0f;
            for (Iterator<Item> iter = order.getItemList().iterator(); iter.hasNext();)
            {
                Item item = iter.next();
                total += item.getPrice() * item.getQuantity();
            }
            order.setTotal(new Float(total));

            // marshal object back out to file (with nice indentation, as UTF-8)
            IMarshallingContext mctx = bfact.createMarshallingContext();
            mctx.setIndent(2);
            FileOutputStream out = new FileOutputStream("c:\\out.xml");
            mctx.setOutput(out, null);
            mctx.marshalDocument(order);
            System.out.println("Processed order with " +  order.getItemList().size() + " items and total value " + total);

        }
        catch (FileNotFoundException e)
        {
            e.printStackTrace();
            System.exit(1);
        } catch (JiBXException e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }

}//end main

I get the following error after the execution of the first statement

Unable to access binding information for class example25.Order
Make sure the binding has been compiled
java.lang.NoSuchFieldException: JiBX_bindingList
at java.lang.Class.getDeclaredField(Unknown Source)
at org.jibx.runtime.BindingDirectory.getBindingList(BindingDirectory.java:68)
at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:211)
at Test.main(Test.java:24)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:49:49+00:00Added an answer on June 3, 2026 at 9:49 am

    Rajesh,

    The files that you show in that directory mean you did everything correctly!

    The mistake you made was to use eclipse, since eclipse automatically compiles the source code files again (without the binding information you added in the binding step)

    Try running the Test.class file with the class files you generated in the first step.

    Your java command should be something like this:

    java -cp C:\directorywithtestclass;C:\jibx\tutorial Test
    

    Don

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I managed to get authentication to work by following the tutorial from this page
I have successfully managed to bind images stored in Isolated Storage to Image elements
In my JS I have the following ajax call, that bind the resulting json
Has anyone managed to bind a DataNavigator and a DataGrid using the DataSource property
I've got a java.util.List bind to a JTable, if I want to refresh the
The Managed Extensibility Framework (MEF) and Managed AddIn Framework (MAF, aka System.AddIn) seem to
I managed to get some help from a previous question and I have the
Does managed C++ have an equivalent to C#'s lock() and VB's SyncLock? If so,
I managed to show the output of a shell command in TextArea of flex
I managed to get the YUI calendar widget working fine. But When it displays

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.