Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAXB: Error compiling classes generated by xjc (file name too long)

843834Sep 28 2004 — edited Sep 28 2004
Hi friends,

I am trying to compile classes that are generated by using XJC tool on xsd file. The compilation fails with following message.
buildxsdmodel:
    [javac] Compiling 794 source files to /home/uchamad/working/teleworker/ejb/build/classes
    [javac] /home/uchamad/working/teleworker/ejb/build/tmpsrc/uk/co/novatel/teleworker/model/wlr/bulksearch
results/impl/ApplicationInformationTypeImpl.java:58372: error while writing 
uk.co.novatel.teleworker.model.wlr.bulksearchresults.impl.ApplicationInformationTypeImpl.XMLRequestID
TypeImpl.SearchOrderResultsTypeImpl.SearchTypeDetailTypeImpl.OrderTypeImpl.OrderDetailsTypeImpl.
OrderLinesTypeImpl.NumberPortingTypeImpl.OLODetailsTypeImpl.NumberLocationTypeImpl.OLOMainP
STN1AddressTypeImpl.Unmarshaller: /home/uchamad/working/teleworker/ejb/build/classes/uk/co/novatel
/teleworker/model/wlr/bulksearchresults/impl/ApplicationInformationTypeImpl$XMLRequestIDTypeImpl$S
earchOrderResultsTypeImpl$SearchTypeDetailTypeImpl$OrderTypeImpl$OrderDetailsTypeImpl$OrderLin
esTypeImpl$NumberPortingTypeImpl$OLODetailsTypeImpl$NumberLocationTypeImpl$OLOMainPSTN1A
ddressTypeImpl$Unmarshaller.class (File name too long)

    [javac]                                             public class Unmarshaller
    [javac]                                                    ^
    [javac] 1 error
 
The compiler is complaining about the file name being too long. This is happening because the java classes when generated from XSD contains deep nesting of inner classes. So when it comes to compile the .class name file is too long for the operating system.

I am trying this on unix box.

I wonder if there is a way to configure XJC so that it does not produce inner classes but instead keep them out.

Any help would be appreciated.

many thanks
Usmangani
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2004
Added on Sep 28 2004
3 comments
518 views