xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Vasilik" <Eric.Vasi...@bea.com>
Subject RE: Are xsdconfig files supported?
Date Mon, 18 Aug 2003 18:34:56 GMT
Yup, I think you ar right.  I notice there there are other places in this file which use the
loader, while loading the ConfigDocument is the only code which uses XmlObject.Factory ...
 

-----Original Message-----
From: Tim Hanson 
Sent: Monday, August 18, 2003 11:31 AM
To: xmlbeans-dev@xml.apache.org
Subject: RE: Are xsdconfig files supported?


This looks like a classloader bug. For the schema and wsdl documents, we are using the classloader
that loaded the SchemaDocument class. For the xsdconfig files, we are using the thread context
classloader. I know that Ant loads the schema compiler using a different class loader, so
it's probably just not getting the type definitions.

This code:

XmlObject configdoc = XmlObject.Factory.parse(...);

should be:

XmlObject configdoc = loader.parse(...);

Tim


> -----Original Message-----
> From: Eric Vasilik 
> Sent: Monday, August 18, 2003 8:59 AM
> To: xmlbeans-dev@xml.apache.org
> Subject: RE: Are xsdconfig files supported?
> 
> 
> I too looked at the code you mention below.  I performed an 
> experiment of loading your .xsdconfig file just like the code 
> does below and tested the resulting XmlObject to see if it 
> was an instance of ConfigDocument, and I got back a positive 
> result.  I recommend you doing the same, just write s small 
> program load of the config file and try the cast.  If that 
> does not work, then you have at least removed the schema 
> compile from the problem.
> 
> - Eric
> 
> -----Original Message-----
> From: James Strachan [mailto:james_strachan@yahoo.co.uk]
> Sent: Monday, August 18, 2003 2:57 AM
> To: xmlbeans-dev@xml.apache.org
> Subject: Re: Are xsdconfig files supported?
> 
> 
> Hi Eric
> 
> Thanks for your feedback. At least I know its all possible then :)
> 
> I was using the Ant task inside a Maven build (the maven.xml file 
> contains something pretty similar to an Ant build.xml). 
> Platform OS X,  
> 1.4.1_01-14. I got the error when I put any of the .xsdconfig files 
> into the src/schema directory and ran the Ant task pointing to the 
> src/schema directory.
> 
> I wonder if this is something particular about the Ant task? I looked 
> at the code and it seems that this line doesn't work in 
> SchemaCompiler...
> 
>                      XmlObject configdoc = 
> XmlObject.Factory.parse(new 
> FileInputStream(configFiles[i]), options);
>                      if (!(configdoc instanceof ConfigDocument))
>                          StscState.addError(errorListener, 
> "Document " + 
> configFiles[i] + " is not an xsd config file", 
> XmlErrorContext.CANNOT_LOAD_XSD_FILE, configdoc);
> 
> i.e. the parsing of the xsdconfig file doesn't seem to think its a 
> ConfigDocument which has me a little stumped.
> 
> I'll experiment calling the 'scomp' executable (SchemaCompiler) 
> directly instead of using the Ant task - maybe there's a 
> difference in 
> behaviour using that.
> 
> 
> On Sunday, August 17, 2003, at 12:40  am, Eric Vasilik wrote:
> 
> > I successfully compiled your sources against the version of 
> XmlBeans 
> > from the BEA dev-to-dev site:
> >
> > Loading schema file schema\application-client_1_4.xsd
> > Loading schema file schema\application_1_4.xsd
> > Loading schema file schema\connector_1_5.xsd
> > Loading schema file schema\ejb-jar_2_1.xsd
> > Loading schema file schema\j2ee_1_4.xsd
> > Loading schema file schema\jsp_2_0.xsd
> > Loading schema file schema\web-app_2_4.xsd
> > Loading schema file schema\XML.xsd
> > Loading config file etc\application-client_1_4.xsdconfig
> > Loading config file etc\application_1_4.xsdconfig
> > Loading config file etc\connector_1_5.xsdconfig
> > Loading config file etc\ejb-jar_2_1.xsdconfig
> > Loading config file etc\j2ee_1_4.xsdconfig
> > Loading config file etc\jsp_2_0.xsdconfig
> > Loading config file etc\web-app_2_4.xsdconfig
> > Loading config file etc\XML.xsdconfig
> > Time to build schema type system: 2.844 seconds
> > Time to generate code: 11.969 seconds
> > Compiled types to xmltypes.jar
> >
> > I issued the scomp command 'scomp *' from the 'src' directory which 
> > contains 'etc', 'java', 'schema', ....
> >
> > Perhaps you have some kind of configuration problem?  What 
> JRE are you 
> > using?
> >
> > - Eric
> >
> >
> > -----Original Message-----
> > From: James Strachan [mailto:james_strachan@yahoo.co.uk]
> > Sent: Saturday, August 16, 2003 2:14 AM
> > To: xmlbeans-dev@xml.apache.org
> > Subject: Are xsdconfig files supported?
> >
> >
> > Am trying to use a .xsdconfig file to change the package 
> names of the
> > generated XMLBeans. I keep getting this error...
> >
> > [xmlbean] [ERROR] error: Document
> > /Applications/eclipse-2.1.1/workspace/incubator-geronimo/modules/
> > xmlbeans/src/schema/j2ee_1_4.xsdconfig is not an xsd config file
> >
> > Any idea what the problem is? Are xsdconfig files actually supported
> > right now - the code looks like they are. I'm using the 
> latest xmlbeans
> > from BEA's site. It seems the parsed document XMLBean is not a
> > ConfigDocument instance.
> >
> > Here's the xsdconfig files I've been trying to use
> >
> > 
http://cvs.apache.org/viewcvs/incubator-geronimo/modules/xmlbeans/src/
> etc/
>
> along with a maven project etc...
>
> http://cvs.apache.org/viewcvs/incubator-geronimo/modules/xmlbeans/
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>

James
-------
http://radio.weblogs.com/0112098/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message