JAXB Marshalling of "double" problem - exponent is in the way

An element declared as "xsd:double" in the schema is marshalled by JAXB as "3.000404E-4" to represent 0.0003000404 . When I try to process this XML document using XSLT, the standard number() function returns "NaN" because of the exponent in the representation of the number.
Is there any way to have JAXB marshall this number in a way that is acceptable to XSLT?
Thanks,
-Allan

This seems to have a solution by using JAXB custom bindings. See http://forum.java.sun.com/thread.jsp?forum=34&thread=507037
Thanks anyway.
-Allan

Similar Messages

  • Double Problem

    I am recently unable to download anything from the App Store.
    It just fails to download... all the time.
    Some days ago, I was sent an email verification mail; but whenever I try to verify, it says they are unable to verify the link I am using.
    What should I do?

    The problem is likely with the way the double is being formatted & displayed, not its actual binary value. Find the code where the double is converted to the string, and figure out who's doing the formatted (java.text.DecimalFormat?). That should point you in the right direction.

  • Investigating a problem that's beyond the readily available technical support.

    I've been having a problem with LR 4.4, apparently with a corrupt catalog, about which I've spoken at length with Technical Support in India several times, with discouraging results.  The first three calls were with first-level support people; it became abundantly clear that the knowledge of these people is very limited: they couldn't even comprehend the nature of the problem.  I then spoke this Friday evening for about three hours with a supervisor, a very pleasant man who clearly had a quite sophisticated knowledge of the workings of LR4 and tried very hard (and long) to help me resolve the problem.  After three hours of meeting with continued frustration, he suggested he'd bring up the issue with colleagues at a Technical Support meeting they're having this coming Monday and then call me back.  In the meantime, when I tried to start up LR to explore the problem further on my own, I found that it wouldn't launch.  I've been through some of the more thoughtful discussions about this issue on this site, but none I've seen so far looks promising.
    At this point, there seems to be no recourse with Adobe, beyond calling the Technical Support number that connects me with the facility in India.  Does anyone know of any other approach?
    Thanks for your attention.

    I'll give it a try, but it's best done with a screen-shot, which I now can't make because I after my last telephone support session, I can't launch LR.
    My catalog is corrupt.  That was revealed by the support supervisor during the recent three-hour marathon session in which I gave him control of my computer.  He elicited a corrupt-catalog error message, but unfortunately I don't know how and I don't have a copy.
    I'm running  LR 4.4 under Windows 7 (updated) on a Dell Optiplex 760. My image files  are arranged chronologically under C:/Users/MyName/My Pictures in folders by year, one folder per year. Within each year there are sub-folders containing the image files (mostly Nikon raw), one for each date on which the images were captured. (For example,  C:/Users/MyName/My Pictures/2013/2013-04-24.)  (My image files occupy about 400 GB of disk space and are backed up, as are my Lightroom data.)
    The main superficial symptom of the problem is the following: For the most part, the arrangement of folders in LR (as seen in the left panel in the Library module) has exactly the same struture (e.g., My Pictures/2013/2013-04-24), except for the year 2013.  That year's folder contains many but not all of the by-date folders that are on the hard disk.  However, I have imported those files.  They appear under a second top-level folder in LR, the exact name of which, I can't recall for sure.  Those folders cannot be moved into the proper tree because the folders already exist there.  Now, when I try to import new recently captured images, they appear by date-of-capture under the second top-level folder, not the the "proper" one.
    One could argue, "Why not just go along this way since what really counts is organizing your images by collection sets, collections, keywords, etc.?"  While I sympathize with this suggestion, I have two problems with it.  1) I rely quite a bit on a well-organized folder structure and 2) the problem reflects a corrupt catalog (with other unknown consequences down the road).
    I'm hoping that the support supervisor will have a solution on Monday, but I'm not confident.  Furthermore, what little confidence I at the end of the support session was further eroded by finding that I couldn't launch LR.  I realize I could try re-installing LR, but the problem is messy enough as it is.
    It's possible that I created this problem myself somewhere along the way during a recent version upgrade (and catalog upgrade) and subsequent manipulations, but regardless of the cause, I need to have it fixed.  Unfortunately, trying to deal with Adobe support is like dealing with a brick wall.
    Thanks for your attention.

  • JNI Problem - JAVA invoke C++ and the way back from C++ to JAVA

    Hi @ all!
    I am a computer science student and I have a problem with the JNI Interface.
    First the program structure:
    We have a Java GUI a wrapper and a C++ protocol. That is the general communication way:
    left side:
    JAVA GUI
    |
    Wrapper (JAVA)
    |
    C++ protocol
    |
    |
    Network transfer
    |
    |
    C++ protocol
    |
    Wrapper (JAVA)
    |
    JAVA Gui
    The program sequence is following:
    - The GUI will be started and call a protocol init method in the native code. The JAVA and C++ instance are already running!!
    - The protocol handles some information.
    - Then the left side e.g. invoke a method. The protocol transmits the packet to the other side. But HERE is the problem. On the other side the protocol must call a static JAVA Method from the running JAVA instance.
    I have no idea how I can handle this problem. I tried to save the env pointer und the jobject at the first invocation from Java to C++. With this elements I tried to getObjectClass(saved jobject) and tried to invoke the static JAVA method but I got a SIGSEGV from the JVM.
    How can I solve this problem??
    By the way, I generate through the java wrapper my C++ header and the the Java wrapper load a shared object!
    I work with a Gentoo System and with Java 1.5.
    I hope anybody can help me!
    Cheers,
    Edited by: polo6n2 on Jul 3, 2008 1:04 AM

    You mean the communication is aschronous?
    Then the C++ side will have a C++ thread. That thread calls a method. That method FIRST uses the JNI method to attache the thread.
    Then you look up whatever you need in java, maybe a class and you call JNI methods to interact with it.
    If you don't attach the thread it will not work.
    JAVA method but I got a SIGSEGVThen you did something wrong in your C++ code.

  • JAXB Marshalling

    Hi,
    jaxb marshalling for a xml file takes 8 secs in one system but it takes 1/2 min in another system for the same file. I want to know how to identifyu if there is any difference in the parsers being useed. I searched the Manifest files but unable to find reference to the parser being used. I even compared the version numbers of the API in the Manifest file and all the jars seem to be same version.
    Please help me in identifying what could be the problem.
    Thanks,
    Ravinder

    I don't know anything about either of the computers involved or the XML document involved, but I will take a guess and say there are differences in network access between the two computers.

  • JAXB Marshalling devouring memory

    Hi there.
    I noticed some disturbing behavior with how JAXB marshals large XML documents. I have around 5000 data objects which, when marshalled, result in an XML document about 9.5 mb in size. Prior to calling marshal(), I had over 47mb available on my Heap. Before this method returned, an OutOfMemoryError had been thrown. I was able to fix this problem by setting my max Heap size to 128mb.
    My concern is how this will scale with larger data sets, as I don't want to keep throwing more and more ram at the problem. I haven't run any concrete benchmarks yet, but I was wondering if anyone has run into this problem before and could share some numbers with me.
    Thanks in advance!

    Immediately prior to calling marshal(), I have approx 47 mb available out of an original 64. So for 5000 catalog items, I'm using a max of 17 mb; that's 3.4 k for each item bound to JAXB. That's not unacceptable. The problem is that in the process of marshalling this data to XML, over 50 mb is being consumed. This XML is sent to a remote Web Service (the spec allows for xml up to 35mb), so the size of the document is not unreasonable.
    I did a little benchmarking, and found this behavior to scale fairly linearly, which is a Good Thing (128mb per 9000 items). However, I'm wondering if JAXB allows for more efficient memory management for marshalling larger data sets (i.e. Serializing binding objects to disk until it's time to build them to xml, or releasing objects as soon as they're marshalled).

  • 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

  • IE margin doubling problem

    I am working on a site. I have a floated horizontal list of items at the very top of the header. It looks fine in Firefox and Safari but in IE 8 it forces the last item on to a second line. I have read about the margin doubling problem with IE and I've tried all sorts of ways to keep this from happening but can't seem to figure it out.
    http://www.prospectrealty1.fatcow.com/index.html
    any help on how I can keep the floated list all on one line in IE will be very much appreciate.
    thanks!

    markf12 wrote
    The problem is with the line of text (address, phone, etc) at the very top of the header, not the nav. It looks fine in Firefox and Safari but not in IE. I believe it's because of the IE margin doubling that I have learned about. I've got the string of text/ bullet list so it fills the space with 20 px space on each end. When IE adds extra margin it forces the last item (email address) down onto a second line. 
    I'm thinking of replacing all but the email address with a jpg image. Leaving the email address as a link that can be clicked. I was hoping to find a fix for this IE problem so I could keep it all as text which is a better practice as I understand it.
    Oh ok I didnt see that because in Adobe Browser lab the text is showing all on one line in IE7, IE8 and IE9 so it would be difficult for me to diagnose.
    I can tell you though it has nothing to do with double margin bug as IE8 and IE9 corrected that. It was only present in IE7 maybe and certainly in IE6. However having said that the IE double margin bug only occurred when you had a floated element which had a margin applied to it in the same direction as the float, i.e. if you floated an element left and then attached a left margin to that element also the margin would double. The solution was to add display: inline; to the elements css selector BUT you have no left margin set on the <li> tag.
    It is most likely as Nancy points out an engine difference in the way IE browsers size the text. Does this occur if you use px instead of em? If not use px....I never use em myself as I've found it does cause issues ocassionally. Also its not good practice to fill a whole horizontal line with text information where you want its visual appearence maintained, very bad. Horizontal menus never work and lines of text never do either. The art of designing a webpage is allowing enough space so the text can 'grow' into in the case when a browser interprets the text size slightly differently. Obviously that's difficult if you are re-creating this webpage build for some designer who has little knowledge of good web design practices.
    In cases where a client is absolutely definitive that they want too many links in a horizontal menu or a line of text, which must remain on one line, I would have no hestitaion about using an image. Just give the image an 'alt' and if the image is surrounded by an anchor tag give that a 'title' tag. That will keep your page 'user' friendly for those who have a disabilities.

  • Double problem in string conversion

    I'm working on a web application. (this questions is not we related.. just giving some background to the problem) I populate a number of fields in a bean back in my business logic as Decimals. Then going up a level I do all the data manipulate I need to for display purposes and store the values as a String inside my bean. Then I pass that bean on to my jsp and it displays my values....
    Now the problem I just realized I have is that in some cases the decimal values are larger then 8 digits in length. So when I convert to a string by saying decimalVariable+""
    I end up with an exponential value.
    There are several solutions to this... but the problem is that I have thousands of places this is being done... so instead of going in and changing every decimal to a bigDecimal or going in and changing the way I convert to a string in each place, I wanted to know if I could change the toString method for Decimal.. and how to go about doing that...

    As far as being bad code... I'm keeping my mouth shut on that one.. because I've been known to do the same thing.. I just can't believe we have made it so far
    into development without this being brought to anyone's attention.Didn't mean to offend you on the bad code. :) I thought the same ("how did it go so long?") when I found our problem (and many other problems in our code).
    So my options are pretty much
    1. change all double to BigDecimal
    2. use numberFormatter anywhere it is being
    converted to a string... or actually anywhere where
    the number can possible be longer then 7 characters
    long....Use a number formatter (such as DecimalFormat) everywhere. No need to figure out whether it is needed in each case.
    I think the best solution would be to switch to BigDecimal.. but that would take a MAJOR amount of
    work... I think there are around 6K java files in this project... probably every single one of them uses a double somewhere in the class...
    hmmm July 1st Beta test deadline might be hard to meet :)Same reason why we're stuck on Java 1.3.1 at work...deadlines and possible regression issues. :(

  • JAXB marshal "lt;" and "gt;" instead " " and " "... URGENT

    Hi!
    I defined in jaxb that some tag (un)marshal (from/to) org.w3c.dom.Document.
    But when jaxb marshalling, the assigned document has got
    "lt" instead "<"
    "gt" instead ">".
    This is "equals" characthers when is represent in browser, but itegrity of xml file in not same.
    How can I forced "<" and ">"?
    Please, can me anybody help?

    I assume you mean it displays the following substitutions in the output document.
    & lt;      <      less than
    & gt;      >      greater than
    & amp;      &      ampersand
    & apos;      '      apostrophe
    & quot;      "      quotation mark
    { I have had to add an artificial space after the & in the entity reference, to prevent this forum from doing the entity reference subsititution even!}
    These are predefined entity references, which are required for valid xml. Since xml element are delimited by '<' and '>', the parser needs to know that you are not trying to define new elements when you use these characters in element text.
    If you use a parser on the output xml, you will get '<' and '>' back as the resulting element text.
    Scott
    http://www.swiftradius.com

  • GreenSock Doubling Problem (Bug?)

    I've run into an issue where if I set the visibility to an object that is being tweened to 1, GS creates a second instance of the object.
    In the attached file, click the 'btn' and notice that a 2nd row of envelopes is created and they are not blitted like the original instance.
    Bug or operator error?
    Thanks.
    www.thepixelfarm.com/tmp/GS_doublingProb01.zip

    This is NOT a bug. See the answer in the GreenSock forums:
    http://forums.greensock.com/topic/6163-greensock-doubling-problem-bug/

  • Every time I type a double u (can't type the letter) my computer beeps several times and takes me to Mozilla Firefox Help Page. This is very frustrating to say the least. Please help me fix this problem. Thank You Immensly!!!

    The details are Mozilla Firefox Help takes over my computer every time I type a double u (can't type the actual letter or it takes over and beeps 4-5 times then brings up Mozilla Firefox Help screen

    See:
    *https://support.mozilla.com/kb/Firefox+keeps+opening+many+tabs+or+windows

  • JAXB marshalling error..

    Hi, below codes is working properly with normal java app. ( public static void main(String[] args) { ... } )
    try {
        FileOutputStream fout = new FileOutputStream(new File("C:/workspace/mysearch/data/", name));
        JAXBContext ctx = JAXBContext.newInstance(Project.class);
        Marshaller marshaller = ctx.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
        marshaller.marshal(project, fout);
    } catch (JAXBException ex) {
          ErrorManager.getDefault().notify(ex);
    } catch (Exception ex) {
          ErrorManager.getDefault().notify(ex);
    }but, it is not working with the Netbeans WizardAction's performAction() method. below is error messages.
    javax.xml.bind.JAXBException:
    at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:96)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:205)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
    at dstinfo.mysearch.wizard.ProjectWizardAction.actionPerformed(ProjectWizardAction.java:56)
    at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:89)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6216)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Heya,
    I have no supportting evidence for this, but I'd assume if you annotate the property in the way shown in your example, the framework would then try to generate the appropriate getter() method to be used when marshalling the data. I'd guess you could annotate the property with the @XmlTransient annotation and use the default getter() method and avoid this error, no ?
    Good luck,

  • Problem with models in the enterprise service builder

    Hi all,
    I get this message from the enterprise service builder, when i double click on one of the models on the tree on the left of the builder itself.
    the message says:
    Error Initializing Business Modeling
    Initialization of business modeling cannot be started. You cannot work with business modeling. Check tht all required configutarion objects are available
    i made all the wizards suggested in /people/werner.steyn/blog/2008/03/03/how-to-look-like-a-hero-with-netweaver-ce-esr-sr
    please someone can help me to understand what the massage means?
    what is a configuration object? what can i do to fix the problem?
    thank you very much

    closed

  • When browsing a new library that I created, the browser shows dotted lines around grey rectangles, no images. When I double click on a rectangle the image appears. How do I get images to appear in the browser rectangles?

    When browsing a new library that I created and exported onto an external hard drive, the browser shows dotted lines around grey rectangles, no images. When I double click on a rectangle, the image appears, but all the other rectangles remain empty - no image. How do I get images to appear in the browser rectangles? I am viewing this on a second computer (an older intel duo iMac), not the one I created the library on (a MacBook Pro). Both computers have Aperture 3.2.4 installed. When I return the external to the MacBook, all images appear in browser rectangles. What's happening on the iMac?

    You may have a problem with the permissions on your external volume. Probably you are not the owner of your library on the second mac.
    If you have not already done so, set the "Ignore Ownership on this Volume" flag on your external volume. To do this, select the volume in the Finder and use the Finder command "File > Get Info" (or ⌘I).
    In the "Get Info" panel disclose the "Sharing & Permissions" brick, open the padlock, and enable the "Ignore Ownership on this Volume" flag. You will have to authentificate as administrator to do this.
    Then run the "Aperture Library First Aid Tools" on this library and repair the permissions. To launch the "First Aid Tools" hold down the ⌥⌘-key combination while you double click your Aperture Library. Select "Repair Permissions" and run the repair; then repeat with "Repair Database". Do this on the omputer where you created the library and where you can see the thumbnails.
    Then check, if you now are able to read the library properly on your iMac.
    Regards
    Léonie

Maybe you are looking for

  • Ipad 3 sends and receives email but can no longer connect to the Internet with Safari.

    Other Ipads in house (Ipad 3 and Ipad 2) work fine. Iphones, Imac also work fine. I have rebooted the Ipad, renewed the lease, closed and reopened Safari, turned airplane mode on/off, etc. etc. Ipad also won't connect to Itunes. Basically, I have run

  • What's the security code for my C3?

    I forgot to ask the password for my nokia c3 ,pliz help me to put the security code Moderator's note: The subject was amended. Better subject was provided.

  • Error message: my computer can't identify Safari

    Can someone please take a look at this message I'm getting whenever I start to open Safari?  So far, I've never gone past it. Thanks for any assistance! lenms

  • Oracle 8 and 9 for intel on XP problem

    When I start the setup of Oracle 8 or 9 on my XP machine - nothing happen. The setup doesn't start. Why ? Is it possible to install 8 & 9 on the same XP machine ? Thanks for your help. Roger

  • Wish list error

    whenever i go to open up my wish list, it shows its loading and after a couple of minutes it says theres an error. it rarely works right. also, i want to delete some tv shows off my wish list but the descriptions r so long that the x button doesnt sh