Where to find javax.xml.bind and javax.jdo

One of my application require import javax.xml.bind and javax.jdo packages. I could not find them. Someone can help to let me know where to download them or they come with some other toll\packages?
Thanks
John

Hi John ,
I have the same problem: Getting the javax.jdo Packge . . . .(WHERE ?)
if you found out ow already, please tell me at: [email protected]
thanks,
edan

Similar Messages

  • Unable to resolve "javax.xml.bind.InvalidAttributeException"

    Hi all,
    Iam facing a problem with my jaxb
    the compiler is able to identify " javax.xml.bind.Marshaller" but it is not able to identify "javax.xml.bind.MissingContentException ","avax.xml.bind.PredicatedLists ","javax.xml.bind.InvalidContentObjectException ","javax.xml.bind.LocalValidationException "
    Im using "jwsdp-1.5" and have set the classpath , could i please be known as to why im facing this problem. when i unjar and check the jaxb file i can find the "Marshaller" class file but i could not see the remaining which i mentioned above.
    can anyone tell me as to which version of jaxb should i use?
    this is very very urgent, any help in this matter is highly appreciated.
    Thanks in advance.

    Hi John ,
    I have the same problem: Getting the javax.jdo Packge . . . .(WHERE ?)
    if you found out ow already, please tell me at: [email protected]
    thanks,
    edan

  • Compiler can not find javax.xml.bind package classes

    Hi
    I have quite simple (I hope) problem. I'm trying to run some jaxb example but when I try to compile it I get:
    Test.java:20: package javax.xml.bind does not exist
    import javax.xml.bind.JAXBContext;
                          ^
    Test.java:21: package javax.xml.bind does not exist
    import javax.xml.bind.Marshaller;
                          ^
    Test.java:22: package javax.xml.bind does not exist
    import javax.xml.bind.Unmarshaller;
                          ^
    Test.java:23: package javax.xml.bind does not exist
    import javax.xml.bind.Validator;
                          ^I added to my classpath all packages I found to have anything in common with jaxb:
    jaxb-api.jar
    jaxb-xjc.jar
    jaxb-ri.jar
    jaxb.libs.jar
    jaxp-api.jar
    sax.jar
    dom.jar
    xercesImpl.jar
    xalan.jar
    jax-qname.jar
    namespace.jar
    All of those are taken from jwsdp-1.6
    Any ideas?
    ania

    Add the following .jar files to the CLASSPATH variable.
    <JWSDP>/jaxb/lib/jaxb-api.jar
    <JWSDP>/jaxb/lib/jaxb-impl.jar
    <JWSDP>/jaxb/lib/jaxb-libs.jar
    <JWSDP>/jaxb/lib/jaxb-xjc.jar
    <JWSDP>/jwsdp-shared/lib/namespace.jar
    <JWSDP>/jwsdp-shared/lib/jax-qname.jar
    <JWSDP>/jwsdp-shared/lib/relaxngDatatype.jar
    <JWSDP> is the directory in which Java Web Service Developer Pack 1.5 is installed.

  • Problem testing WebMethod. Throwing javax.xml.bind.JAXBException

    Hi guys,
    Another Newbie.
    Specifications:
    NetBeans5.5
    Sun App Server 9.0_01 (build b02-p01)
    MySQL
    Problem: Not able to test run the Webmethod with webparams.
    I have an entity class with some methods as shown below
    public class Country {
        private Integer countryID;
        private ServerDatabaseInteraction di;
        private String countryName;
        /** Creates a new instance of Country */
        public Country(ServerDatabaseInteraction di) {
            this.di = di;
         * Creates a new instance of Country with the specified values.
         * @param countryID the countryID of the Country
        public Country(Integer countryID) {
            this.countryID = countryID;
         * Creates a new instance of Country with the specified values.
         * @param countryID the countryID of the Country
         * @param countryName the countryName of the Country
        public Country(Integer countryID, String countryName, ServerDatabaseInteraction di) {
            this.di = di;
            this.countryID = countryID;
            this.countryName = countryName;
         * Gets the countryID of this Country.
         * @return the countryID
        public Integer getCountryID() {
            return this.countryID;
         * Sets the countryID of this Country to the specified value.
         * @param countryID the new countryID
        public void setCountryID(Integer countryID) {
            this.countryID = countryID;
         * Gets the countryName of this Country.
         * @return the countryName
        public String getCountryName() {
            return this.countryName;
         * Sets the countryName of this Country to the specified value.
         * @param countryName the new countryName
        public void setCountryName(String countryName) {
            this.countryName = countryName;
        public void insert() throws SQLException {
            di.update("INSERT INTO Country (CountryName) VALUES ('"+getCountryName()+"')");
        public ArrayList list() throws SQLException {
            ArrayList queryAL = new ArrayList();
            ResultSet rs = di.queryToResultSet("SELECT CountryID, CountryName FROM Country");
            while(rs.next()) {
                String temp = rs.getInt(1)+"#"+rs.getString(2);
                queryAL.add(temp);
             return queryAL;
    }    then I created a Web service having two methods as follows
    @WebService
    public class CountryWS {
        ServerDatabaseInteraction di;
        Country country;
        public CountryWS() {
            try {
                di = new ServerDatabaseInteraction();
            } catch (Exception ex) {
                ex.printStackTrace();
            country = new Country(di);
         * Web service operation
        @WebMethod
        public ArrayList listPKobjects() {
            try {
                return country.list();
            } catch (SQLException ex) {
                ex.printStackTrace();
                return null;
         * Web service operation
        @WebMethod
        public String insert(@WebParam(name = "CountryName") String CountryName) {
            // TODO implement operation
            country.setCountryName(CountryName);
            try {
                country.insert();
                return "Inserted";
            } catch (SQLException ex) {
                ex.printStackTrace();
                return "Insert Failed";
    }Now the problem is Im able to test (by right clicking on webservice from IDE) the webmethod listPKObjects but not the insert method. only difference is the second one is having webparms.
    the log shows as follows..
    CountryName is not a valid property on class myhost.fli.ws.jaxws.Insert
    javax.xml.bind.JAXBException: CountryName is not a valid property on class myhost.fli.ws.jaxws.Insert
         at com.sun.xml.ws.encoding.EncoderDecoderBase.getRawAccessor(EncoderDecoderBase.java:128)
         at com.sun.xml.ws.encoding.EncoderDecoderBase.getWrapperChildValue(EncoderDecoderBase.java:81)
         at com.sun.xml.ws.encoding.soap.EncoderDecoder.fillData(EncoderDecoder.java:78)
         at com.sun.xml.ws.encoding.soap.ServerEncoderDecoder.toMessageInfo(ServerEncoderDecoder.java:97)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:209)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:573)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:147)
         at com.sun.xml.ws.server.Tie.handle(Tie.java:90)
         at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:195)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.bind.JAXBException: CountryName is not a valid property on class myhost.fli.ws.jaxws.Insert
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:816)
         at com.sun.xml.ws.encoding.EncoderDecoderBase.getRawAccessor(EncoderDecoderBase.java:124)
         ... 34 moreCan't find a reason, why one webmethod is working and the other one is not.
    Any help would be much appriciated.

    I'm encountering the same problem, but it's very inconsistent. I've got three web services that I'm deploying. If I clean, rebuild, and redeploy, then different combinations of the three throw this error.
    My specifications:
    NetBeans 6.0
    GlassFish v2
    Oracle 10g
    In browsing around online, I came across the following link which suggested to me that this issue is known and is being addressed.
    https://jax-ws.dev.java.net/issues/show_bug.cgi?id=419
    I discovered that the reason that I was getting this error was because my web services all had the same operation names. When I renamed my operations in each service so that they had different names, this fixed the problem.
    Hope this helps!
    - Erich Musick

  • XML error "java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext"

    Hi Experts,
    We are developing a WebDynpro for java application in NWDI for XML File Uploading, we have followed the below given process for that
    1) Created one XSD as per the client table structure.
    2) Developed one java webserver for the XSD file using jwsdp1.6
    3) Copied that generated folder in WebDynpro application
    4) Included all the required JAX-B jars as External jar files
    5) Finally Compiles the application
    When running the application it is throwing the below exception
    500 Internal Server Error   Web Dynpro Container/SAP J2EE Engine/6.40     
    Failed to process request. Please contact your system administrator.
    Error Summary 
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause    
    The initial exception that caused the request to fail, was:
    java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
    at com.ae.energy.scm.wdp.InternalXMLFileUpload.<init>(InternalXMLFileUpload.java:403)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    We checked entire application to ensure all the required files included, Could you please give us the cause for this exception and please explain us the solution to resolve it.
    We are very thankful for all the people who can give their support in resolving this issue.
    Thanks in advance,
    Sandeep Bonam

    Hi Sandeep,
    If you are following DC developemnt for your project, then adding the required JAR files as External Jars will not suffice.
    As at deployment, these "External Jars" are not considered.
    You will need to create and External Library project, for incorporating the required jars.
    For creation and use of External Library Project kindly follow Valery's blog:
    /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
    Hope it Helps.
    Regards,
    Alka.

  • Package javax.servlet.* and javax.xml.rpc.*

    Which jar file(s) in Oracle WebLogic Server 10.3 contain these two packages: package javax.servlet.* and javax.xml.rpc.*? Where are they located? Thanks

    I don't have access to my WLS installation right now, but normally I use a class finder utility like this one to answer questions like this:
    http://www.inetfeedback.com/jarscan/

  • Jaxb with weblogic -- java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement

    I am trying to use jaxb with Weblogic 6.1. I kept both the jaxb jar file in weblogic
    classpath in setEnv script. I am getting the following error, when I am trying
    to use jaxb
    java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement
    I tried other options also like coping both jar file in jre/ext dir but then I
    got security error.
    I will appreciate if someone in this newsgroup comments or suugest some solution.
    Thanks
    Jeewan

    On 06 Aug 2002, Jeewan wrote:
    >
    I am trying to use jaxb with Weblogic 6.1. I kept both the jaxb jar
    file in weblogic classpath in setEnv script. I am getting the
    following error, when I am trying to use jaxb
    java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement
    I tried other options also like coping both jar file in jre/ext dir
    but then I got security error.
    I will appreciate if someone in this newsgroup comments or suugest
    some solution. Put the jaxb jar file in in your webapp's WEB-INF/lib directory and it
    should work fine.
    Barry

  • Problem with JAXB Unmarshall - javax.xml.bind.UnmarshalException

    Hi,
    I'm getting an expection while unmarshalling using JAXB. The error is as follows :
    DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"http://www.etrade.com/ee/systemdomainao/search", local:"Context_Id"). Expected elements are <{}contextId>,<{}predicateInterceptor>,<{}isDefaultsearch>,<{}implicitContextSQL>,<{}contextName>,<{}searchId>,<{}implicitContextText>
    I've generated JAXB classes using xjc command from my schema. The root element is Search object which has a List of Searchcontext and Columlist object. When I'm trying to unmarshall the XML, I'm getting the above exception. What is baffling, if I comment out the <tns:SearchContext> entry from the XML, unmarshall doesn't throw any exception and populates the columnlist properly. Columnlist and Searchcontext have little difference except that columnlist contains more elements.
    Here'e the unmarshall code,
    URL metadataURL = this.getClass().getClassLoader().getResource("metadata/search/PARTICIPANT.xml");
    JAXBContext jc = JAXBContext.newInstance("com.etrade.ee.systemdomainao.search.domain");
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
    Search search = (Search)unmarshaller.unmarshal(metadataURL);
    Any pointers will be highly appreciated.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    XSD :
    XSD :
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.etrade.com/ee/systemdomainao/search" targetNamespace="http://www.etrade.com/ee/systemdomainao/search" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <!-- Searchcontext type definition -->
         <xs:complexType name="Searchcontext">
              <xs:sequence>
                   <xs:element name="Context_Id" type="xs:int"/>
                   <xs:element name="Search_Id" type="xs:string"/>
                   <xs:element name="Context_Name" type="xs:string"/>
                   <xs:element name="Implicit_Context_SQL" nillable="true">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Implicit_Context_Text" nillable="true">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Is_Defaultsearch" type="xs:boolean" nillable="true"/>
                   <xs:element name="Predicate_Interceptor" type="xs:string" nillable="true"/>
              </xs:sequence>
         </xs:complexType>
         <!-- Searchlist type definition -->
         <xs:complexType name="Columnlist">
              <xs:sequence>
                   <xs:element name="Columnlist_Id" type="xs:int"/>
                   <xs:element name="Search_Id" type="xs:string"/>
                   <xs:element name="Is_Quicksearchable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Advancesearchable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Quicksearchview" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Fullview" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Sortable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Defaultsort" type="xs:boolean" nillable="true"/>
                   <xs:element name="Default_SortOrder" type="xs:string" nillable="true" minOccurs="0"/>
                   <xs:element name="Display_Order" type="xs:int" nillable="true"/>               
                   <xs:element name="Default_Value" type="xs:string" nillable="true" maxOccurs="6"/>
                   <xs:element name="Default_Operator" type="xs:string" nillable="true"/>
                   <xs:element name="Is_Closedset" type="xs:boolean"/>
                   <xs:element name="Closedset_List_Name" type="xs:string" nillable="true"/>
                   <xs:element name="Is_RelatedMenu" type="xs:boolean" minOccurs="0"/>
                   <xs:element name="Column_Name" type="xs:string"/>
                   <xs:element name="Display_Name" type="xs:string"/>
                   <xs:element name="Is_UDF" type="xs:boolean" nillable="true"/>
                   <xs:element name="Table_Name" type="xs:string"/>
                   <xs:element name="Data_Type" type="xs:string"/>
                   <xs:element name="Column_Size" type="xs:int"/>
              </xs:sequence>
         </xs:complexType>
         <!-- Search declaration -->
         <xs:element name="Search">
              <!--<choice>
         <xs:interface name="java.io.Serializable" />
         </choice>-->
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Search_Id" type="xs:string"/>
                        <xs:element name="Schema_Set">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:maxLength value="20"/>
                                       <xs:minLength value="1"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="SearchContext" type="tns:Searchcontext" maxOccurs="unbounded"/>
                        <xs:element name="ColumnList" type="tns:Columnlist" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
              <xs:key name="Search_PrimaryKey_1">
                   <xs:selector xpath="."/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:key>
              <xs:keyref name="Searchcontext_ForeignKey_1" refer="tns:Search_PrimaryKey_1">
                   <xs:selector xpath=".//tns:SearchContext"/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:keyref>
              <xs:keyref name="Columnlist_ForeignKey_2" refer="tns:Search_PrimaryKey_1">
                   <xs:selector xpath=".//tns:ColumnList"/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:keyref>
              <xs:key name="Searchcontext_PrimaryKey_1">
                   <xs:selector xpath=".//tns:SearchContext"/>
                   <xs:field xpath="tns:Context_Id"/>
              </xs:key>
              <xs:key name="Columnlist_PrimaryKey_1">
                   <xs:selector xpath=".//tns:ColumnList"/>
                   <xs:field xpath="tns:Columnlist_Id"/>
              </xs:key>
         </xs:element>
    </xs:schema>

  • How do I marshall a list using javax.xml.bind.annotation?

    Hopefully this is so simple a cave man could do it.
    I had to remove the Duke Stars for the time being. I found another bug in the program that may have resulted in my array being empty.
    I'm trying to marshall a standalone document of my DeckImpl class. It is a deck of cards of course. It contains an array of CardImpl objects that need to be marshalled too. I could not figure out how to marhall the array so I have a marshall(Marshaller m) method that will
    initialize the List (see below) with an ArrayList. I figured the marshaller would do the rest but I just get the declaration and a closed <DECK />tag with the correct attributes (see way below) when I comment out the @XmlElementWrapper, or a DECK root node that simply contains a closed <CARDS /> tag with the line enabled. You can see tha CardImpl class is annotated too.
    I must be missing something obvious. Please help.
    @XmlRootElement(name = "DECK")
    @XmlType(name = "DECK")
    public class DeckImpl implements Comparable<DeckImpl> {
        @XmlAttribute
        public int id;
        @XmlAttribute
        public boolean isShuffled;
        @XmlAttribute
        public boolean isCut;
        public CardImpl[] cards;
        @XmlElementWrapper(name="CARDS")
        @XmlElements(@XmlElement(name="CARD",type=CardImpl.class))
        public List<CardImpl> CARDS;
        private static JAXBContext context;
        private static Marshaller marshaller;
    public DeckImpl(int id, boolean isCut, boolean isShuffled,
                CardImpl[] cards) {
            this.id = id;
            this.isShuffled = isShuffled;
            this.isCut = isCut;
            this.cards = cards;
            try {
                context = JAXBContext.newInstance(DeckImpl.class);
                marshaller = context.createMarshaller();
            } catch (JAXBException ex) {
                Logger.getLogger(CardImpl.class.getName()).log(Level.SEVERE, null, ex);
    //... class code goes here
    /** Generates XML representation of a deck
         * @param writer
         * @throws javax.xml.bind.JAXBException
        public void marshall(Writer writer) throws JAXBException {
            CARDS = new ArrayList<CardImpl>(cards.length);
            for (CardImpl i : cards) {
                CARDS.add(i);
            marshaller.marshal(this, writer);
    @XmlType(name = "CARD")
    public class CardImpl implements Comparable<CardImpl> {
        @XmlElement(name = "NAME")
        public String name;
        @XmlElement(name = "SUIT")
        public String suit;
        @XmlAttribute
        public int value;
        @XmlAttribute
        public int pointValue;
    //... class code
    }The output is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><DECK isCut="false" isShuffled="true" id="1"/>Regards,
    Bill
    Edited by: bthayer on Jan 24, 2009 7:15 AM
    Edited by: bthayer on Jan 25, 2009 7:02 AM

    There's a bit in here on marshalling.
    http://java.sun.com/webservices/docs/1.4/tutorial/doc/index.html
    Problem with JAXB (and I could be wrong - try posting on the Web Services / XML forum) is that you can only marshal the generated classes. This may mean that you need to create the object, and populate it using the setter / getter methods.
    Castor is much more friendly for this as it can marshall objects using reflections. You may also want to look into XMLBeans (which I have no exp of)

  • How do I install javax.xml.bind...

    Hi,
    I'm kind of a beginner in the java world and I have some serious problems when I'm trying to use JAXB.
    I have downloaded JDK 1.5.0_6, Java WebServices Dev Kit 2.0 and when I try to run a simple example I receive these compiler errors:
    package javax.xml.bind does not exist
    package javax.xml.marshall does not exist......etc.
    What do I do wrong. I've tried for 2 days to get this @#$ example to work, can someone help me out please.
    Thanks

    javax.xml.bind couldn't have been around in 2002, so i'm not sure what is wrong w/ that tutorial.
    What I want to do is to create XML data and read and
    write it from a file. What is the best way to do
    this??You don't need JAXB or binding for this, although it probably can be used for this as well. What you probably need is JAXP, such as SAX or DOM APIs.
    I've read about about JAXP in the past in J2EE 1.4 Tutorial:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/J2EETutorial.pdf.
    You may want to read up on SAX and DOM there or in another one. I forgot a lot of the stuff, but this should get you started on SAX:
    public static void main(String argv[])
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new Echo();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler );
    } catch (Throwable t) {
    t.printStackTrace();
    System.exit(0);
    }

  • BPEL Prcess invocation error: javax.xml.bind.JAXBContext.newInstance

    Im using jaxb (tried both Jaxb1.0/2.0) classes for XML processing in my bpel Process developed using 10.1.3.5.0, and my bpel process compiled and deployed successfully to OAS. The error message I'm receiving now is Whn i try to invoke my by process.
    Could anyone please let me know how to resolve this version compatability issue at OAS. I have an immediate requirement.
    Error:
    java.lang.NoSuchMethodError: javax.xml.bind.JAXBContext.newInstance([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
         at cosmos.ext118.utils.JaxbUtils.readXMLString(JaxbUtils.java:36)
         at cosmos.ext118.utils.JaxbUtils.processLotDetails(JaxbUtils.java:58)
         at bpel.damagedkitsintegration.ExecLetBxExe0.execute(ExecLetBxExe0.java:81)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:50)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:200)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:4174)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1680)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:238)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:335)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:6285)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1111)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.__createAndInvoke(CubeEngineBean.java:128)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:171)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:191)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl

    Can any one looked at this issue and please let me know if you the solution?

  • Javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package ...

    I want to marshall a java content tree (generated with jaxb api) in xml stream
    in an EJB.
    Generated classes are archived in a jar file containing its jaxb.properties, when
    I test it
    in a classic java process it runs well.
    When I try to do it in an EJB with weblogic 8.1 I get the following error:
    javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package
    I've checked:
    - jaxb.properties is in the archive file
    I've tried to put the jar file in the classpath of the server in the starter script.
    I've tried to put reference classpath in the manifest of the ejb jar and of application
    ear.
    I've tried to put both reference in server classpath and ear/jar manifest.
    I still doesn't run.
    Any idea?
    Thanks a lot
    Franck

    Add the directory of the generated classes in the classpath.
    "franck" <[email protected]> wrote:
    >
    I want to marshall a java content tree (generated with jaxb api) in xml
    stream
    in an EJB.
    Generated classes are archived in a jar file containing its jaxb.properties,
    when
    I test it
    in a classic java process it runs well.
    When I try to do it in an EJB with weblogic 8.1 I get the following error:
    javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package
    I've checked:
    - jaxb.properties is in the archive file
    I've tried to put the jar file in the classpath of the server in the
    starter script.
    I've tried to put reference classpath in the manifest of the ejb jar
    and of application
    ear.
    I've tried to put both reference in server classpath and ear/jar manifest.
    I still doesn't run.
    Any idea?
    Thanks a lot
    Franck

  • Javax.xml.bind.UnmarshalException

    I am using JAXB to parse the xml file. The sample of my xml file is given below:
    <rdcData version="1.0" target="NDA-RDC">
    <entity event="D" subtype="String" type="I">
    <header>
    <PI>10408819</PI>
    </header>
    <content>
    <property id="27007">
    <currValue classifier="code"/>
    <validFrom>20050702</validFrom>
    <validTo>20050703</validTo>
    </property>
    </content>
    </entity>
    </rdcData>
    And at runtime I am gettting the following exception.
    javax.xml.bind.UnmarshalException: Unexpected element {}:entity
    Someone please help me to solve this problem.

    HI Smile,
    Thanks for the reply.
    Here is the complete description of the error.
    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:entity
    Location: line 3 of file:/C:/new%20eclispe/workspace/RDCLoader/incr.xml
    javax.xml.bind.UnmarshalException: Unexpected element {}:entity
         at com.reuters.rdcrefdata.impl.runtime.SAXUnmarshallerHandlerImpl.handleEvent(SAXUnmarshallerHandlerImpl.java:577)
         at com.reuters.rdcrefdata.impl.runtime.AbstractUnmarshallingEventHandlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:139)
         at com.reuters.rdcrefdata.impl.runtime.AbstractUnmarshallingEventHandlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:136)
         at com.reuters.rdcrefdata.impl.runtime.AbstractUnmarshallingEventHandlerImpl.unexpectedEnterElement(AbstractUnmarshallingEventHandlerImpl.java:147)
         at com.reuters.rdcrefdata.impl.runtime.AbstractUnmarshallingEventHandlerImpl.enterElement(AbstractUnmarshallingEventHandlerImpl.java:60)
         at com.reuters.rdcrefdata.impl.RdcDataImpl$Unmarshaller.enterElement(RdcDataImpl.java:176)
         at com.reuters.rdcrefdata.impl.runtime.SAXUnmarshallerHandlerImpl.startElement(SAXUnmarshallerHandlerImpl.java:125)
         at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:575)
         at com.sun.xml.bind.unmarshaller.InterningXMLReader.startElement(InterningXMLReader.java:74)
         at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:575)
         at com.reuters.rdcrefdata.load.Splitter.startElement(Splitter.java:190)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:485)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:326)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1563)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:341)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:828)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:758)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1105)
         at com.reuters.rdcrefdata.load.OrganisationRefDataLoader.main(OrganisationRefDataLoader.java:114)
    Exception in thread "main"
    If you see the first line you will notice that the "SAXUnmarshallerHandlerImpl.java" class which is generated by the jaxb and put into the folder "impl.runtime".
    And hence I am sure that the error lies in the classes generated by the jaxb only.
    The xml that I have used here is ,
    <?xml version="1.0" encoding="UTF-8"?>
    <rdcData version="1.0" target="NDA-RDC">
    <entity event="U" subtype="ORD" type="Q">
    <header>
    <PI>5073152</PI>
    </header>
    <content>
    <property id="27207">
    <currValue>BAC 5.020 08/22/06 FRN MTN</currValue>
    <validFrom>20060301</validFrom>
    <validTo>20060306</validTo>
    </property>
    <property id="27207">
    <currValue>BAC 5.400 08/22/06 FRN MTN</currValue>
    <validFrom>20060530</validFrom>
    <validTo>20060530</validTo>
    </property>
    </content>
    </entity>
    </rdcData>
    Hope above information will be sufficient for you to help me.
    Regards

  • JAXB javax.xml.bind.UnmarshalException: Unexpected end of element

    I'm getting the following UnmarshalException when I try to run Unmarshaller.unmarshal from the command line but not when I run it in WSAD:
    2006-04-20 16:11:54,680 REPOST ERROR [main] (RestrictedListResponseConsumer.java:111) javax.xml.bind.UnmarshalException: Unexpected end of element {}:origin_country
            at com.b.watchdog.jaxb.generated.response.impl.runtime.SAXUnmarshallerHandlerImpl.handleEvent(SAXUnmarshallerHandlerImpl.java:580)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.AbstractUnmarshallingEventHandlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:139)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.AbstractUnmarshallingEventHandlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:136)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.AbstractUnmarshallingEventHandlerImpl.unexpectedLeaveElement(AbstractUnmarshallingEventHandlerImpl.java:153)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.AbstractUnmarshallingEventHandlerImpl.leaveElement(AbstractUnmarshallingEventHandlerImpl.java:63)
            at com.b.watchdog.jaxb.generated.response.impl.MessageHeaderTypeImpl$Unmarshaller.leaveElement(MessageHeaderTypeImpl.java:245)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.SAXUnmarshallerHandlerImpl.endElement(SAXUnmarshallerHandlerImpl.java:141)
            at org.iso_relax.verifier.impl.ForkContentHandler.endElement(ForkContentHandler.java:81)
            at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at com.b.watchdog.jaxb.generated.response.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
            at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
            at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
            at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:145)
            at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:163)
            at com.b.watchdog.RestrictedListResponseConsumer.consumeResponse(RestrictedListResponseConsumer.java:81)
            at com.b.watchdog.RestrictedListResponseConsumer.consumeResponses(RestrictedListResponseConsumer.java:52)
            at com.b.watchdog.RestrictedListInterfaceManager.exchangeData(RestrictedListInterfaceManager.java:307)
            at com.b.watchdog.RestrictedListInterfaceManager.main(RestrictedListInterfaceManager.java:282)My message is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <list_update_response xsi:schemaLocation="http://www.ab.com list_update_response.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ab.com">
         <response_info>
              <message_header>
                   <origin_country>FR</origin_country>
                   <destination_country>US</destination_country>
                   <message_datetime>2006-04-18T19:02:00.000+00:00</message_datetime>
              </message_header>
         </response_info>
         <success>
              <request_info>
                   <message_header>
                        <origin_country>US</origin_country>
                        <destination_country>FR</destination_country>
                        <message_datetime>2006-04-20T18:40:31.000+00:00</message_datetime>
                   </message_header>
              </request_info>
         </success>
    </list_update_response>My XSDs are:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ab.com" xmlns="http://www.ab.com">
         <xsd:include schemaLocation="list_update_common.xsd" />
         <xsd:element name="description" type="positive_length_token" />
         <xsd:element name="error">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element minOccurs="0" ref="request_info" />
                        <xsd:element ref="errors" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="errors">
              <xsd:complexType>
                   <xsd:choice maxOccurs="unbounded" minOccurs="1">
                        <xsd:element ref="validation_error" />
                        <xsd:element ref="general_logical_error" />
                        <xsd:element ref="item_logical_error" />
                   </xsd:choice>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="general_logical_error">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="description" />
                        <xsd:element minOccurs="0" ref="line_number" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="item_logical_error">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="description" />
                        <xsd:element minOccurs="0" ref="line_number" />
                   </xsd:sequence>
                   <xsd:attribute name="item_id" type="item_id" use="required" />
                   <xsd:attribute name="item_creation_country" type="country_code" use="required" />
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="line_number" type="xsd:positiveInteger" />
         <xsd:element name="list_update_response">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="response_info" />
                        <xsd:choice>
                             <xsd:element ref="error" />
                             <xsd:element ref="success" />
                        </xsd:choice>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="response_info">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="message_header" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="success">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="request_info" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="validation_error">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="description" />
                        <xsd:element ref="line_number" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ab.com" xmlns="http://www.ab.com">
         <xsd:simpleType name="country_code">
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="[A-Z]{2}" />
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:element name="destination_country" type="country_code" />
         <xsd:simpleType name="item_id">
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="[A-Z0-9]{12}" />
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:element name="message_datetime" type="utc_datetime" />
         <xsd:element name="message_header">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="origin_country" />
                        <xsd:element ref="destination_country" />
                        <xsd:element ref="message_datetime" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="origin_country" type="country_code" />
         <xsd:simpleType name="positive_length_token">
              <xsd:restriction base="xsd:token">
                   <xsd:minLength value="1" />
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:element name="request_info">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="message_header" />
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:simpleType name="utc_datetime">
              <xsd:restriction base="xsd:dateTime">
                   <xsd:pattern value=".*(\+00\:00|\-00\:00|Z)" />
              </xsd:restriction>
         </xsd:simpleType>
    </xsd:schema>Any thoughts?
    Thanks.
    - Luke

    I fixed the problem.

  • Where to find old thread/post and closed the thread

    where to find old thread/post and closed the thread
    i try to search by email id, by userid but no results display at all only new post are shown

    Hi,
    where to find old thread/post and closed the thread
    i try to search by email id, by userid but no results display at all only new post are shownMake sure that u have specified the Correct date range parameter as required.
    Regards,
    X A H E E R

Maybe you are looking for

  • My Late 2013 Retina MBP had a Kernel Panic - not sure what the source is.

    I have a recently-purchased Macbook Pro (late 2013, Retina, 13", 8GB RAM, 2.4 GB i5) that just had a kernel panic this afternoon. This is the first time I've had a kernel panic on this computer, so I don't know what the cause is. It's claiming that '

  • Can't update iLife in the App Store

    I have purchased a MBA 13.3 inch with Lion. iLife was preinstalled, but not with the latest version, so I went the to the App Store. There I logged in with my Apple ID which is configured for iTunes / App Store and which I used to purchase my MBA. Th

  • ORA-03113: end-of-file on communication channel ERROR

    After applying Database patch 3095277 to my 9.2.0.1.0 installation in order to update it to 9.2.0.4.0,I'm getting ORA-03113: end-of-file on communication channel ERRORS when attempting various tasks. This is a local installation running on a Windows

  • Can the monitor be fixed on an iMac if it goes black (2006 17-inch, intel core duo)?

    Can the monitor be fixed on an iMac if it goes black (2006 17-inch, intel core duo)?

  • Customer dissatisfaction.

    Attention: Comcast Customer Services Since it has taken 2-3 months to resolve and trouble-related several issues related to my computer, TV and phone services ... I feel a credit adjustment should be made to my account. I have spent countless hours &