Skip to main content

I don't come along with the impl-Classes

2 replies [Last post]
Joined: 2005-12-03


I am able to marshall and unmarshall files without any problems.

I only have one question: How do I use the .impl.*-Classes correctly?

What I want to do: Per impl-class I have a self-written class that creates the data that should be stored in an xml-file. Now this self-created class should use the impl*-class (to be accurate: the getter/setter-methods) to set the data and my marshalling-class should marshall the data to a xml-file.

There are different people working on the different classes, so I need a solution that works independently from other classes.

What I tried until now:

Simulating the self-written classes I created a class which instantiates the impl-classes. Then I created new objects, added the values to them and finally I "added" the objects to the instance of the impl-class. Aftersward I called the marshall()-method.

That didn't work:

DefaultValidationEventHandler: [ERROR]: a required field "Fieldname" is missing an object

I thought about creating seperate ObjectFactories in each class, but I abandoned this theory.

I hope my questions are understandable :)

Thanks in advance,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-09

I'm having a bit of difficulty following (and I suspect this is about 1.0.x, whereas this forum is for 2.0?), but the error message seems to be pretty clear to me.

Is the required "Fieldname" set? If not, why not?

Joined: 2005-12-03


I am using the current JAXB-Library from the official Sun-Website so I thought I was using the here discussed version. If this forum is about a development release I am sorry for posting in the wrong forum, I didn't realise that :)

Ad error-message:

The "Fieldname" is set by the Class XY by directly calling the set-methods of the FooImpl-class without using an ObjectFactory.

XY then "calls" the class ABC by instantiating it.

In ABC the marshalling is implemented (that is the ObjectFactory is created etc pp).

I am sorry for expressing myself so poorly... I don't understand the problem totally either. It is - in any case - an user-error made by me :)

Best Regards,