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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:06:06+00:00 2026-06-14T03:06:06+00:00

The client code looks like: String urlGetRequestsByCustomer = baseUrl + getRequestsByCustomer?customerID=; byte[] getRequestsByCustomerResponse =

  • 0

The client code looks like:

String urlGetRequestsByCustomer = baseUrl + "getRequestsByCustomer?customerID=";

byte[] getRequestsByCustomerResponse = customerAgent
.sendGetMethod(urlGetRequestsByCustomer + custNo);
Unmarshaller unmarshaller = customerAgent
.getUnmarshaller(ServiceRequests.class);
 StringReader reader = new StringReader(new String(
getRequestsByCustomerResponse));

ServiceRequests.java

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class ServiceRequests {


@XmlElement(name = "serviceRequest", type = ServiceRequest.class)
private List<ServiceRequest> requests = new ArrayList<ServiceRequest>();

/**
 * 
 */
public ServiceRequests() {
}

public ServiceRequests(List<ServiceRequest> requests) {
    this.requests = requests;
}

/**
 * @return the requests
 */
public List<ServiceRequest> getRequests() {
    return requests;
}

/**
 * @param requests
 *            the requests to set
 */
public void setRequests(List<ServiceRequest> requests) {
    this.requests = requests;
}

}

ServiceRequest.java

@Entity
@Table(name="SERVICE_REQUEST", uniqueConstraints = {@UniqueConstraint(columnNames=
{"SRNO"})})
@SequenceGenerator(name="SERVICE_REQUEST_SEQUENCE",     
sequenceName="SERVICE_REQUEST_SEQUENCE", initialValue=1, allocationSize=100)
@NamedQueries({
@NamedQuery(name="serviceRequest.getBySrNo",query="SELECT request from ServiceRequest 
request WHERE request.srNo = :srNo")
})

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class ServiceRequest implements Serializable {

private static final long serialVersionUID = 5047875961706019225L;

@Id @GeneratedValue(strategy=GenerationType.SEQUENCE, 
generator="SERVICE_REQUEST_SEQUENCE")
@Column(name="SRNO",  nullable=false)
private Long srNo;

@Column(name="DESCRIPTION")
private String description;

@Column(name="STATUS") 
private int status;


@ManyToOne(fetch=FetchType.EAGER , cascade=CascadeType.DETACH)
@JoinColumn(name="CUSTNO", referencedColumnName="CustNO")
private Customer customer;

@Column(name="DATECREATED")
private Date dateCreated;

@Column(name="DATEUPDATED")
private Date dateUpdated;

@Column(name="UPDATEDBY")
@ManyToOne(fetch=FetchType.LAZY, cascade=CascadeType.DETACH)
@JoinColumn(name="updatedBy")
private Employee updatedBy;

public Employee getUpdatedBy() {
    return updatedBy;
}


public void setUpdatedBy(Employee updatedBy) {
    this.updatedBy = updatedBy;
}


@OneToOne(fetch=FetchType.LAZY, mappedBy="serviceRequest", 
cascade=CascadeType.DETACH)
private CustomerSurvey survey;


/**
 * @return the dateUpdated
 */
public Date getDateUpdated() {
    return dateUpdated;
}


/**
 * @param dateUpdated the dateUpdated to set
 */
public void setDateUpdated(Date dateUpdated) {
    this.dateUpdated = dateUpdated;
}


/**
 * @return the survey
 */
public CustomerSurvey getSurvey() {
    return survey;
}


/**
 * @param survey the survey to set
 */
public void setSurvey(CustomerSurvey survey) {
    this.survey = survey;
}

public ServiceRequest() {
}


/**
 * @return the srNo
 */
public Long getSrNo() {
    return srNo;
}

/**
 * @param srNo the srNo to set
 */
public void setSrNo(Long srNo) {
    this.srNo = srNo;
}

/**
 * @return the description
 */
public String getDescription() {
    return description;
}

/**
 * @param description the description to set
 */
public void setDescription(String description) {
    this.description = description;
}

/**
 * @return the status
 */
public int getStatus() {
    return status;
}

/**
 * @param status the status to set
 */
public void setStatus(int status) {
    this.status = status;
}

/**
 * @return the customer
 */
public Customer getCustomer() {
    return customer;
}

/**
 * @param customer the customer to set
 */
public void setCustomer(Customer customer) {
    this.customer = customer;
}

/**
 * @return the dateCreated
 */
public Date getDateCreated() {
    return dateCreated;
}

/**
 * @param dateCreated the dateCreated to set
 */
public void setDateCreated(Date dateCreated) {
    this.dateCreated = dateCreated;
}

/* (non-Javadoc)
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result
            + ((dateCreated == null) ? 0 : dateCreated.hashCode());
    result = prime * result
            + ((dateUpdated == null) ? 0 : dateUpdated.hashCode());
    result = prime * result
            + ((description == null) ? 0 : description.hashCode());
    result = prime * result + (int) (srNo ^ (srNo >>> 32));
    result = prime * result + status;
    return result;
}

/* (non-Javadoc)
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null) {
        return false;
    }
    if (!(obj instanceof ServiceRequest)) {
        return false;
    }
    ServiceRequest other = (ServiceRequest) obj;
    if (dateCreated == null) {
        if (other.dateCreated != null) {
            return false;
        }
    } else if (!dateCreated.equals(other.dateCreated)) {
        return false;
    }
    if (dateUpdated == null) {
        if (other.dateUpdated != null) {
            return false;
        }
    } else if (!dateUpdated.equals(other.dateUpdated)) {
        return false;
    }
    if (description == null) {
        if (other.description != null) {
            return false;
        }
    } else if (!description.equals(other.description)) {
        return false;
    }
    if (srNo != other.srNo) {
        return false;
    }
    if (status != other.status) {
        return false;
    }
    return true;
}

/* (non-Javadoc)
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    return "ServiceRequest [srNo=" + srNo + ", description=" + description
            + ", status=" + status + ", dateCreated=" + dateCreated
            + ", dateUpdated=" + dateUpdated + "]";
}
}

I m getting the message as:
Method failed: HTTP/1.1 400 Bad Request
JAXBException occurred : class
javax.jdo.identity.LongIdentity nor any of its super class is known to this context..
class javax.jdo.identity.LongIdentity nor any of its super class is known to this
context..

I m new to xml annotations.
Please advice …..

Thanks

  • 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-14T03:06:07+00:00Added an answer on June 14, 2026 at 3:06 am

    Some JPA implementations manipulate the byte codes of the entity classes. This can involve adding fields. Since you are using field access with your JAXB mappings you may have been affected by this. I would recommend using PROPERTY access instead and moving your annotations to the get methods.

    For More Information

    • http://blog.bdoughan.com/2011/06/using-jaxbs-xmlaccessortype-to.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have method that looks like this : public String getCommandString(Object...args) { return this.code
When would the Strategy Pattern be used? I see client code snippets like this:
I have one table of client details identified by an ID that looks like
Hello I'm having a problem here. The code looks like this. private void Form3_Load(object
Client code is pretty simple: <form action=DDServlet method=post> <input type=text name=customerText> <select id=customer> <option
This is the snippet of client code: connect(DescrittoreClient, (struct sockaddr *) &serv_addr, sizeof(serv_addr)); strcpy(Buffer,
I have a year's experience writing client code but none with server stuff. I
I put a TCP server and client code in PIC controller. Now just wanted
Say I have a simple client/server scenario with one method: // client code $client
I have an ASP.NET MVC server app and client code which uses jquery. I'd

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.