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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:45:37+00:00 2026-06-03T07:45:37+00:00

I am encountering a problem while marshalling my Java objects using JAXB. When i

  • 0

I am encountering a problem while marshalling my Java objects using JAXB.
When i run the web service as an independent application, it works fine.

When i Integrate it with my project, and use the generated Java classes,
while marshalling, I get an exception

RequestImpl class nor any of its super class is not known to any of this context.

While generating my JAXB instance I use the following statement:

JAXBContext jaxb = JAXBContext.newInstance("com.eos.hotels.API.Request");

I have 2 separate xsds, one for Request and another for Response.

The generated java classes are stored in a folder structure as follows:

API->Request
API->Response

In both the above folders, an ObjectFactory.java is created and jaxb.properties is also there.

Also, inside each of the above mentioned folders, impl folder is created which has all Impl files, and inside this impl folder, runtime folder is created.

All the xs:element from XSD are created as interfaces, only the Impls are classes.
Also, there are no XML annotations in the generated java files.

Can anyone tell me what is going wrong here?

Is this problem happening because of folder structure or because the XML annotations are not present?

I read on the internet that annotations if not present also are not a problem.

I have even tried to copy the generated impl classes in the same folder as ObjectFactory.java, but that also did not work.

  • 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-03T07:45:39+00:00Added an answer on June 3, 2026 at 7:45 am

    While creating the JAxbContext I used the following:

    JAXBContext jaxb = new DefaultJAXBContextImpl(packagename, ObjectFactory.class                 .getClassLoader());
    

    Though I am not sure why, it seems to be working fine.

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

Sidebar

Related Questions

I am encountering a problem while extracting info from a database using php+mysql and
While attempting to access a test portal, I'm encountering the following problem while using
I am encountering a problem with string formatting while trying to get only the
I am encountering a problem regarding URL rewriting. I am using Apache's mod rewrite
I am currently encountering a problem while running a query which is calling a
Hey guys. Thanks for clicking. This is a problem that I'm encountering while coding
I'm encountering a problem with a SSL certificate. Everything works perfect in Opera, Firefox,
At work, I was encountering a problem where users of our application were receiving
I Am using the Paypal Express Checkout API on my web site, and encountering
I'm using Backbone along with jQuery and jqGrid and encountering problem with binding the

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.