Error while compiling

S

Satish

Hi,

I am trying to compile xmlbean example. I get a below error. Any
reason for this error?

C:\Magellan\java\xmlbeans-current\xmlbeans-2.2.0\samples\XQueryXPath\schemas>scomp
-d .\test -src .\srctest -out emp.jar employeeschema.xsd
Time to build schema type system: 1.157 seconds
Time to generate code: 0.203 seconds
java.io.IOException: CreateProcess:
C:\Magellan\java\xmlbeans-current\xmlbeans-2.2.0\samples\XQueryXPath\schemas\javac
@c:\DOCUME~1\santsat\LOCALS
emp\javac46788 error=2
null
java.io.IOException: CreateProcess:
C:\Magellan\java\xmlbeans-current\xmlbeans-2.2.0\samples\XQueryXPath\schemas\javac
@c:\DOCUME~1\santsat\LOCALS
emp\javac46788 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:231)
at
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1126)
at
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:368)
BUILD FAILED
 
M

Manish Pandit

java.io.IOException: CreateProcess:
C:\Magellan\java\xmlbeans-current\xmlbeans-2.2.0\samples\XQueryXPath\schemas\javac
@c:\DOCUME~1\santsat\LOCALS
emp\javac46788 error=2

CreateProcess error=2 comes when the system cannot find the file
specified - in this case, the runtime cannot find the executable you
asked it to run. Are you using a batch file to compile the bean? You
might want to move the executable (javac? its not clear from the
message you posted) in a folder with no spaces, and not too deep and
then fix the JAVA_HOME and PATH variables. Try something like
c:\jdk1.5.x\bin and then give it a try.


-cheers,
Manish
 
S

Satish

Manish said:
CreateProcess error=2 comes when the system cannot find the file
specified - in this case, the runtime cannot find the executable you
asked it to run. Are you using a batch file to compile the bean? You
might want to move the executable (javac? its not clear from the
message you posted) in a folder with no spaces, and not too deep and
then fix the JAVA_HOME and PATH variables. Try something like
c:\jdk1.5.x\bin and then give it a try.


-cheers,
Manish

Thanks Manish for the hint. Actually I had to put sdk path before
anything else in path variable. Else it would search somewhere else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top