• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jaxb version from 1.x to 2.1.9

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

My application previously used the following two jars (from version 1):

* jaxb-rt-1.0-ea.jar: Runtime library (the binding framework)
* jaxb-xjc-1.0-ea.jar: Schema compiler

I am just wondering, which I need to replace from version 2.1.9 with the above two jar (I want to use the latest version).

When I got the version 2.1.9, I have the following jars:

Any help will be appreciated. Thank you in advance.
[ November 26, 2008: Message edited by: Md Uddin ]
 
Md Uddin
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I didn't get any answer from the above thread. Let me try it another way to resolve my issue.

My application was using
jaxb-rt-1.0-ea.jar
jaxb-xjc-1.0-ea.jar


which I would like to replace with current jaxb 2.1.9 version jars
I probably need
jaxb-api.jar
jaxb-xjc.jar


But I realized that lots of classes from older version has been deprecated, which I am using, like:

javax.xml.bind.MarshallableRootElement;

javax.xml.bind.Dispatcher;
javax.xml.bind.InvalidAttributeException;
javax.xml.bind.InvalidContentObjectException;
javax.xml.bind.LocalValidationException;
javax.xml.bind.MarshallableObject;
javax.xml.bind.MarshallableRootElement;
javax.xml.bind.MissingContentException;
javax.xml.bind.PredicatedLists;
javax.xml.bind.PredicatedLists.Predicate;
javax.xml.bind.RootElement;
javax.xml.bind.StructureValidationException;
javax.xml.bind.ValidatableObject;
javax.xml.bind.Validator;
javax.xml.marshal.XMLScanner;
javax.xml.marshal.XMLWriter;

etc.

There are lot's of implementation with the use of above classes

I am just wondering if anyone could help me with any workaround or any web link or any doc, so that I can replace the old jars with new ones.

Thank you in advance.
[ December 01, 2008: Message edited by: Md Uddin ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same problem...did you get a solution ?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Jj", please check your private messages regarding an important administrative matter.

Thank you.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am also facing the same issue.. Did anyone got a solution for this?

To Md Uddin: did you resolve this issue?


Thanks,
Rajesh
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rajesh Akkiniveeranan wrote:Hi All,

I am also facing the same issue.. Did anyone got a solution for this?


Even if it's the "same" issue, could you please provide more details about what you are running into?
 
Rajesh Akkiniveeranan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

As Md Uddin said, we are also using the below said classes.

javax.xml.bind.MarshallableRootElement;

javax.xml.bind.Dispatcher;
javax.xml.bind.InvalidAttributeException;
javax.xml.bind.InvalidContentObjectException;
javax.xml.bind.LocalValidationException;
javax.xml.bind.MarshallableObject;
javax.xml.bind.MarshallableRootElement;
javax.xml.bind.MissingContentException;
javax.xml.bind.PredicatedLists;
javax.xml.bind.PredicatedLists.Predicate;
javax.xml.bind.RootElement;
javax.xml.bind.StructureValidationException;
javax.xml.bind.ValidatableObject;
javax.xml.bind.Validator;
javax.xml.marshal.XMLScanner;
javax.xml.marshal.XMLWriter;
etc.

Now in JAXB 2.2 I couldn't find any replacement for this.

Actually our project is to migrate the application from 1.4 to 1.6.

It would be great if you give us a solution.

Thanks,
Rajesh
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Sorry for the inconvenience, I'm looking for jaxb-rt-1.0-ea.jar documentation. I was looking at http://java.sun.com/webservices/docs/1.5/api/ but found no information about deprecated classes like javax.xml.bind.Dispatcher, javax.xml.bind.RootElement etc. Do you have any ideas where could I found it?

Thank you
 
Rajesh Akkiniveeranan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pavel,

Even I searched for the documentation of jaxb-rt-1.0-ea.jar but, no use.

Anyways, there is no replacement for jaxb-rt-1.0-ea.jar. But, we can easily migrate to JAXB 2.1 or 2.2.

Though we need to rewrite the code which uses jaxb-rt-1.0-ea.jar, it is easy to do.

If you want to migrate from jaxb-rt-1.0-ea.jar to JAXB 2.1 or 2.2, I can help you.

One thing is sure, you can't use jaxb-rt-1.0-ea.jar with JDK 1.6 !

Thanks
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rajesh, we're trying to upgrade from jaxb-rt-1.0-ea but can't find any documentation on how to do it. If you could give me some tips, that would be great! I also PM'ed you about this as well.

Thanks in advance,
Steve
 
Rajesh Akkiniveeranan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Steve,

Please find my comments below

Preliminary Steps:
1. You need to convert all your old .dtd files to .xsd files. You have several tools to convert this.
You can use the below mentioned online tool for conversion:
http://www.hitsw.com/xml_utilites/
2. Generated .xsd files may not be perfect! But we can fine tune it. I will give a tip for fine tuning the .xsd file.
a. Generate java files for the new .xsd files. (Generating java classes is explained below).
b. Compare the java files against the old java file.
c. If you don’t see any difference in the member variable and its method names then your .xsd file is perfect else you have to modify .xsd file based on the old java file method names.

Steps to convert old jaxb-rt-1.0-ea to new JDK 1.6 JAXB:
1. Remove the old .dtd and .xjs files instead include new .xsd files.
2. Generate new java files using .xsd files and replace the old JAXB related java files with the new generated one.
3. For marshalling and unmarshalling see the below link
https://jaxb.dev.java.net/tutorial/
Read the tutorial, you will get a clear idea about marshalling and un marshalling in JDK 1.6

If you need further assistance then please let me know.

Thanks
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

even i was facing the same issue when i tried to upgrade from jre 1.4 to jre 1.6.

Rajesh, where do youget the dtd files in jaxb-rt-1.0??? i tried finding it, but all i could find was the class files within the jaxb-rt-1.0 package.
can you please let me know what needs to be done
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic