Skip to main content



      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 17:04 Go to next message
Eclipse UserFriend
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 17:21 Go to previous messageGo to next message
Eclipse UserFriend
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 09:40 Go to previous messageGo to next message
Eclipse UserFriend
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 13:17 Go to previous messageGo to next message
Eclipse UserFriend
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 11:41 Go to previous messageGo to next message
Eclipse UserFriend
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 03:46 Go to previous messageGo to next message
Eclipse UserFriend
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 06:15 Go to previous messageGo to next message
Eclipse UserFriend
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 08:57 Go to previous messageGo to next message
Eclipse UserFriend
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 08:59] by Moderator

Re: Generate JAXB Classes - cannot find XJCFacade [message #1717128 is a reply to message #1243829] Thu, 10 December 2015 02:47 Go to previous messageGo to next message
Eclipse UserFriend
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 02:21 Go to previous messageGo to next message
Eclipse UserFriend
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 03:25 Go to previous messageGo to next message
Eclipse UserFriend
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 15:43 Go to previous messageGo to next message
Eclipse UserFriend
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 10:15 Go to previous message
Eclipse UserFriend
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: Mon May 12 20:51:20 EDT 2025

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

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

Back to the top