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 4076364
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:24:56+00:00 2026-05-20T17:24:56+00:00

I have been stacked in this place for few days. any help will be

  • 0

I have been stacked in this place for few days. any help will be appreciated.

Here is my story:
I have a JPA entity class (ExtOffer), and Now I annotate it with JAXB annotation in order to do marshall/unmarshall by JAXB. And I also create a wrapper class(ExtOffers), which basically is a collection of ExtOffer.
And when I call JAXBContext.newInstance(ExtOffers.class), I got an IllegalAnnotationsException:JAXB annotation is placed on a method that is not a JAXB property.

I search google and some post says that it’s due to annotate @XmlElement on wrong place.
But my class has @XmlAccessorType(XmlAccessType.NONE) annotation and only the getter method has been annotated with @Xmlelement.

below is my ExtOffer class and ExtOffers class:

//ExtOffer:

@Entity
@Table (name = "extoffer")
@XmlType(name = "ExtOfferType")
@XmlAccessorType(XmlAccessType.NONE)
public class ExtOffer {
    public ExtOffer() {
    }
        @Id
    @Column(name = "OfferID", nullable = false, unique = true, length = 32)
    protected String offerId;

    @Column(name = "HasMoreScreenShot", nullable = false, unique = false, length = 1)
    private String hasMoreScreenShot;

        public void setOfferId(String offerId) {
        this.offerId = offerId;
    }

    @XmlElement(name="OfferID", required = true)
    public String getOfferId() {
        return offerId;
    }

        public void setHasMoreScreenShot(String hasMoreScreenShot) {
        this.hasMoreScreenShot= hasMoreScreenShot;
    }

    @XmlElement(name = "HasMoreScreenShot")
    public String GetHasMoreScreenShot() {
        return hasMoreScreenShot;
    }
}

//ExtOffers wrapper

@XmlRootElement(name="extoffers")
@XmlAccessorType(XmlAccessType.NONE)
public class ExtOfferWrapper {


    private List<ExtOffer> extoffers;

    public ExtOfferWrapper() {

    }

    @XmlElement(name="extoffer")
    public List<ExtOffer> getExtoffers() {
        return extoffers;
    }

    public void setExtoffers(List<ExtOffer> extoffers) {
        this.extoffers = extoffers;
    }
}

JAXB annotation is placed on a method that is not a JAXB property
    this problem is related to the following location:
        at @javax.xml.bind.annotation.XmlElement(nillable=false, name=HasMoreScreenShot, required=false, defaultValue=, type=class javax.xml.bind.annotation.XmlElement$DEFAULT, namespace=##default)
        at com.symbio.fuhu.appstore.jpa.entity.ExtOffer
        at public java.util.List com.symbio.fuhu.appstore.jaxb.mapping.wrapper.ExtOfferWrapper.getExtoffers()
        at com.symbio.fuhu.appstore.jaxb.mapping.wrapper.ExtOfferWrapper
  • 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-05-20T17:24:57+00:00Added an answer on May 20, 2026 at 5:24 pm

    You have an upper case ‘G’

    @XmlElement(name = "HasMoreScreenShot")
    public String GetHasMoreScreenShot() {
        return hasMoreScreenShot;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have been sitting with this problem for a few days and really can't seem
Have been trying to fix this problem I have here. Basically I have a
Have been working on this question for a couple hours and have come close
Have been getting pretty bald over this situation! I am using MS VS 2010
I have been asked to write a GUI that will allow objects to be
Have been following this fabulous tutorial . Being new to Javascript and functional programming,
Have been hearing all around ArrayList getting obsolete these days. But I do have
I have a form that will multiple Panel controls stacked on top of each
There have been a couple of questions very close to this topic, but none
I have been given a design with a number of variable height items stacked

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.