Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error while compiling

2 views
Skip to first unread message

Satish

unread,
Dec 13, 2006, 9:35:49 AM12/13/06
to
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

Manish Pandit

unread,
Dec 13, 2006, 1:21:16 PM12/13/06
to
> 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

Satish

unread,
Dec 13, 2006, 4:44:35 PM12/13/06
to

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

0 new messages