Sam,

This is from the FAQ for 1.0.2. I guess this is also true of 2.0:

http://wiki.apache.org/xmlbeans/XmlBeansV1Faq#scompFindingJavac

Dave.

Samuel B. Quiring wrote:

Greetings,
I found out about xmlBeans this morning by googling for "jaxb support" after encountering a nasty JAXB bug that has cost me hours. The article davidbau.com JAXB Problems <http://davidbau.com/archives/2003/11/25/jaxb_problems.html> appeared on my first google screen and it pointed the way to xmlBeans, which on paper sounds
like exactly what I'm looking for.
I downloaded xmlBeans and am trying to get it to work. The first problem was that
bin\scomp.cmd contains these lines:
set cp=
set cp=%cp%;%XMLBEANS_LIB%\xbean.jar
set cp=%cp%;%XMLBEANS_LIB%\jsr173_api.jar
set cp=%cp%;%JAVA_HOME%\lib\tools.jar
set cp=%cp%;%XMLBEANS_LIB%\resolver.jar
Innocent enough, right? The problem is that my JAVA_HOME variable is: JAVA_HOME=C:\Program Files\Java\jdk1.5.0_02 Do you see that blank between "Program" and "Files"? That caused a problem that
I supposed I should have spotted, but the error message wasn't helpful:
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/5/0_02\lib\tools/jar;C:\download\xmlBeans\xmlbeans-current\xmlbeans-2/0/0\lib\resolver/jar took me a while to figure that one out (actually my office mate spotted it). A few double quotes and now I'm getting this:
Time to build schema type system: 1.734 seconds
Time to generate code: 7.016 seconds
java.io.IOException: CreateProcess: C:\Cayuse\615\dev\xmlBeans\javac @C:\DOCUME~1\sbq\LOCALS~1\Temp\javac17444 error=2
null
java.io.IOException: CreateProcess: C:\Cayuse\615\dev\xmlBeans\javac @C:\DOCUME~1\sbq\LOCALS~1\Temp\javac17444 error=2
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:229) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1121) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:367)
BUILD FAILED
The compiler did generate non-trivial src (-src) and classes (-d) subfolders, so it didn't die right away. If anyone has any ideas, I'm all ears. In case someone knows how to take an indepth look at this and wants the data, I used the following batch file to download the schema: cmd /c C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\bin\sdownload.cmd "http://era.nih.gov/Projectmgmt/SBIR/dev/personinforesponse.xsd"; cmd /c C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\bin\sdownload.cmd "http://era.nih.gov/Projectmgmt/SBIR/dev/rarschema.xsd cmd /c C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\bin\sdownload.cmd "http://era.nih.gov/Projectmgmt/SBIR/dev/commontypes.xsd"; cmd /c C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\bin\sdownload.cmd "http://era.nih.gov/Projectmgmt/SBIR/dev/personinforequest.xsd"; cmd /c C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\bin\sdownload.cmd "http://era.nih.gov/Projectmgmt/SBIR/dev/nihschema.xsd"; and I invoked sc.bat, a modified version of scomp.cmd [with my first problem described above, fixed], as follows: set XML_BEANSLIB=C:\download\xmlBeans\xmlbeans-current\xmlbeans-2.0.0\lib
sc.bat -d .\classes -src .\src ./schema/personinforesponse.xsd
Any help will be appreciated. xmlBeans looks promising. -Sam


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to