users@jaxb.java.net

Re: Errors during XJC task

From: Srikanth R Chinthala <csr_1978_at_yahoo.com>
Date: Tue, 6 Apr 2010 13:15:31 -0700 (PDT)

Laun,

Do we have to include all the schemas for xjc to compile as you did? I have
another schema which imports some 100's of other schemas so do i need to
include all the schemas when i do xjc?

Thanks,


Wolfgang Laun-2 wrote:
>
> I have found out that passing all schema paths to xjc improves matters
> somewhat:
>
> /xjc.sh \
> ./oagis/org_openapplications_platform/1_0/Nouns/BOD.xsd \
> ./oagis/org_openapplications_platform/1_0/BODs/ConfirmBOD.xsd \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/LogisticsComponents.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/CodeLists.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/Meta.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/Components.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/ManufacturingComponents.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/Fields.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/CodeList_LanguageCode_ISO_7_04.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/CodeList_UnitCode_UNECE_7_04.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/QualifiedDataTypes.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/CodeList_CurrencyCode_ISO_7_04.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/UnqualifiedDataTypes.xsd
> \
> ./oagis/org_openapplications_platform/1_0/Common/UNCEFACT/ATG/CoreComponents/CoreComponentTypes.xsd
> \
> ./oagis/org_openapplications_platform/1_0/OAGi-Platform.xsd \
> ./oagis/org_openapplications_oagis/9_3/Developer/Nouns/ProductionPerformance.xsd
> \
> ./oagis/org_openapplications_oagis/9_3/Developer/OAGIS-Nouns.xsd \
> ./oagis/USS/3.0/Common/Components/LogisticsComponents.xsd \
> ./oagis/USS/3.0/Common/Components/CodeLists.xsd \
> ./oagis/USS/3.0/Common/Components/QueryComponent.xsd \
> ./oagis/USS/3.0/Common/Components/Components.xsd \
> ./oagis/USS/3.0/Common/Components/ManufacturingComponents.xsd \
> ./oagis/USS/3.0/Developer/Nouns/ProductionPerformance.xsd \
> ./oagis/USS/3.0/Developer/Nouns/MaterialLot.xsd \
> ./oagis/USS/3.0/Developer/BODs/GetMaterialLot.xsd
>
> Two errors remain, one from an obvious bug in the schema, which is easily
> fixed:
>
> --- ./oagis/USS/3.0/Common/Components/ManufacturingComponents.xsd~
> 2010-04-06 16:36:31.000000000 +0200
> +++ ./oagis/USS/3.0/Common/Components/ManufacturingComponents.xsd
> 2010-04-06 21:06:01.000000000 +0200
> @@ -403,7 +403,7 @@
> </xs:annotation>
> <xs:complexType>
> <xs:sequence>
> - <xs:group ref="ActualResourceGroup" minOccurs="0"/>
> + <xs:group ref="oa:ActualResourceGroup" minOccurs="0"/>
> <xs:element ref="oa:TransportationMethodCode"
> minOccurs="0"/>
> </xs:sequence>
> </xs:complexType>
>
> The only remaining one is this:
>
> [ERROR] src-resolve: Cannot resolve the name 'oa:ShipmentHeaderBaseType'
> to
> a(n) 'type definition' component.
> line 11 of
> file:/home/wlaun/Office/JAXB_EXPERIMENTS/oagis/oagis/USS/3.0/Common/Components/LogisticsComponents.xsd
>
> and this is strange, since that type is in the imported schema
> ./oagis/org_openapplications_platform/1_0/Common/OAGi/Components/LogisticsComponents.xsd.
>
> -W
>
> On Tue, Apr 6, 2010 at 9:08 PM, Srikanth R Chinthala
> <csr_1978_at_yahoo.com>wrote:
>
>>
>> Laun,
>>
>> Yes, the attached zip file has complete set of .xsd files. I copied all
>> the
>> schemas in to eclipse project.
>>
>> Eclipse didn't complain of any missing type names and infact i was able
>> to
>> navigate to all the types in eclipse which JAXB couldn't resolve. BTW did
>> you use any tool to browse the schemas?
>>
>> Thanks,
>>
>>
>> Wolfgang Laun-2 wrote:
>> >
>> > I've reproduced the error, which is justified. The missing Type names
>> are
>> > not
>> > defined in the Schema where they ought to be according to the prefix
>> oa:,
>> > or anywhere else.
>> >
>> > Is the set of .xsd files you have attached at
>> > http://old.nabble.com/file/p28152247/oagis.zip
>> > the correct set of the original schema files?
>> >
>> > -W
>> >
>> >
>> > On Tue, Apr 6, 2010 at 4:01 PM, Srikanth R Chinthala
>> > <csr_1978_at_yahoo.com>wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I am trying to compile a schema with xjc ant task to generate java
>> >> artifacts
>> >> but the task fails with several errors saying that Cannot resolve the
>> >> name
>> >> 'xxx' to a(n) 'type definition' component. I checked the schema in XML
>> >> Spy
>> >> and Eclipse but they don't complain on its Well-Formedness and
>> Validity.
>> >>
>> >> I am attaching the entire source of the schemas as a zip file
>> >> (oagis.zip).
>> >> I
>> >> am trying to compile oagis/USS/3.0/Developer/BODs/GetMaterialLot.xsd
>> >> schema
>> >> and getting several errors like:
>> >>
>> >> [xjc] [ERROR] src-resolve: Cannot resolve the name
>> >> 'oa:SegmentResponseBaseType' to a(n) 'type definition' component.
>> >> [xjc] line 57 of
>> >> file:/C:/oagis/USS/3.0/Developer/Nouns/ProductionPerformance.xsd
>> >> [xjc] [ERROR] src-resolve: Cannot resolve the name
>> >> 'oa:ShipmentHeaderBaseType' to a(n) 'type definition' component.
>> >> [xjc] line 8 of
>> >> file:/C:/oagis/USS/3.0/Common/Components/LogisticsComponents.xsd
>> >> [xjc] [ERROR] src-resolve: Cannot resolve the name
>> >> 'oa:ActualResourceGroup' to a(n) 'group'
>> >> ....................
>> >>
>> >> Could anyone please let me know why JAXB is not able to recognize
>> these
>> >> components.
>> >>
>> >> Thanks, http://old.nabble.com/file/p28152247/oagis.zip oagis.zip
>> >> --
>> >> View this message in context:
>> >> http://old.nabble.com/Errors-during-XJC-task-tp28152247p28152247.html
>> >> Sent from the java.net - jaxb users mailing list archive at
>> Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> >> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Errors-during-XJC-task-tp28152247p28156145.html
>> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
>

-- 
View this message in context: http://old.nabble.com/Errors-during-XJC-task-tp28152247p28156929.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.