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

  • Home
  • SEARCH
  • 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 7822149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:50:45+00:00 2026-06-02T07:50:45+00:00

Heyho, i’m currently having problems with the JAXB serialization process. jaxb version 2, used

  • 0

Heyho,

i’m currently having problems with the JAXB serialization process.
jaxb version 2, used for serialization properties.

Is it possible to add multiple package level annotations in “package-info.class”? Currently i’m creating this file manually, there’s already one “adapter entry” in it and it has to stay there. Although i’m searching like an idiot, every example is with just one entry, but i guess that’s just not possible, because the semantic should be more flexible, allowing multiple package level annotations than just one.

The problem is, that i’m using a @XmlJavaTypeAdapter(AdapterForMap.class) on every map-member in a class, but the map actually contains another type (as value), let’s say Font, which needs to have a appropriate xml adapter. At the moment i’m not able to use this Font-Adapter-like, because ‘package-info.class’ already has one entry.

thanks in advance! 🙂

  • 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-02T07:50:46+00:00Added an answer on June 2, 2026 at 7:50 am

    The @XmlJavaTypeAdapters can be used at the package level to register many instances of @XmlJavaTypeAdapter.

    package-info

    @XmlJavaTypeAdapters({
        @XmlJavaTypeAdapter(type=DateTime.class, value=DateTimeAdapter.class),
        @XmlJavaTypeAdapter(type=DateMidnight.class, value=DateMidnightAdapter.class),
        @XmlJavaTypeAdapter(type=LocalDate.class, value=LocalDateAdapter.class),
        @XmlJavaTypeAdapter(type=LocalTime.class, value=LocalTimeAdapter.class),
        @XmlJavaTypeAdapter(type=LocalDateTime.class, value=LocalDateTimeAdapter.class)
    })
    package blog.jodatime;
    
    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;    
    import org.joda.time.*;
    

    For a Complete Example

    • http://blog.bdoughan.com/2011/05/jaxb-and-joda-time-dates-and-times.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Heyho, I'm building a custom green back button which is being created in the
Heyho, I need to grab some datas from actions which been done from date
Heyho, I'm trying to set a Procedure like: Create or Replace Procedure MyProcedure1( x
Heyho, I've gotta write a Procedure which Inserts a resultset from a select-statement into
HeyHo, I'm entering a name in the following website and submit this name with
Heyho again, I have two elements and want to position one of it relative
Heyho! I've a little app running as LSUIElement with a NSStatusItem . Sometimes the
Heyho, There´s a question in my mind for some time now, which hopefully can
I want to match a String which looks like this: [lang_de]Hallo![/lang_de][lang_en]Hello![/lang_en]HeyHo[lang_es]Hola![/lang_es] I want the
Heyo, I'm currently working on a project where I need to place the camera

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.