Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:35:05+00:00 2026-06-17T04:35:05+00:00

I’m trying to change the Java JDK version for an existing application from Java

  • 0

I’m trying to change the Java JDK version for an existing application from Java 5 to Java 6 (update 38). The application uses some JAXB generated classes to marshal/unmarshal XML that we send/receive from a remote server. The XML conforms to a schema (.xsd) file.

This all used to work fine under Java 5 with a downloaded bundle of JAXB binaries in the classpath. I’m not sure what the version of the downloaded JAXB binaries was (this project was already here before me). If I just change the JDK version from Java 5 to Java 6 (update 38), then I get a few unit test failures that never happened before, such as:

[org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '2012-08-22T00:00:00-04:00' is not a valid value for 'date'.]

I thought I might be able to solve this by moving the Java 6 JDK to the head of the classpath, so it is found before the external JAXB binaries. That yielded compile-time errors, such as:

The attribute required is undefined for the annotation type XmlElementRef

This error was reported on one of my JAXB-generated classes (based on the .xsd file). The error was caused by this annotation line:

@XmlElementRef(name = "DealCalendarId", type = JAXBElement.class, required = false)

So, I’m not sure what I need to do next. I have a few ideas:

  • Remove the downloaded JAXB binaries and rely only on the built-in JAXB support in Java 6 SE (but I seem to remember this not working on a project some time ago…)
  • Replace the downloaded JAXB binaries with a newer version
  • Replace the downloaded JAXB binaries with a newer version AND put the Java 6 JDK after them in the classpath
  • Do one of the above and also regenerate all my JAXB classes that are based on the .xsd

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:35:07+00:00Added an answer on June 17, 2026 at 4:35 am

    Issue #1

    [org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1:
    ‘2012-08-22T00:00:00-04:00’ is not a valid value for ‘date’.]

    Only going by this message 2012-08-22T00:00:00-04:00 is not a valid value for the XML Schema date type, a valid value would be 2012-08-22 without the time information. The value you presented would correspond to the dateTime type. It is possible that the other version you were using just wan’t performing this validation.

    Issue #2

    The attribute required is undefined for the annotation type
    XmlElementRef

    Java SE 6 contains JAXB 2.1, you must have been using JAXB 2.2 with Java SE 5 where the @XmlElementRef annotation contains the required property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.