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: 78
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: 78
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: 78
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 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

Previous Topic:NOT NULL FK nullification problem
Next Topic:Saving a referenced existing entity results in a new entity
Goto Forum:
  


Current Time: Tue Nov 25 22:25:09 GMT 2014

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

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