• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Confused with JAXB, Context path

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I"m new to jaxb and i'm using j2sdk 1.4.2_06, My task is to refer an xsd and use my own java object filled with values to its properties and generate an xml.

I'm confused with the context path param in the below method.

JAXBContext.newInstance( �com.acme.foo:com.acme.bar� );

How am i suppose to generate jaxb.propertise file ? and what am i refering to from the context path ? Please help

Thanks
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In the following code:


the com.acme.foo:com.acme.bar is the name of the Class package. This class package contains the classes generated by the JAXB compiler to handle the objects created during marshalling/unmarshalling.

I guess you are not supposed to generate the jaxb.properties file. If you are seeing a error which says "jaxb.properties file not found", then probably your jaxb related JAR files are not in the system classpath or the application server classpath. I would recommend copy the JAR files to the lib folder of the application server and then restart the application server and try executing your code.

Let me know if it works for you.

Ritesh
 
reply
    Bookmark Topic Watch Topic
  • New Topic