• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • 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
 
Police line, do not cross. Well, this tiny ad can go through:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic