• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Java Migration from 1.4 to 1.6

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
I am working on a Java Upgrade project from JDK 1.4 to JDK 1.6 Update 16(jdk1.6.0_16).
The project uses JAXB so I even changed the JAXB jars to latest version 2.2.
I made the changes in the build.xml pointing to 1.6 from 1.4
I am facing some problem with the JAXB jars.
I am getting "Cannot be resolved to a type" errors for few Java files in the code because of which the appropriate Jars are not being generated.

Please help me out as I am new to Migration stuff.

Thanks,
Anant
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be aware that Java 6 includes JAXB, whereas Java 1.4 did not. So the external JAXB version you have may be older or younger than what Java 6 has, and thus causing trouble.

The way to use a different version than the one that comes with the JRE is described in http://java.sun.com/javase/6/docs/technotes/guides/standards/
 
Marshal
Posts: 80735
485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
Anant Kamat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just read the article but could not find any solution. Also the path mentioned in the page is not avaiable.
I am using JAXB version 2.2. I changed all the version numbers in the config files but to no use. The build still fails.
When I click on the build.xml failed path it shows me this
" <javac encoding="Cp1252" srcdir="src/java/com/sbc/sde" destdir="${sde.build.home}" debug="${compile.debug}" optimize="${compile.optimize}" source="1.6" target="1.6"> "

I changed the source and target from 1.4 to 1.6
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This: srcdir="src/java/com/sbc/sde" is most certainly wrong. Most likely it should be srcdir="src/java"
 
Anant Kamat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
My problem is resolved. Actually the problem was due to the XSD interpretation by JAXB 2.0
I had to make certain code changes.

Thanks for all your help.

Regards,
Anant
 
reply
    Bookmark Topic Watch Topic
  • New Topic