JAXB Woes

Although I find JAXB convenient if nothing else, I'm have a big problem.
I can unmarshall my XML file perfectly. But if I try to hand off the root node of my own parse tree, the marshaller only writes the nodes below my root. So instead of getting my one root node written with all the second-level nodes below it, the marshaller writes all the second-level nodes as multiple root nodes.
Anybody have any problems with this??
Thanks!!!!!

Pass it the Document 'node' not the root node. From the API:
Unmarshalling from a org.w3c.dom.Node:
       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
       dbf.setNamespaceAware(true);
       DocumentBuilder db = dbf.newDocumentBuilder();
       Document doc = db.parse(new File( "nosferatu.xml"));
       Object o = u.unmarshal( doc );

Similar Messages

  • Continual Mac woes (no question, just a rant)

    It's Tuesday, and I am having terrible problems with my Mac. But then, why should Tuesday be different from any other day of the week.
    Here is a typical day for me. The computer appears to be working OK. I need to watch a DVD for my work. I turn on DVD player, and put one in. The machine can't read the disc. It clicks and whirls, but the icon does not show up on the desktop. Meanwhile, so distressed is the machine that it freaks out. What was up until now was a fluidly operating machine suddenly reverts back to its old ways (i.e., its ways of two days ago). The hold ups and spinning pinwheels begin to eat of hours of my work day. (Remember the old days when computers made life easier?) The machine becomes sticky, gummy. Oh, I can move the curser and it seems to work for a second but then gets stuck in the dock, which explodes in icons and then freezes for five minutes. Yes. Five minutes.
    Would love to use Force Quit, but the cursor is spinning, and nothing is responding. Funny about that old Mac. You can't force quit Force Quit. I guess I need to leave it open all the time.
    Of course, FQ usually works on Safari. I have never just "quit" Safari. It always requires Force Quit, otherwise I can't turn off my computer. It stalls shut down.
    Now I have a DVD trapped in there and can't get it out. [But I just got an answer from another posting.]
    In the old macs, there used to be a pin hole you could stick a needle into ... can't find one on my flatpanel iMac.
    I bought my Apple flat panel iMac in August of 2002. Yes, I know that that is a long time to have a computer, but I am not rich nor attached to a corporation that can splurge on computers. The first weekend I had the machine, I had three kernal panics.
    Among the other problems I have documented are the following: the dock hiding itself unbidden and other features checking and unchecking themselves (Aug 2002); bus errors connected with OS 9 (Sept); some problems that inspired the tech person (Eric)) to talk me through deleting my user i.d., resulting in the loss of two months worth of e-mail (Thursday, 12 September); Preview problems (September); a bizarre box with an unmovable and undeletable red stop sign in it that no tech person or other Mac user I know had ever hear of (Monday 30 September); printing problems; computer won't shut down, numerous disconnection errors, which turned out to be caused by an OS X update (beginning December, 2002, or later); Kernel panics (Feb); computer won't shut down (March); Faxstexx problems, program won't allow me to set it up, finally just deleted the software (April); keys like "V" freeze and repeat endlessly (May 21); DVD Player freezes (May); Safari and Mail begin quitting unexpectedly (May); cursor begins to blink and fade out, plus odd sounds come out of the speakers, a constant error beeping (Sept 9); DVD Player problems (Oct 4).
    I called AppleCare while I had it about once a week (the total between August 2002 and the time it ran out was about 155 calls). Naturally, some of these calls are motivated by user error. On the other hand, many of the issues I have called about were unprecedented as far as the Tech person was concerned, such as the blinking mouse, the red stop sign, and the DVD Player woes.
    Things improved with Panther, but in Tiger many of the same old issues have returned.
    I have been having so many problems with my Mac that I once wrote a letter to the company asking when do I qualify for a new replacement machine. I never received an answer, but I felt better for about a day. Then I turned on my Mac again.

    The spinning ball of death as we used to call it is often caused by a lack of RAM, it is hard to be sure as I am not working on your machine, but sometimes things can be improved with additional RAM, it makes it seem like a whole new computer.
    A lot of your problems sound like stuff that can be fixed easily enough, and although frustrating things happen here and there with updates. It sounds like you are in fairly good spirits with it all, I would suggest just researching a bit more into maintenance you can do to help maintain the computer and educate yourself a bit more (sounds like you already have learned quite a bit along the way) and you will find a lot of these issues take you a few seconds to rid yourself of. I would start by making sure you are repairing permissions regularly and running the most up to date software. If a lot of problems persist, try creating a second user that is a "test" user to see if the problem is replicated on that user (don't delete your other one, but if you do find the problem not on the other user, you might have a corrupt user, however you don't have to lose all your emails there are plenty of ways to back it up and import it in, or even just bring the entire Mail folder from your library over to the new user). Another thing you can do if you find a lot of system problems is archive and install the OS, it takes a bit of time, but doing it overnight shouldn't be an issue, and you won't lose any of your stuff.

  • Marshaling problem in creation of xml thru JAXB

    Hi java gurus,
    I am trying to create an XML which will has the data of database using JAXB. I am able to generate JAXB classes, but its giving some error the stack trace is like this
    java.lang.NoSuchMethodError: com.sun.xml.bind.marshaller.XMLWriter.setXmlDecl(Z)V
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:223)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:238)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:233)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:126)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
         at org.bas.dss.common.dao.MetaDAO.createInstInformation(MetaDAO.java:627)
         at org.bas.core.fidownload.DownloadActionHandler.getInstInfoXMLData(DownloadActionHandler.java:163)
         at org.bas.core.fidownload.DownloadActionHandler.performPreDownloadAction(DownloadActionHandler.java:74)
         at org.bas.core.fidownload.DownloadAction.perform(DownloadAction.java:129)
         at org.bas.core.fidownload.DownloadAction.execute(DownloadAction.java:79)
    the method is like this,
    valueObject = getInstInformation (registrationId, appVersionId);
    System.out.println("MetaDAO-->valueObject:"+valueObject); //here i am gettingthe object
    context = JAXBContext.newInstance("org.bas.dss.common.vo.bii");
    System.out.println("MetaDAO-->context:"+context); //here i am getting the context
    sumissionInfoMarshaller = context.createMarshaller();
    System.out.println("MetaDAO-->sumissionInfoMarshaller:"+sumissionInfoMarshaller); //here also i am getting some object type
    sumissionInfoMarshaller.setProperty(
    Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
    System.out.println("MetaDAO-->MetaDAO-->");
    sumissionInfoMarshaller.marshal (valueObject, streamToWrite); // the problem is coming here.
    anyone can suggest what will be the problem, and tell me how can i resolve this issue,
    thanks in advance,
    varma

    Pl post this question to SDK Forum

  • Upgrading to JAXB/JWSDP1.3 from JAXB/JWSDP 1.2 -- problems

    I am seeing 2 problems after upgrading to the JAXB found in WSDP 1.3 (from 1.2)
    We are using JAXB in a client/server style app where the server is accessed via a web interface and the client is delivered via Java Web Start (JWS). Both the server and client use JAXB-generated classes.
    We have an ant build.xml file that invokes xjc and this was working for us as expected.
    For the JWS piece, we need to sign the jars we use and for testing purposes we were self-signing them, including the jar files needed for JAXB also self-signed. This is also coordinated through an ant task.
    After replacing the jar files in our lib area with the ones from my recent download of the 1.3 version of JAXB the following happens.
    1. I am seeing compiler deprecation warnings for the generated code -- this did not happen in our use of JAXB from 1.2. For example:
    [javac] /Users/jjs/Projects/SGS-Install-Fixed/sgs/src/com/gestalt/sgs/uobdif/impl/runtime/SAXMarshaller.java:259: warning: ERR_MISSING_OBJECT in com.sun.xml.bind.marshaller.Messages has been deprecated
    [javac] Messages.format(Messages.ERR_MISSING_OBJECT), null,
    [javac] ^
    I am using Java 1.4.1 on Max OS X (I know... not supported but this doesn't seem like a platform dependency) and these warnings go away if I revert back to the JAXB jars from the 1.2 release of WSDP.
    2. These are only warnings, so my build proceeds with ant. But, when I get to the jar signing step I see:
    [signjar] Signing Jar : /Users/jjs/Projects/SGS-Install-Fixed/sgs/lib/jaxb-libs.jar
    [signjar] jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 63854 but got 19845 bytes)
    I looked at the jar file using the jar command and there are entries there:
    4038 Wed Dec 03 22:16:20 EST 2003 META-INF/MANIFEST.MF
    3303 Wed Dec 03 22:16:20 EST 2003 META-INF/SUN_MICR.RSA
    3780 Wed Dec 03 22:16:20 EST 2003 META-INF/SUN_MICR.SF
    0 Wed Dec 03 22:16:20 EST 2003 META-INF/pack.properties
    that suggest to me that perhaps the jar is now sigend by Sun and therefore can't be signed again. If I look at the corresponding jar from the JAXB/1.2, these SUN_MICR entries do not appear.
    Is this assumption correct? Can I deliver my app through web start with my apps own jars self-signed and the JAXB jars signed by Sun? I suppose I can un-jar the JAXB jars, remove the manifest material and then re-jar the files and sign those. I expect this might work.
    I am looking to share migration experiences (1.2 to 1.3) and to see what work-arounds there might be.
    Thanks
    Jim

    Replying to my own post.
    It seems that with the JWSDP 1.3 release, most (if not all) of the included jars are signed by Sun. You can NOT include jars with different signatures in the same web start application -- that's the error I get when I tried to do this.
    This means that if I want to package my jars using a self-signed certificate, I have to first un-jar all of the JAXB lib jars I want to include, get rid of the parts of the manifest that deal with signing, re-jar them and then sign all of the jars in my web start app using my own cert. More work for me, but not a show-stopper.
    I still am not sure why I am getting deprecated warnings from javac though.
    Jim

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • ICal woes - any help please

    Hi everyone, I am having some major iCal woes that I hope someone has the answer to.
    Ok this is how I handle my workflow. I have numerous calendars such as "call", "viewing", "meeting", "work misc", "personal" etc. All colour coded and I use the month view as standard.
    Under SL I would double click the day I add an event go through the boxes (name, location, time, etc) click save and job done.
    Now under Lion when I double click a day I get an event box but only the header. So I have to type the header hit return then double click on the event again to get the box up so I can assign the event the right time and calendar to use. This is taking twice as long as it did before under SL and is a pain when you have a client on the phone. Am I missing something here? Why is it now so hard? - and I have tried that quick entry business but it doesn't work for me, I simply want the whole calendar entry box when I double click in month view.
    Next problem is all new events go in as a all day event. Again another click I didn't need to do in SL. Then untick all day and enter a time LionCal doesn't set the end time 1 hour later anymore it sets it hours later for me, sometimes into the next day so I have to click into the date box and type the end date, again a massive slow down in my workflow.
    Finally and most annoyingly in month view I cannot for the life of me get a 12 hour clock with AM/PM. I checked my international page in sys prefs and all is ok but LionCal is not playing ball.
    Any help would be appreciated as I love iCal and run my life with it over MobileMe.

    If you want to Commit changes at every record level in a Multi-Record Block, you may have to write the following triggers at the block level :-
    1) Key-Down
    2) Key-Up
    3) You will also have to handle Mouse Events
    i.e When-Mosue-Click etc
    In each of these triggers, issue a commit statement :-
    i.e.
    Trigger Name :- KEY-DOWN [ Defined at Block Level ]
    Trigger Code
    Commit_Form;
    Next_Record;
    The Commit_Form statement will display a message for the user to COMMIT transaction to the DB.
    Shailender

  • Airport express "G" - My woes and some thoughts. . .

    I got the airport about this time last year. it worked great and i loved it. In December 2007 I moved to an apartment. I got the local cable co's internet, ran it to my ax and all was well. 6 weeks ago, due to our wonderful economy, i had the cable shut off as I talked to one of my neighbors who has wireless internet running unprotected (no password)..i asked him if i could leech for a bit till i got things sorted. he said cool and all was.....hmmm. SO in my airport menu i select his network and my internet works, sometimes drops then comes right back but no biggie. I reset my ax to just do airtunes and join his network, it restarted and voila, airtunes. problem is that in the last month i get a lot more drop outs and if i go more than 2 days with out streaming by ax disappears and i have to do a hard reset to get it to show up in the utility. The light is green but nothing...sometimes the amber light blinks and it never come on line at all....grrrrrr.
    could all my newfound ax woes be due to the fact i am adding it to his network? i had no issues at all when i created my own one with my internet and airtunes.....
    anyone?
    EDIT: let me ask this then...when i am streaming music from my mbp to the ax, am i doint it dorectly or am i using his network? If I am sending music from my MBP to the ax via his network then that would basically answer all my questions, if the mbp goes direct then I have no clue....
    edits as i am brainstorming

    EDIT: let me ask this then...when i am streaming music from my mbp to the ax, am i doint it dorectly or am i using his network?
    It goes from your MacBook Pro to his wireless base station... then from his base station to the AX. So it depends on the performance of his base station and network.

  • Error while running simple JAXB test class

    I am new to JAXB and trying to run simple tutorial code.
    I created Java project and added required jar files in a classpath.
    But I get error as
    "com.jaxbtest" doesnt contain ObjectFactory.class or jaxb.index
    I am using Eclipse and I have added these external jars in build path as well as in "Open Run Dialog" classpath.
    Thank you in advance.
    YB

    Hi Timo,
    Im using JDev version 11.1.1.6.0.
    I checked the class path on the jdev console. All the library references are mentioned in the manifest.mf classpath of the test project like below:
    Manifest-Version: 1.0
    Class-Path: lib/identitystore.jar
    lib/adfm.jar
    lib/groovy-all-1.6.3.jar
    lib/adftransactionsdt.jar
    lib/adf-dt-at-rt.jar
    lib/adfdt_common.jar
    lib/adflibrary.jar
    lib/xmlparserv2.jar
    lib/db-ca.jar
    lib/jdev-cm.jar
    lib/ojmisc.jar
    lib/commons-el.jar
    lib/jsp-el-api.jar
    etc...
    So I expect the library references should be resolved looking at the manifest file.
    Another set of entries that I see in the jdev classpath are related to the Model project which is under test.
    -classpath
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\.adf;
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\Model\classes;
    How do I put these entries into my class path? Will it be sufficient if I add the Model.jar into my test project classpath?
    Thanks,
    Sapna

  • WSIF calling EJB 3.0 beans, with JAXB 2.0.2 as the JavaSerializer

    I'm working with SOA suite (10.1.3.1.0 [build #0 ]), and I am trying to allow my BPEL processes to call my EJB 3.0 stateless session beans via WSIF.
    This works fine when I am passing primitives (strings, dates and so-forth) between BPEL and my EJB's using WSIF.
    However I want to be able to pass my 'business objects" across the BPEL/EJB boundary directly. I started off by following the BPEL cookbook article "Using WSIF for Integration" which was usefull in showing how to use JAXB 1.x generated classes across the BPEL/EJB boundary.
    However in the project I am working on we want to use JAXB 2.0 as it allows us to create an XML schmea binding directly from our existing "business objects".
    So I am using the knowlege gained in the article mentioned above to implement a custom JavaSerializer for my bpel process that will use JAXB 2.0. My custom JavaSerilizer is being invoked correctly, when I invoke my BPEL process, but it is unable to load the correct JAXB (2.0.2) classes - it keeps getting the JAXB 1.0 classes that come standard with oracle.
    My debug code that prints out the classloaders for my serializers (and parent classloaders) reports the following:
    06/09/05 11:18:18 CustomSerializer.serialize
    06/09/05 11:18:18 Classloader =oracle.bpel.common:10.1.3
    06/09/05 11:18:18 Classloader =api:1.4.0
    06/09/05 11:18:18 Classloader =jre.extension:0.0.0
    06/09/05 11:18:18 Classloader =jre.bootstrap:1.5.0_06
    The Jaxb classes it is loading a coming from classloader:
    06/09/05 11:18:18 JAXBContext classloader =oracle.xml:10.1.0_2
    My question is how do I get the JAXB 2.0 classes in my classpath?
    Thanks,
    Dave Oram

    Hello,
    About WSIF, we are currently working on a WSIF-EJB30 binding that will allow you to direclty annotate the session ben and get the EJB exposed as SOAP and WSIF binding out of the box.
    This will be available in OracleAS 10.1.3.1 production.
    Regards
    Tugdual Grall

  • JAXB Problem: xjc gives an error

    Hello everyone,
    I would like to use JAXB to extract various information from a class of XML documents that conform to a schema. After tweaking the schema so that I avoid namespace conflicts with xjc, I settled the namespace conflicts, but I got the following error. Even if you don't have an answer, could you give me some pointers so that I can at least begin tackling the problem?
    Thank you very much!
    Here is the output of the command I ran:
    C:\Documents and Settings\Berk Kapicioglu\Desktop>xjc -p test.jaxb ownership4ADocument.xsd.xml -d work
    parsing a schema...
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    Caused by: java.util.MissingResourceException: Can't find resource for bundle ja
    va.util.PropertyResourceBundle, key parser.cc.8
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at com.sun.msv.datatype.xsd.regex.RegexParser.ex(RegexParser.java:138)
    at com.sun.msv.datatype.xsd.regex.ParserForXMLSchema.parseCharacterClass
    (ParserForXMLSchema.java:291)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseAtom(RegexParser.java
    :736)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseFactor(RegexParser.ja
    va:638)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseTerm(RegexParser.java
    :342)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseRegex(RegexParser.jav
    a:320)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parse(RegexParser.java:158
    at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
    pression.java:3040)
    at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
    pression.java:3051)
    at com.sun.msv.datatype.xsd.regex.RegularExpression.<init>(RegularExpres
    sion.java:3017)
    at com.sun.msv.datatype.xsd.PatternFacet.compileRegExps(PatternFacet.jav
    a:79)
    at com.sun.msv.datatype.xsd.PatternFacet.<init>(PatternFacet.java:67)
    at com.sun.msv.datatype.xsd.TypeIncubator.derive(TypeIncubator.java:261)
    at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.restrictionSimpleT
    ype(DatatypeBuilder.java:82)
    at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
    leTypeImpl.java:66)
    at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.build(DatatypeBuil
    der.java:65)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.buildPrimitiveTy
    pe(SimpleTypeBuilder.java:161)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.access$100(Simpl
    eTypeBuilder.java:50)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.checkCon
    version(SimpleTypeBuilder.java:201)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.restrict
    ionSimpleType(SimpleTypeBuilder.java:276)
    at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
    leTypeImpl.java:66)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.build(SimpleType
    Builder.java:93)
    at com.sun.tools.xjc.reader.xmlschema.cs.DefaultClassBinder.simpleType(D
    efaultClassBinder.java:130)
    at com.sun.xml.xsom.impl.SimpleTypeImpl.apply(SimpleTypeImpl.java:89)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector._bindToClass(Clas
    sSelector.java:212)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.bindToType(ClassS
    elector.java:177)
    at com.sun.tools.xjc.reader.xmlschema.TypeBuilder.elementDeclFlat(TypeBu
    ilder.java:213)
    at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.elementDecl(FieldBuil
    der.java:384)
    at com.sun.xml.xsom.impl.ElementDecl.apply(ElementDecl.java:174)
    at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.build(FieldBuilder.ja
    va:76)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.part
    icle(DefaultParticleBinder.java:399)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.applyRecursively(BGMBui
    lder.java:490)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.mode
    lGroup(DefaultParticleBinder.java:462)
    at com.sun.xml.xsom.impl.ModelGroupImpl.apply(ModelGroupImpl.java:80)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.buil
    d(DefaultParticleBinder.java:368)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.part
    icle(DefaultParticleBinder.java:433)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.buil
    d(DefaultParticleBinder.java:371)
    at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder.build(Defaul
    tParticleBinder.java:70)
    at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder$1.parti
    cle(FreshComplexTypeBuilder.java:48)
    at com.sun.xml.xsom.impl.ParticleImpl.apply(ParticleImpl.java:68)
    at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder.build(F
    reshComplexTypeBuilder.java:35)
    at com.sun.tools.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder.build(C
    omplexTypeFieldBuilder.java:56)
    at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.complexType(FieldBuil
    der.java:228)
    at com.sun.xml.xsom.impl.ComplexTypeImpl.apply(ComplexTypeImpl.java:194)
    at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.build(FieldBuilder.ja
    va:76)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.build(ClassSelect
    or.java:340)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.access$000(ClassS
    elector.java:54)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector$Binding.build(Cla
    ssSelector.java:107)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.executeTasks(Clas
    sSelector.java:240)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:
    118)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:8
    0)
    at com.sun.tools.xjc.GrammarLoader.annotateXMLSchema(GrammarLoader.java:
    424)
    at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:130)
    at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:79)
    at com.sun.tools.xjc.Driver.run(Driver.java:177)
    at com.sun.tools.xjc.Driver._main(Driver.java:80)
    at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
    at com.sun.tools.xjc.Driver$1.run(Driver.java:60)

    Hi,
    A similar error occur to me twice.
    One because pattern specification error (The pattern was incorrectly written)
    The other one was because I had in the directory JAVA_HOME\jre\lib\endorsed the files that come from JWSDP_HOME\jaxb\lib.
    This files (jaxb-api.jar, jaxb-impl.jar, jaxb-libs.jar, jaxb-xjc.jar) should only be in the directory where they come from JWSDP_HOME\jaxb\lib
    If you have them in the JAVA_HOME\jre\lib\endorsed directory try removing them from there.
    Hope I help you.

  • Hp Warranty Woes & Hard Drive Heartache

    HP – Warranties Woes & Hard Drive Headaches.
    Dear Internet Community (I.C)
    I need your help.
    I would like to know if I’m being unreasonable in my expectations or is Hewlett Packard (HP) not living up to its both moral & legal obligations as a good corporate citizen & what it alleges to be – a Customer Focused Global Computer Services company.
    Apologies if this is a little long winded but in the interests of fairness I need to put as many HP comments in as possible – to give you a clear picture.
    So bear with me, you will not be disappointed & there are a couple of questions you might like to answer & feedback to the appropriate parties.
    Keep in mind at all times we are talking about approximately a $200 (NZD) fix – less than the lost profit on one lost sale for an HP PC ( you might think twice about HP products after reading this).
    There are two parts to this problem :
    Part 1 :
    I purchased an HP Touch Smart a few years ago, I registered the product & warranty with them & over the years have received have received numerous emails stating “buy this, upgrade now”.
    But I don’t recall ever receiving an “WARNING – Critical Failure Issue (CFI) apply attached patch immediately” email while under warranty. Why is this relevant?
    Ø Seagate makes Hard Drives – in this case a Barracuda 7200.11
    Ø HP buys said HD’s from Seagate
    Ø Seagate finds a problem with firmware in HD’s & advises HP & supplies a fix
    Ø HP knows which Customers have these HD’s, because you know what goes into your machines – right ? - see below
    Ø HP FAILS to send email to Customers with the fix (a simple email with attachment would solve problem) or issue recall.
    Ø HP even offers previously to fix problem FOC & puts fix on its Website - but only if the Customer knows somehow of the problem.
    Ø Should the Customer intuitively& telepathically know of problems in HP Products in advance before it fails, because of course HP is not telling their Customers.
    Problem or Outcome: My HD has bricked itself & will not operate as I never received notice of the firmware fix at any time either in or out of warranty.
    Paul Boshoff - G M -Personal Systems Group- HP NZ (PB- GMPSG) says
    “It would be very difficult, if not impossible, for any computer vendor to proactively notify it’s customers of component-level updates”
    “Failures of the kind you’ve experienced are usually related to a specific batch of serial numbers and often those component serial numbers aren’t available when the user is registering that particular computer.”
    Now let me know if you think I’m wrong, but it sounds like HP does not know what goes into its machines or at the very minimum does not keep track of this.
    HP, a Global Computer Services company cannot possibly be expected to track what goes into its machines. HP apparently does not record or match the serial number of the HD with the machine it goes into.
    If Ford & Toyota can track & record what tyres go on which make & model of their cars which are in the millions each year & can recall cars dating back 8-10 years just case of a manufacturers component malfunction why can’t HP link & record the HD details.
    I can just hear it now “I’m sorry we don’t know which engine we put in your car”.
    And let’s be real clear here – we are not talking about some small screw at the back of a PC – Along with the CPU & the RAM, the Hard Drive is pretty much up there in the top 3 of important components of any computer.
    I.C – Do you feel
    ü That fills you with confidence in HP products & services ?
    ü Should HP be required to tell its customer of CFI’s with its products – particularly while under warranty?
    ü Has HP tried to limit their liability & cost by directly NOT telling Customers of CFI’s while under warranty?
    Part 2 :
    When your HD bricks itself – apparently all is not lost – some very clever person has found a solution so you can get the HD going long enough to apply the firmware fix & then your HD is a good as new – Here is the link that spells it out with pics http://www.overclock.net/t/457286/seagate-bricked-firmware-drive-fix-with-pics)
    You’ll see the relevance of this shortly.
    After much messing about I received the following email from PB- GMPSG : “I have escalated your issue and have just received the go-ahead to repair your unit at our cost. We will be utilizing our own, authorized service provider to re-install the original hard-drive and to run the software fix on that unit.” (This guy most likely earns a six figure salary & isn’t able to sign off $200 fix).
    NOTE : it does not limit or restrict what type of fixes will be used & also at this time HP was aware of both the Seagate fix & above fix.
    I delivered the PC & bricked HD into the HP Authorised Repair Centre (ARC) as requested –their ticket instructions read “do firmware update…HP to incur costs. NO COST to customer”.
    Obviously it’s not rocket science but you need the HD going before you can apply any firmware fix including this one – HP knew that to get the HD going they would need a special fix to enable them to apply the Seagate fix.
    After all this is not an isolated case & I did point out to HP that they would need the fix I supplied (or something similar HP approved or designed if that made them more comfortable) prior to their offer of fixing the HD.
    HP said their ARC’s had all the right software for fixing their machines. In addition I have been told on several occasions, the ARC’s are the bee’s knees, the cat pajamas, the whiz kids of the PC service world “The first port of call for the repair centre agent is to download all the latest service advisory notices and updates. This is a very fundamental part of the repair process and one that we spend a great deal of time emphasizing with our authorised repair centres” Keep this in mind.
    A week later I received a call from Peter Gasporaratos, HP CS Melbourne (poor guy – caught in the middle) & stated “there is nothing else we can do for you”. When I asked if they had applied the fix he said “its not our responsibility.. its not part of our guidelines.. the ARC does not practice unauthorised methods..& this ARC will not go down this path”
    Ironically the day before, Barry from the ARC said “we can attempt it, but we will charge you too”. So HP’s own ARC will do it, but there will be a cost – but hang on a minute, didn’t PB- GMPSG say “to repair your unit at our cost. We will be utilizing our own, authorized service provider to re-install the original hard-drive and to run the software fix on that unit” & HP CS put on the instructions “HP to incur costs. NO COST to customer”.
    I.C – Do you feel
    ü HP have said they will fix it at NO COST to me, regardless of what the fix entails ?
    ü Should HP honour this commitment ?
    ü Would you do business with a company that says one thing & does another & does not honour its commitment ?
    ü That given the bricking fault did not need to happen if HP had been proactive in letting their customers know of the firmware issue & this is not an isolated case– shouldn’t they then be responsible in finding or developing a fix for getting the HD going long enough to apply the firmware fix if they are not going to use other recognised fixes.
    Abstract
    So that’s it – what do you think I.C. ?
    Would you want HP computers & servers controlling the Traffic Lights, Air Traffic Control, Patient records & Medications at Hospitals knowing that HP will not tell these organisations that there is CFI with their products & they could suddenly lose everything. All dead while they try to find a back up computer with all the data – god forbid if President Obama’s “football” is powered by an HP – Nuclear War before we know it.
    But seriously – I would love your feedback – Am I being unreasonable in asking them to honour their commitment for a $200 fix ?
    And of course HP being a Customer Focused Global Computer Services company, would welcome your feedback.
    Here are a couple of the players contact details who would love to hear from you :
    ü Keith Watson – CEO –HP NZ -I initially contacted him & he thanked me for bringing it to his attention, then nothing.
    Email : [email protected]
    ü Paul Boshoff - G M -Personal Systems Group- HP NZ – well of course you now know who he is now – he would love feedback.
    Email : [email protected]
    ü Jessica Rangi – She’s the Spokes person/PR/Marketing for HP NZ & has just help launch HP new PC range in NZ – She would love your feedback as it might impact on her marketing & she is quoted as having helped out in warranty situations before & has worked at HP head office.
    Email : [email protected]
    ü Meg Whitman - President and Chief Executive Officer of HP Global
    Email : [email protected]
    They would all like to hear from you J
    I.C
    J Thanks for being patience & reading through to the end – now it’s up to you
    L buy HP Products & Services or not.
    L Do HP deserve your hard earned money if you now believe they aren’t going tell you about problems with their Product & Services.
    Be kind to one another & take care.
    Regards
    Smithie
    P.S - I sent this blog to HP for fact & quote checking prior to uploading (I gave them over a week to reply) – the silence was deafening from HP.

    When requesting assistance, please provide the complete model name and product number of the HP computer in question. HP/Compaq makes thousands of models of computers. Without this information it may be difficult or impossible to assist you in resolving your issue.
    The above requested information can be found on the bottom of your computer or inside the battery compartment. Please do not include your serial number. Please enter the model/product information into HP's Online Consumer Support page and post it here for our review.
    I doubt the hard drive would be covered by buying an extended warranty after the fact. There is also no reason to buy a new hard drive from HP. Almost any 2.5" hard drive on the market will work in your computer. You will need your personal HP Recovery Disc set to return the computer to a factory like state. If you didn't create these discs, you will need to order a set.
    If you have any further questions, please don't hesitate to ask.
    Please click the white KUDOS star to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • How to prevent JaxB creation of 2 Interfaces for each Element?

    hi,
    does any body know how to prevent JaxB creation of 2 Interfaces for each Element (The Content Interface and the element interface)?
    I want to configure JaxB to use only one Interface and only one implementation Class.
    Thank's,

    I am sorry I can not answer your question, I have got the same problem. Could you please email me to
    [email protected] when you know the answer, please.
    I have a question for you. When and complex type is validated, I get the object which contains the error. ( or objects ).
    However. How do know the position in the actual parent object. basically. Is there a way to know exactly the position of that attribute in that object. I need to store errors strings.
    The first problem derives from this one:
    It is not possible to execute validate function for a primitive attribute inside an structure.
    I would appreciate your help.
    Thanks.
    Gustavo.

  • Problem validating xml file - jaxb

    hi people, I'm working with jaxb to generate Java source classes from the .xsd schemas that I have. I work with 17 schemas that, a priori, I can't modify. In those schemas there are a lot of types and structures that I can use when creating an .xml file. I've read other threads with the problem of namespaces but as a solution they provide a modification on the schemas. The generation of java source is ok, I've done custoization classes and no problem, but when I try to unmarshal an input xml file I get an error of validation:
    DefaultValidationEventHandler: [ERROR]: Probably namespace URI of tag "XFFile" is wrong (correct one is "http://ww........
    A possible xml file is :
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE XFFile><XFFile xmlns:rp210Elements="http://www.smpte-ra.org/schemes/434/200X/multiplex/S377M/2004" xmlns:s377mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S377M/2004" xmlns:s377mMux="http://www.smpte-ra.org/schemes/434/200X/multiplex/S377M/2004" xmlns:s377mTypes="http://www.smpte-ra.org/schemes/434/200X/types/S377M/2004" xmlns:s380mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S380M/2004" xmlns:s381mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S381M/200X" xmlns:s382mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S382M/200X" xmlns:s385mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S385M/2004" xmlns:s422mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S422M/200X" xmlns:s422mTypes="http://www.smpte-ra.org/schemes/434/200X/types/S422M/200X" xmlns:s423mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S423M/200X">
         <s380mGroups:ClipFramework rp210Elements:InstanceID="a6.67.7a.47.19.2f.4b.10.8f.ee.1e.59.6d.4c.f1.70" rp210Elements:LinkedGenerationID="0e.10.a8.9c.96.1c.4c.11.b1.fb.0a.a9.40.22.a4.e2">
              <rp210Elements:ClipCreationDateTime>
                   <rp210Elements:Year>2006</rp210Elements:Year>
                   <rp210Elements:Month>4</rp210Elements:Month>
                   <rp210Elements:Day>18</rp210Elements:Day>
                   <rp210Elements:Hour>12</rp210Elements:Hour>
                   <rp210Elements:Minute>0</rp210Elements:Minute>
                   <rp210Elements:Second>0</rp210Elements:Second>
                   <rp210Elements:mSec4>0</rp210Elements:mSec4></rp210Elements:ClipCreationDateTime>
              <rp210Elements:FrameworkExtendedTextLanguageCode>fr</rp210Elements:FrameworkExtendedTextLanguageCode>
         </s380mGroups:ClipFramework>
    </XFFile>
    I think it's ok because someone has provided it to my company but I can't validate it because it takes elements from many schemas (am I wrong and I can?)
    i can't post the schemas because of the copyrights (damn it). I'm not asking for a solution but if someone has an idea or has had a similar problema.. I'll appreciate all comments, thanks
    Jordi
    Message was edited by:
    WuWei

    In the schema root element xs:schema add namespace declaration.
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    In the XML document root element add xmlns:xsi and xsi:noNamespaceSchemaLocation attributes.
    <root_element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://c:/testing.xsd">

  • JAXB compiler problem in handling xsd:any and nillble = "true"

    Dear all,
    i am using jdeveloper 10.1.3.1 production release version.
    i am designing a xml schema that contain element of attribute nillable="true", for extensible, contain tag <xsd:any>.
    but i encounter 2 problem:
    1. for xml schema element with attribute nillable="true", no corresponding isNil(), setNil
    method is generated (refer to jaxb 1.0 spec. 5.7.1)
    2. cannot handle tag <xs:any> that generate incorrect java source code (cannot compile) [refer to jaxb 1.0 spec 5.9.5)
    *** i have add jaxb customization tag inside the <xs:any> tag
    ***   <xs:annotation><xs:appinfo>
    ***               <jaxb:property name="Extension"/>
    ***</xs:appinfo></xs:annotation>
    Does oracle's JAXB implementation conform to the JAXB 1.0 spec?
    Is it a known bug?
    Could anybody help me?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Refer to section
    E.2 Not Required XML Schema
    concepts
    "A JAXB implementation is not required to support the following XML Schema
    concepts for this version of the specification. A JAXB implementation may
    choose to support these features in an implementation dependent manner."
    E.2.2 Not supported while manipulating the XML
    content
    Schema component: wildcard
    (any)
    how can i know if an xml element with xsi:nil="true" (unmarshal)
    and set xsi:nil="true" for an element (marshal) ?
    According to the JAXB 1.0 specification:
    If {nillable} is "true", the methods setNil() and isNil() are
    generated.

  • Problem in JAXB for processing XML files

    hello
    I have been working on a project where i need to process data in XML format. the flow goes thus
    I have 28 data elements that i need to represent as a XML so i compile the schema files and generate the class files for each of the tags and thus i can use the get and set methods to read and write to a XML file respectively(example getName and setName)......
    Now the problem is that my coding is done if i change my xml file and add say 2 more tags how do i handle it in my code.........
    1>Do i have recomplie the schema file and generate new class files every time the xml structure changes. can i avoid this recompiling process and use a one time genrated class files even if the xml structure changes.
    2>Now i have hard coded the get and set methods for processing the xml file if i add new tags to my xml i wouldnt have the get set methods for the new tags in my code(say i add a new tag as Phone then i wouldnt have the codes getPhone and setPhone called in my code and this tage was added after the coding was done)........how do i handle this situation. Is is possible that i can get and set data without using these methods and use some sort of a dynamic way of getting and setting data.............
    3>Any other approach available to meet the above requirements other than JAXB.
    Please help for the above problem
    Thank you

    hi,
    i had written a xml and schema to validate.
    my xml would be
    <output>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    </output>
    schema should validate : each table should contain atleast one row element and each row element should have atleast one column. similarly, each document should have atleast one properties and contents element.
    if any of these things occur. for ex: if there is no row element in table, i need to delete the table tag. similary if there is no properties/content or both element in document it should delete the corresponding document from the xml.
    i tried for table if there is no row element am getting the line number of the </table> tag, based on that am deleting the table element. if there is no properties tag and contents tag is there. am getting the line number for <contents>start tag, with which i could not able to delete the whole document.
    can anybody plz help me out for this requirement

Maybe you are looking for

  • How to Setup yum with OEL

    Hi, Can I setup yum with the official Oracle Enterprise Linux repositories? If yes, what repo lines do i have to add to my yum.conf file? Regards Joao

  • JFrame's title's text alignment (RIGHT or CENTER)

    hi all do naybody know that how i can to align title's text of JFrame title bar ? thanks

  • Files for formatting the reports

    could anybody please tell me the what are the files we need to modify the formattings to the already existings formats.in obiee tool where those files available...any body have any scripts to modify it (i never find doument on these formatting could

  • Logic pro8, reaktor 5

    Ive just purchased Reaktor 5 and while I was setting it up I had to nominate a path to save ensembles, now everytime I create a new project in logic it will not let me save it in my normal project file location, It saves in the file that I set up in

  • Rebate Processing Periodic Payment

    Hi, I am implementing rebate process and wants to know configuration required to be done for enabling Periodic payment and how we can make it done based on Billing date instead of service rendered date, if possible