Demarshalling xml with the automatically generated class JAXB2.0 file does not work in jdeveloper 11.1.1.9

I'm trying to familiarize themselves with JAXB in jdeveloper. I am facing some problems. There are a few test cases for which he works, for others it is not.

Case 1:

XML file is created manually. Respective java class to xmlelements is created manually. There is no ObjectFactory.java or jaxb.properties. Demarshalling this XML file works fine.

Case 2:

XML file is not created manually. All the respective java classes including ObjectFactory.java and jaxb.properties are generated using the widget ' JAXB 2.0 content XML Schema model "jdeveloper. I deleted ObjectFactory.java, jaxb.properties, and package - info.java. Demarshalling xml with this class file works fine.


Case 3:

Even in case 2, but this time I do not delete or change whatever it is generated and used as it is. It does not work. Get the following error.

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor with default root element rss was not found in the project]
  at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:816)
  at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:109)
  at com.example.jaxbintro.JAXBExampleClass.main(JAXBExampleClass.java:36)
Caused by: Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor with default root element rss was not found in the project
  at org.eclipse.persistence.exceptions.XMLMarshalException.noDescriptorWithMatchingRootElement(XMLMarshalException.java:129)
  at org.eclipse.persistence.internal.oxm.record.SAXUnmarshallerHandler.startElement(SAXUnmarshallerHandler.java:208)
  at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1598)
  at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:455)
  at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:401)
  at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:239)
  at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:157)
  at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:688)
  at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:271)
  at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:258)
  at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:218)
  at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:306)
  at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:106)
  ... 1 more

The project is included in the annex to this issue. It is ready for use. More information in the commentary to the java code. The main class is JAXBExampleClass.java.

What is the problem with case 3?

OK, I've been messing around with codes generated a bit and found the solution. The problem is that the value of the XmlSchema namespace had error in package - info.java class. There is no specified XmlSchema namespace in the XML file. Thus, the given value in the package - info.java was wrong.

@javax.xml.bind.annotation.XmlSchema (namespace = "http://www.example.org", value / / wrong, set it to an empty string or that of your xml file, if it has any)

elementFormDefault =

javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

package com.example.jaxbintro.xmlerror;

After you set the namespace to the empty string, since my xml file do not have one, code ran very well.

@javax.xml.bind.annotation.XmlSchema (namespace = "",)

elementFormDefault =

javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

package com.example.jaxbintro.xmlerror;

The file package - info.java can also be removed and it will work. For more details on the package and XmlSchema annotated level, what information on the package class is for, be found in the following link.

https://JAXB.Java.NET/NoNAV/jaxb20-FCS/docs/API/javax/xml/bind/annotation/XmlSchema.html

Tags: Java

Similar Questions

  • problem with the mouse and keyboard and windows update does not work

    Since last week to start the computer, I get an error message that the mouse and keyboard functions do not work. He then seeks the errors and then indicates that the service restarts. I want to fix this problem and according to Microsoft hardware, I should download "mkc.msi", which is missing from my computer, but when I do a search for a download, it always automatically directs me to the section "community". How can I correct this problem and get the appropriate download? I use Windows Pro 64 bit with IE 11 on an Acer laptop. I have the Acer site but it was a great help. Also, for the last 6 months, I could not update my computer windows update feature does not work and no error code is presented. I tried everything to restore or re-download the windows update feature, but nothing works, or I can't find a source. I got a blue screen 3 times indicating that windows must be updated and has been the reason for the blue screen. Unfortunately, I don't have a Windows 7 reinstall drive when restarting it spilled about 85 MG of data but not identify what has been dumped. Of course I could use help on this major problem as well even if it cannot be in the category correct community.

    Hello

    I understand that you are having trouble downloading MKC. MSI. I would certainly help you to fix this problem.

    Method 1:

    If you are referring to Microsoft Mouse and keyboard Center, then check out these links to download.

    Download mouse and keyboard Center to get the best out of Windows 8

    Mouse and keyboard Center 2.0 (formerly IntelliPoint and IntelliType Pro)

    Method 2:

    You can consult the following Microsoft article if you are unable to install the updates of Windows on the computer.

     

    Cannot install updates in Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2

    http://support.Microsoft.com/kb/2509997

    Important: When running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/)

    How to back up and restore the registry in Windows

    I hope this helps.

    Please report if the problem persists and we will be happy to help you further.

  • With the latest updates of foxfire, so it does not work slow or accident, why do I always foxfire run normal to slow down, then freeze and have either restart or click Ctrl w to erase everything and re click foxfire to recharge.

    FoxFire browser works normal for a few days, then begins to gel, where I can't scroll with the mouse or click on facebook and fabulis.com. I each somputer reboot or push CTRL to clear the screen on the desktop, then refresh the desktop page and then click the icon to return to where I was and continue on firefox.

    It starts to become slow when it starts to redirect my web sites

  • How can I download the new update on my Macbook pro when the password is not working? When I connect to the Adobe site with the same user name and password it DOES not work. I don't understand why.

    So I have a macbook pro - and she advised me that I had to update my Adobe flash player. So I go through all the steps and I'm stuck at the last stage, where he asks me my user name and password. I go in there correctly - several times and it does NOT connect. He shakes to show that there's an error. Double check my file AND I go to the Adobe site to connect with the same information. and it works very well.

    WHAT IS THE PROBLEM? Help please.

    Could you please try ComputerName administrator as username and the password as password.

    I hope this works.

    Concerning

    Hervé Khare

  • With the new update version 29,0 gmail does not work?

    Whenever I try to open gmail, this gives:

    The page is not redirecting properly

    Firefox has detected that the server redirects the request for this address in a way that will never end.

       This problem can sometimes be caused by disabling or refusing to accept cookies.
    

    Otherwise, all other Google products work very well! Gmail only works.

    If you have not already tried to delete your existing Google cookies, please try this. You can load the Google search, then either:

    • Click on the padlock in the address bar > more information > Security > "View Cookies".
    • Right-click the page and choose View Page Info > Security > "View Cookies".
    • Menu Tools > Page Info > Security > "View Cookies".

    In the dialog box that appears, you can delete cookies from Google.

    Then try to reload the page and sign in again. Who help me?

  • I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    Question
    I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    edit, escaped mod < s > in order to avoid the line through question

    A web page can be defined a "accesskey" for an item. Unlike IE/Chrome/Safari, who use the Alt key only, Firefox requires pressing Alt and Shift to activate the element. In other words, try

    ALT + SHIFT + S

    and see if it works.

    I don't know of any way to change this so that the change is not necessary. There may be an add-on?

  • my phone does not work after last update itunes on my phone connection with my pc, it shows only i tunes icon and the application of itune on my pc does not work

    my phone does not work after last update itunes on my phone connection with my pc, it shows only i tunes icon and the application of itune on my pc does not work

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach.

    Review the other boxes and other support documents list to the bottom of the page, in case one of them applies.

    More information area has direct links with the current and recent buildings if you have problems to download, must revert to an older version or want to try the version of iTunes for Windows (64-bit-for old video cards) as a workaround for problems with installation or operation, or compatibility with QuickTime software or a third party.

    Backups of your library and device should be affected by these measures but there are links to backup and recovery advice there.

    Once iTunes to work properly, you should be able to fix your device.

    TT2

  • error packaed and launch: Oh, Snap! Build request failed with the message: [ERROR] an archive or directory does not exist in the specified path:

    Hello

    I get this error when you try to run the sample of cards on the corrugation Simulator:

    Oh, Snap! Build request failed with the message: [ERROR] an archive or directory does not exist in the specified path: "/ Users/Calgacos/Library/Application Support/Google/Chrome/Default/Extensions/cnijnnaimeaacneklcndcafbnkeicckh/0.9.16_0/services/node/node_modules/rbd/Packaged/Maps.zip".

    The .../rbd/Packaged folder is writable and the Maps.zip will be created in the folder ~/RippleSites/Maps/Packaged.  With the help of Mac, the latest versions of everything.  The application runs in undulation ok, but I can't throw on the SIM BB10.

    Someone else have this error and know why?

    PS the Maps.zip does not get created (or copied) in specified folder, of course, but why?

    PS try another application and it worked but is too has not put its zip file into the folder... rbd/Packaged.  I guess it should not but leaves me clueless as to whats wrong with cards.

    Thank you

    The two directories (in the extensions directory and maps project directory) have permissions to 777.

    But you gave me an idea...

    It turns out that simply by putting

    "Packages".

    in setting output wasn't enough, I need the full path

    for example: "/ Users/username/RippleSites/Maps/packed."

    and presto, now it works!

    Thank you!

  • I downloaded Adobe camera raw 8.4 so that I can open raw files with pictures taken with the camera Sony a6000.  However, it does not open images in camera raw.  What can I do?

    I downloaded Adobe camera raw 8.4 so that I can open raw files with pictures taken with the camera Sony a6000.  However, it does not open images in camera raw.  What can I do?

    I suggest you please update Camera Raw 9.1.1: Camera Raw of Adobe Photoshop CC and CS6 Installer

    Once done, launch Photoshop and click Help > about plug-in > Camera Raw.

    And check the version of Camera Raw, you see there, it should be the most recent.

  • Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool liquify (photoshop cc 2015): what should I do?

    Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool of liquefy; I can't change the size of the brush or hardness. OS win 7 Professional 64 bit, wacom tablet intuos 6.3.14 - 1 driver s pro, Photoshop 2015 CC worm.  2015.0.1 20150722.r.168

    What are your settings of GPU acceleration?  As I understand it, the Alt right click size and hardness adjust needs acceleration GPU to be turned on, but I have a feeling Brush hardness is always set to easy when using fluidity.  You can still see the quick mask as representation of the soft brush when Alt right click, but you can't change the hardness.

    Is that you can change the brush size and pressure (framed in red in my screenshot) Alt right click drag left and right changes size and down to pressure changes, and you can see what is happening in real-time by looking at the sign on the right.  It works independently of your acceleration GPU (IME) settings, but you don't get the effect of soft red quick mask.

    Does this fit with what you see, or you are not able to change things at all?  If not, then I've always found that fluidity consumes system resources, if you could check the Task Manager > Performance tab to see what kind of RAM and CPU use is using the fluidity.  That's what I see after direction the lens above with a big brush continuously for 10 seconds.  Note This is on a fairly quick NLE System.

  • When I try to install adobe photoshop 13 on my computer it comes up with the error message error code "this installer does not setup on a windows 64-bit operating system support" 6. How to I recify this? TIA

    When I try to install adobe photoshop 13 on my computer it comes up with the error message error code "this installer does not setup on a windows 64-bit operating system support" 6. How to I recify this? TIA

    You can try to download the 64-bit version.  You can download the demo version of the software through the page linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html

  • Edition with added script AS2 FLA file does not work

    I hired someone else to do the writing of scripts for animation I created originally. He calls an xml file that displays 3 different items in the flash. It works very well... except when I open the FLA and republish - even if I do not change a single thing, the SWF file does not work. I tried everything nothing helped. The writer use CS3. I use CS4, I tried with the CS3 version (on another computer). The writer and myself work on Mac. The writer has even sent screenshots of publication of windows, and I select all options of same exact. (version 9, AS2).  All the world run into this kind of problem? I'm at end of witt. I really need to be able to make changes to this file and publish it. I can post the FLA file, if someone wants to take a look.  TIA, Julie

    you are missing a greensock TweenMax class.

    I will try and attach a copy for you.  If it fails, you can go to: http://blog.greensock.com/tweenmaxas3/

    and dl the as2 version.  Place the gs folder in the same folder as banner.fla

  • I have Photoshop CS5 extended version 12.04 with camera RAW version 6.7. It does not work with files. NAVE. Help me please

    I have Photoshop CS5 extended version 12.04 with camera RAW version 6.7. It does not work with files. NAVE generated by NIKON 610. What can I do?

    Hi danielem,

    Need you minimum Photoshop CS6 & Camera Raw version 8.3 use of Nikon 610 RAW files.

    see the related link: supported by Adobe Camera Raw devices

    However, if you cannot upgrade to Adobe Photoshop CS6, then you can use the DNG Converter to convert your images to DNG and use it with Photoshop CS5

    Mac: Adobe - Adobe Camera Raw and DNG Converter: for Macintosh: Adobe DNG Converter 9.3

    Windows: Adobe - Adobe Camera Raw and DNG Converter: for Windows: Adobe DNG Converter 9.3

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • The button create a new paragraph style does not work for me, is this a bug or something stupid I did?

    The button create a new paragraph style does not work for me, is this a bug or something stupid I did?

    Pages on El Capitan 10.11.1 v5.6.1.

    I just created a quote indented using ITC Garamond Book Italic with left and right margins altered. Well selected, I clicked on the + symbol in the paragraph, named the new Styles pop-up style Indented quote and you press return.

    Always selected in the body of the document, I applied the body paragraph Style to restore the normal formatting and then with the text again, the paragraph of citation Style indented - who worked as expected.

    If you want that your new Style of paragraph to survive across documents, you will need to save it in a model. You can also have two different Pages, documents open in Pages v5.6.1, and copy/paste the custom styles between the selected text in these documents by using the Format menu.

  • Im trying to get off the load free anti virus, but it does not work

    Im trying to get off the load free anti virus, but it does not work

    Im trying to get off the load free anti virus, but it does not work

    Not enough information.

    Of course - you send messages to a Microsoft support forum and one could assume that you mean that you try to download Microsoft Security Essentials, save it to your computer and install it then - but even with this hypothesis - another that knowing you have Windows XP (probably Home edition, but possibly professional or Media Center editions - and probably more than 32-bit not 64 - bit)-we do not like you think we should knowledge.

    Regarding AntiVirus - free are very good: Avira, AVG, Avast

    You could spend ~ 60USD during two years of eSET NOD32 AntiVirus (not more - just AntiVirus.)

    Get one - save on your computer (do not install immediately.)

    Reset...

    After a reboot - install your new product and update after the installation.

    Run a full scan with it.

    Then - just to make sure you started on the right foot...

    Search for malware:

    Download, install, execute, update and perform analyses complete system with the two following applications:

    Remove anything they find. Reboot when necessary. (You can uninstall one or both when finished.)

    Search online with eSet Online Scanner. Remove everything it finds.

    Reset.

Maybe you are looking for