users@jaxb.java.net

Re: java.lang.NoClassDefFoundError: javax/xml/namespace/QName

From: Ed Mooney <Ed.Mooney_at_sun.com>
Date: Thu, 13 Mar 2003 09:46:09 -0500

Hi Frank,

Please advise what happens when you invoke xjc using its absolute path.
I.e.:

     %JWSDP_HOME%\jaxb-1.0\bin\xjc datasource.xsd -p
com.geneva.framework.connectionmanager

Regards,
--
Ed Mooney         |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201            |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive       |fruit flies like
781-442-0459      |Burlington, MA  01803 |a banana. Groucho
Frank Gates wrote:
> Hello,
>
> I started having the same error this morning.   I last ran xjc on Saturday and it worked fine.  This morning it gave the NoClassDefFoundError on QName when parsing the same .xsd as before.  I also tested on a different .xsd with the same results.
>
> I do not believe I made any changes to the installation, classpaths, or paths since Saturday, but I reinstalled this morning and verified that all the environment variables and paths are correctly set.  Still no joy.
>
> I tried copying jaxb-qjc.jar and namespace.jar to the local directory of the .xsd to test if that worked (it did not).  I also copied namespace.jar to the endorsed folder per a suggestion on this list and it still didn't work.
>
> I am sure this is an environment thingy, but I do not see what is wrong.
>
> Any suggestions?
>
> I am running on Windows 2000, jdk 1.4.0-b92, jaxb-1.0 (jaxb-1.0-beta also is installed, but the environment variables are pointing to jaxb-1.0).
>
> Thanks,
>
> Frank
>
> ps. the xjc.bat in jaxb-1.0 does not work at all. I am about 99% certain I ran the same command Saturday (I tested with jaxb-1.0-beta/bin which gives the same classpath error).  It is likely that the two environmental problems are related, but I've run the xjc.bat with echo on and still don't see what I'm missing.
>
> running...
>
> xjc datasource.xsd -p com.geneva.framework.connectionmanager
>
> produces...
>
> Usage: java [-options] class [args...]
>            (to execute a class)
>    or  java -jar [-options] jarfile [args...]
>            (to execute a jar file)
>
> where options include:
>     -client       to select the "client" VM
>     -server       to select the "server" VM
>     -hotspot      is a synonym for the "client" VM  [deprecated]
>                   The default VM is client.
>
>     -cp -classpath <directories and zip/jar files separated by ;>
>                   set search path for application classes and resources
>     -D<name>=<value>
>                   set a system property
>     -verbose[:class|gc|jni]
>                   enable verbose output
>     -version      print product version and exit
>     -showversion  print product version and continue
>     -? -help      print this help message
>     -X            print help on non-standard options
>     -ea[:<packagename>...|:<classname>]
>     -enableassertions[:<packagename>...|:<classname>]
>                   enable assertions
>     -da[:<packagename>...|:<classname>]
>     -disableassertions[:<packagename>...|:<classname>]
>                   disable assertions
>     -esa | -enablesystemassertions
>                   enable system assertions
>     -dsa | -disablesystemassertions
>                   disable system assertions