Topic
  • 4 replies
  • Latest Post - ‏2013-10-24T19:30:23Z by bobdy
MRKB
MRKB
3 Posts

Pinned topic RAD 8.0 java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade Error

‏2012-09-07T12:12:04Z |
Hi Team,

In RAD 8.0 with java 1.6 (I have to have java 1.6 or higher) I do have the following isssue:
1. Project is OSGI bundle
2. Created a XSD
3. Trying to geneate JAXB classes by Right Click on the XSD file ->Generate->JAXB Classes ...
4. After providing all the input, Clicked on 'Finish' Getting the following error.

Exception in thread "main" java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade
Caused by: java.lang.ClassNotFoundException: com.sun.tools.xjc.XJCFacade
at java.net.URLClassLoader.findClass(URLClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Googled and got some idea to copy JAXB/lib/*.jar into jre/lib/exe folder, If i do this getting into library clash between 1.5 and 1.6 end up with new Set of error.

Appricated for any input.

Thanks in Advance.
Updated on 2012-09-07T16:46:00Z at 2012-09-07T16:46:00Z by MRKB
  • TroyBishop
    TroyBishop
    104 Posts

    Re: RAD 8.0 java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade Error

    ‏2012-09-07T14:15:24Z  
    Hello,

    Have a look at APAR PM69118 which states:

    
    ... The 
    'Generate > JAXB classes' wizard belongs to base Eclipse and requires additional libraries to be configured in the runtime to complete successfully.  A warning normally appears alerting you to this.  But 
    
    if you have the JPA 2.0 feature pack installed on your WebSphere Application Server 7.0 then the warning does not appear.   Local fix: The workaround is to use the Rational Application Developer wizard to generate your JAXB classes when right clicking on your schema file.  This wizard is 
    'Generate > Java'.  Then select the 
    'Schema to JAXB Java classes' option.
    


    -Troy
  • MRKB
    MRKB
    3 Posts

    Re: RAD 8.0 java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade Error

    ‏2012-09-07T16:46:00Z  
    Hello,

    Have a look at APAR PM69118 which states:

    <pre class="jive-pre"> ... The 'Generate > JAXB classes' wizard belongs to base Eclipse and requires additional libraries to be configured in the runtime to complete successfully. A warning normally appears alerting you to this. But if you have the JPA 2.0 feature pack installed on your WebSphere Application Server 7.0 then the warning does not appear. Local fix: The workaround is to use the Rational Application Developer wizard to generate your JAXB classes when right clicking on your schema file. This wizard is 'Generate > Java'. Then select the 'Schema to JAXB Java classes' option. </pre>

    -Troy
    Troy,
    Thanks a bunch. the local fix works good for now.

    >>base Eclipse and requires additional libraries to be configured in the runtime to
    >> complete successfully.

    Do u know what are the libraires do I need to include, I was getting some kind of tooling warning, but that doesn't say any detial.

    >> But if you have the JPA 2.0 feature pack installed on
    >> your WebSphere Application Server 7.0 then the warning does not
    >> appear.

    I have WAS 8.0, I believe SCA and JPA 2.0 feature packs are included as part of the installation. This is a new installation, I have not tried to deply apps yet, let me verify that.

    Thanks
    MRKB
  • bobdy
    bobdy
    8 Posts

    Re: RAD 8.0 java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade Error

    ‏2013-10-24T19:23:17Z  
    Hello,

    Have a look at APAR PM69118 which states:

    <pre class="jive-pre"> ... The 'Generate > JAXB classes' wizard belongs to base Eclipse and requires additional libraries to be configured in the runtime to complete successfully. A warning normally appears alerting you to this. But if you have the JPA 2.0 feature pack installed on your WebSphere Application Server 7.0 then the warning does not appear. Local fix: The workaround is to use the Rational Application Developer wizard to generate your JAXB classes when right clicking on your schema file. This wizard is 'Generate > Java'. Then select the 'Schema to JAXB Java classes' option. </pre>

    -Troy

    It would be helpful to know what libraries are needed to use
    'Generate > JAXB classes'

    WAS 80/85 do not seem to have them

  • bobdy
    bobdy
    8 Posts

    Re: RAD 8.0 java.lang.NoClassDefFoundError: com.sun.tools.xjc.XJCFacade Error

    ‏2013-10-24T19:30:23Z  
    • bobdy
    • ‏2013-10-24T19:23:17Z

    It would be helpful to know what libraries are needed to use
    'Generate > JAXB classes'

    WAS 80/85 do not seem to have them

    Also I did notice that noth RAD85 and WAS85, have the XJCFacade.class
    in
    {RAD85 | WAS85-32}\java\lib\tools.jar\com\sun\tools\internal\xjc\