I am trying to create a sample test application which converts an object to JaxbRepresentation. But when I try to run this, it gives me an error.
Main.java file
Use the complete package name of the where the ObjectFactory class is present to declare and instantiate the Object.
To get rid of additional jaxb.index files you may use Java class to instantiate the context:
http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/JAXBContext.html#newInstance(java.lang.Class...)
Usually you need to pass in only single java class because other classes are "statically reachable from these class(es)" so JAXB is able to identify them.