Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Generate JAXB Classes - cannot find XJCFacade(Generate JAXB classes menu gets ClassNotFoundException)
Generate JAXB Classes - cannot find XJCFacade [message #662010] Mon, 28 March 2011 21:04 Go to next message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 81
Registered: July 2009
Location: Phoenix, AZ
Member
I'm attempting to generate JAXB classes from an XSD. When I right-click the schema and select the Generate->JAXB Classes, I get the following error on the console.

java.lang.NoClassDefFoundError: com/sun/tools/xjc/XJCFacade
Caused by: java.lang.ClassNotFoundException: com.sun.tools.xjc.XJCFacade
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

I've been digging through Eclipse docs for better part of a day now, and cannot find anything that suggests that I need to do anything special to Generate JAXB Classes.

Config:
Version: Helios Service Release 2 Java EE version.
Build id: 20110218-0911

EclipseLink SDK 2.2.0 (not sure if I need this or not)

JDK 1.6.0_24

Can someone point me to docs that explain where XJCFacade is and how to install it into eclipse?

Thanks
Michael

Re: Generate JAXB Classes - cannot find XJCFacade [message #662014 is a reply to message #662010] Mon, 28 March 2011 21:21 Go to previous messageGo to next message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 81
Registered: July 2009
Location: Phoenix, AZ
Member
BTW, I do see com.sun.tools.internal.xjc.XJCFacade.class in JDK 1.6 tools.jar.
Re: Generate JAXB Classes - cannot find XJCFacade [message #662137 is a reply to message #662010] Tue, 29 March 2011 13:40 Go to previous messageGo to next message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 81
Registered: July 2009
Location: Phoenix, AZ
Member
Is there a better newsgroup to post this issue?
Re: Generate JAXB Classes - cannot find XJCFacade [message #662200 is a reply to message #662010] Tue, 29 March 2011 17:17 Go to previous messageGo to next message
Blaise Doughan is currently offline Blaise DoughanFriend
Messages: 163
Registered: July 2009
Senior Member

Hi Michael,

The JAXB tooling is provided through the Dali project. Here is a link to their forum:

http://www.eclipse.org/forums/index.php?t=thread&frm_id= 113&S=81dc99f12bb978b240758df9ef174836

-Blaise
Re: Generate JAXB Classes - cannot find XJCFacade [message #803662 is a reply to message #662010] Tue, 21 February 2012 16:41 Go to previous messageGo to next message
Frank Lawlor is currently offline Frank LawlorFriend
Messages: 1
Registered: February 2012
Junior Member
I had the same problem.

I changed my jdk to 1.7 and the problem went away.

-- Frank
Re: Generate JAXB Classes - cannot find XJCFacade [message #1012273 is a reply to message #662010] Thu, 21 February 2013 08:46 Go to previous messageGo to next message
Mohammed-Salah OKA is currently offline Mohammed-Salah OKAFriend
Messages: 1
Registered: February 2013
Junior Member
Hello

You have to use the JDK as runtime for your project in eclipse

It work well with JDK 1.6 but not with JRE6

regards
Re: Generate JAXB Classes - cannot find XJCFacade [message #1110775 is a reply to message #1012273] Tue, 17 September 2013 10:15 Go to previous messageGo to next message
Tapas Choudhury is currently offline Tapas ChoudhuryFriend
Messages: 1
Registered: September 2013
Junior Member
perfect.. same issue and this is the fix
Re: Generate JAXB Classes - cannot find XJCFacade [message #1243829 is a reply to message #662010] Tue, 11 February 2014 13:57 Go to previous messageGo to next message
Martin F.Friend
Messages: 12
Registered: January 2011
Junior Member
I recently migrated from one machine to another and updated from Kepler Release to Kepler SR1. I am unsure which of these steps made my Java Library change from JDK to JRE during this process... anyway, the hint in this thread is very helpful. As it took me quite some time to google it with a German error message (and it also seems it slightly changed because I only got one single line), I'll just add my (localized) error-message here, as I didn't find the reason for JAXB-generation failing which previously worked, until I got here. So may an early google hit help others, too. Smile

Fehler: Hauptklasse com.sun.tools.internal.xjc.XJCFacade konnte nicht gefunden oder geladen werden

Freely translated:
Error: Main class com.sun.tools.internal.xjc.XJCFacade could not be found or loaded.


Changing the Java library from JRE to the JDK in the project settings worked fine. (after adding the JDK to the workspace in the Eclipse settings)

[Updated on: Tue, 11 February 2014 13:59]

Report message to a moderator

Re: Generate JAXB Classes - cannot find XJCFacade [message #1717128 is a reply to message #1243829] Thu, 10 December 2015 07:47 Go to previous messageGo to next message
Fasil Woldemariam is currently offline Fasil WoldemariamFriend
Messages: 1
Registered: December 2015
Junior Member
Thank you Martin F.

It works perfect!
Re: Generate JAXB Classes - cannot find XJCFacade [message #1722894 is a reply to message #662010] Wed, 10 February 2016 07:21 Go to previous messageGo to next message
Amogh Yadawad is currently offline Amogh YadawadFriend
Messages: 1
Registered: February 2016
Junior Member
Your Project is pointing to JRE , not to JDK .
Update JRE Home directory with JDK Home directory.

Because JDK 1.6 or 1.7 onwards xjc.jar will be bundled along with JDK.

-Amogh
Re: Generate JAXB Classes - cannot find XJCFacade [message #1744342 is a reply to message #1722894] Mon, 26 September 2016 07:25 Go to previous messageGo to next message
Christin Kocher is currently offline Christin KocherFriend
Messages: 7
Registered: July 2016
Junior Member
I updated my project with the jdk1.8.0_91, but still get the same error message. xjc.jar is not contained in my jdk.
Was it removed with 1.8? What do I need to install then?

Christin
Re: Generate JAXB Classes - cannot find XJCFacade [message #1764877 is a reply to message #1744342] Fri, 02 June 2017 19:43 Go to previous messageGo to next message
Patrik Suzzi is currently offline Patrik SuzziFriend
Messages: 2
Registered: February 2018
Junior Member
Like Amogh said, you just need to use a JDK instead of a JRE.

Best regards,

Patrik Suzzi
Consultant Software Engineer,
Eclipse Platform Committer
https://about.me/psuzzi
Re: Generate JAXB Classes - cannot find XJCFacade [message #1794022 is a reply to message #662010] Wed, 22 August 2018 14:15 Go to previous message
Cédric Catoliquot is currently offline Cédric CatoliquotFriend
Messages: 1
Registered: August 2018
Junior Member
It is funny to see previous reply about JRE when the guy is saying he is using JDK...

"- I am using a JDK 1.8
- You are using JRE. You must use a JDK for your project."

Yeah right... Thanks for that...
Previous Topic:LocalDate and LocalDateTime fields are not mapped to correct database types
Next Topic:EclipseLink integration with Lucene
Goto Forum:
  


Current Time: Tue Mar 19 07:58:32 GMT 2024

Powered by FUDForum. Page generated in 0.03016 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top