• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JaxB Compile Error: Failed to read imported schema document

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi i'm trying to compile the CD_DataBase.xsd schema (using the JaxB that I got from the JWSDP found at Sun's site) which references to an Album element in Album.xsd
For some reason, my xjc task falls when trying to read the imported schema.
here are the schemas':
---------------------------------------------------
Album.xsd
---------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.bll.co.il"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:appinfo>
<jaxb:globalBindings>
<xjc:serializable/>
</jaxb:globalBindings>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="album">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="producer" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
---------------------------------------------------
CD_DataBase.xsd
---------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.bll.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:alb="http://www.bll.co.il"
xmlns:cd="http://www.bll.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0"
elementFormDefault="qualified">
<xsd:import namespace="http://www.bll.co.il" schemaLocation="Album.xsd"/>
<xsd:annotation>
<xsd:appinfo>
<jaxb:globalBindings>
<xjc:serializable/>
</jaxb:globalBindings>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="CD">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="artist" type="xsd:string"/>
<xsd:element ref="alb:album"/>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
can any one help?
even if it works, will jaxb compilr the referenced schema (album.xsd) to java classes every time i use it (in other schemas' that are using it)?
Thank's,
reply
    Bookmark Topic Watch Topic
  • New Topic