• 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

[xmlbean] scomp giving me an exception: java.io.IOException: CreateProcess

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am trying to generate the xmlbeans classes from my schema file Mpg-pvc.xsd,
using scomp, and I get the following error.
It is really annoying, I do not know where the problem is and I just started with xmlbeans.

Can anyone help me here ?
Thanks in advance

Here is the message I get:

D:\xmlbean>scomp -out toto.jar -debug -compiler C:\Program Files\Java\jdk1.5.0_0
4\bin\javac.exe -jar C:\Program Files\Java\jdk1.5.0_04\bin\jar.exe Mpg-pvc.xsd
Time to build schema type system: 1.688 seconds
Time to generate code: 0.547 seconds
java.io.IOException: CreateProcess: C:\Program @C:\DOCUME~1\CFERNA~1\LOCALS~1\Te
mp\javac18651 error=2
null
java.io.IOException: CreateProcess: C:\Program @C:\DOCUME~1\CFERNA~1\LOCALS~1\Te
mp\javac18651 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.j
ava:1121)
at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
:367)
BUILD FAILED
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not used scomp (much less know what it is used for) but since its an IOException, I would think the process is not able to access the required files or it may not be having the right permissions to write to that dir.
Just guessing......

Does that "tool" come with any documentation at all?

- m
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XMLBeans Tools List

http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#scomp
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you run scomp OK against the xmlbean supplied samples?

G.
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Max longbeach:
Hi, I am trying to generate the xmlbeans classes from my schema file Mpg-pvc.xsd,
using scomp, and I get the following error......

BUILD FAILED



Post your xsd please.

Guy
 
Celinio Fernandes
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey,
it's been more than a month that I posted this message.
I figured it out, I could generate the API, I got the correct options
for the scomp command under DOS.

Thanks a lot for your help anyways
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First I would let you know the solution and discuss about the problem
Solution : C:> scomp -d D:\JarXml -out Event.jar Event.xsd
where JarXml should be a empty directory.

Reason:
On investicating I found an interesting thing, if you should use empty directory for -d, like -d d:\, scomp just take all the files in D: and try to make the jar.
In my case earlier I used to put -d D:\,
C:>scomp -d D:\ -out Event.jar Event.xsd
so it doesn�t know which two directory it creates and so it tries to generates JAR from all the directory in the D:, and end up in IO Exception.

Typically it create two directory namely com andJarXml.
Hope this helps.
One more information, I use NTFS file system, it seems people use other files system may not get this error.

The reason is for NTFS it tries to create C:\DOCUME~1\GOWRIS~1\LOCALS~1\Temp\xbean31056.d\classes\schemaorg_apache_xmlbeans\javaname\xxx\xx
ending up in org.apache.xmlbeans.SchemaTypeLoaderException.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The solution to this problem (Windows)is, Java JDK PATH is not set properly in the PATH environment variable or it may not be the first environment variable.

Please keep JDK path always at the first place in the PATH environment variable.

PATH=C:\j2sdk1.4.2_03\bin;
 
Ranch Hand
Posts: 69
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there is a space in your JAVA_HOME like C:Program Files, you may get this error.You have to use a JAVA_HOME directory with no spaces.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without messing about with your enviroment variables you can explicitly set the compiler in scomp.

scomp -compiler path/to/your/javac.exe -out path/to/jar.jar path/to/schema/schema.xsd
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Espen Haraldsen wrote:Without messing about with your enviroment variables you can explicitly set the compiler in scomp.

scomp -compiler path/to/your/javac.exe -out path/to/jar.jar path/to/schema/schema.xsd



I couldn't get the environment variable thing to work for the life of me, but explicitly setting the compiler worked like a charm for me (thank you, by the way)!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic