You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by su...@tcs.com on 2005/04/26 16:50:39 UTC

Syntax of scomp

Hi,
I am new to the XML worls. Might be my question is silly... still help me 
sorting out the problem. I have downloaded the xmlbeans-2.0.0-bin.zip from 
the www.xmlbeans.apache.org. I unzipped the file in a XMLbean folder. I 
have placed the following xsd file in the bin directory under XMLbean. The 
code listing for po1.xsd is as follows:

<?xml version="1.0"?>
<xs:schema
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:po="http://temp.openuri.org/easypo"
        targetNamespace="http://temp.openuri.org/easypo"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

  <xs:element name="purchase-order">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="customer" type="po:customer"/>
                <xs:element name="date" type="xs:dateTime"/>
                <xs:element name="line-item" type="po:line-item" 
minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="shipper" type="po:shipper" 
minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="customer">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="address" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="line-item">
        <xs:sequence>
            <xs:element name="description" type="xs:string"/>
            <xs:element name="per-unit-ounces" type="xs:decimal"/>
            <xs:element name="price" type="xs:double"/>
            <xs:element name="quantity" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="shipper">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="per-ounce-rate" type="xs:decimal"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>

I wanted to compile this xsd file with the scompl.cmd file and to keep the 
output jar file in po1.jar. The command I have used is

   c:\XMLbean\bin> scomp -out po1.jar po.jar

It shows the following error.... 

Time to build schema type system: 0.951 seconds
Time to generate code: 0.16 seconds

java.io.IOException: CreateProcess: 
C:\Software\XMLBean\xmlbeans-2.0.0-beta1\bin
\javac @C:\DOCUME~1\146871~1.MCG\LOCALS~1\Temp\javac43445 error=2
null
java.io.IOException: CreateProcess: 
C:\Software\XMLBean\xmlbeans-2.0.0-beta1\bin
\javac @C:\DOCUME~1\146871~1.MCG\LOCALS~1\Temp\javac43445 error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Unknown Source)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(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:1114)
        at 
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
:367)
BUILD FAILED

Please help me to find out the solution for the above probelm.

With Kind Regards,
Sujoy Banerjee
Tata Consultancy Services Limited
Plot  B-1, Block EP & GP
Sector - V, Salt Lake Electronics Complex
Kolkata - 700 091,West Bengal
India
Mailto: sujoy.banerjee@tcs.com
Website: http://www.tcs.com
ForwardSourceID:NT0000A6B6 

Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you

Re: Syntax of scomp

Posted by Serge <te...@udm.ru>.
Hello.

This problem often appears on Windows systems. As for me,
there is only one way to work around it: do not use scomp
and compile schemas using, for example, an Ant task. But
you can read this excerpt from XMLBeans FAQ, may be it will
help you:

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

> 
> Hi,
> I am new to the XML worls. Might be my question is
> silly... still help me 
> sorting out the problem. I have downloaded the
> xmlbeans-2.0.0-bin.zip from 
> the www.xmlbeans.apache.org. I unzipped the file in a
> XMLbean folder. I 
> have placed the following xsd file in the bin directory
> under XMLbean. The 
> code listing for po1.xsd is as follows:
> 
> <?xml version="1.0"?>
> <xs:schema
>         xmlns:xs="http://www.w3.org/2001/XMLSchema"
>         xmlns:po="http://temp.openuri.org/easypo"
>         targetNamespace="http://temp.openuri.org/easypo"
>         elementFormDefault="qualified"
>         attributeFormDefault="unqualified">
> 
>   <xs:element name="purchase-order">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="customer"
> type="po:customer"/>
>                 <xs:element name="date"
> type="xs:dateTime"/>
>                 <xs:element name="line-item"
> type="po:line-item" 
> minOccurs="0" maxOccurs="unbounded"/>
>                 <xs:element name="shipper"
> type="po:shipper" 
> minOccurs="0"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:complexType name="customer">
>         <xs:sequence>
>             <xs:element name="name" type="xs:string"/>
>             <xs:element name="address" type="xs:string"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:complexType name="line-item">
>         <xs:sequence>
>             <xs:element name="description"
> type="xs:string"/>
>             <xs:element name="per-unit-ounces"
> type="xs:decimal"/>
>             <xs:element name="price" type="xs:double"/>
>             <xs:element name="quantity" type="xs:int"/>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:complexType name="shipper">
>         <xs:sequence>
>             <xs:element name="name" type="xs:string"/>
>             <xs:element name="per-ounce-rate"
> type="xs:decimal"/>
>         </xs:sequence>
>     </xs:complexType>
> </xs:schema>
> 
> I wanted to compile this xsd file with the scompl.cmd
> file and to keep the 
> output jar file in po1.jar. The command I have used is
> 
>    c:\XMLbean\bin> scomp -out po1.jar po.jar
> 
> It shows the following error.... 
> 
> Time to build schema type system: 0.951 seconds
> Time to generate code: 0.16 seconds
> 
> java.io.IOException: CreateProcess: 
> C:\Software\XMLBean\xmlbeans-2.0.0-beta1\bin
> \javac @C:\DOCUME~1\146871~1.MCG\LOCALS~1\Temp\javac43445
> error=2
> null
> java.io.IOException: CreateProcess: 
> C:\Software\XMLBean\xmlbeans-2.0.0-beta1\bin
> \javac @C:\DOCUME~1\146871~1.MCG\LOCALS~1\Temp\javac43445
> error=2
>         at java.lang.Win32Process.create(Native Method)
>         at java.lang.Win32Process.<init>(Unknown Source)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(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:1114)
>         at 
>
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
> :367)
> BUILD FAILED
> 
> Please help me to find out the solution for the above
> probelm.
> 
> With Kind Regards,
> Sujoy Banerjee
> Tata Consultancy Services Limited
> Plot  B-1, Block EP & GP
> Sector - V, Salt Lake Electronics Complex
> Kolkata - 700 091,West Bengal
> India
> Mailto: sujoy.banerjee@tcs.com
> Website: http://www.tcs.com
> ForwardSourceID:NT0000A6B6 
> 
> Notice: The information contained in this e-mail message
> and/or attachments to it may contain confidential or
> privileged information.   If you are not the intended
> recipient, any dissemination, use, review, distribution,
> printing or copying of the information contained in this
> e-mail message and/or attachments to it are strictly
> prohibited.   If you have received this communication in
> error, please notify us by reply e-mail or telephone and
> immediately and permanently delete the message and any
> attachments.  Thank you

_____
Best Regards, Serge.
mailto:teron@udm.ru
ICQ 315293596

"СОЛО на клавиатуре" - обучение слепому десятипальцевому
набору
Для получения информации посетите, пожалуйста, сайт
http://www.ergosolo.ru
----------------------------------------------------
Треть суток на треть дешевле!
МАРК-ИТТ ввёл льготные цены на ночной трафик в Народном Интернете
цены на трафик на 30% ниже дневных в период с 1:00 до 9:00.
600-й - 1.75р, Профессиональный - 1.89р, Деловой - 1.96р, 5-ка - 2,03р, Домашний - 2,10р

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org