You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org> on 2005/12/08 01:02:15 UTC

[jira] Resolved: (XMLBEANS-233) Schema compiler throws "java.lang.OutOfMemoryError: Java heap space" for some schemas

     [ http://issues.apache.org/jira/browse/XMLBEANS-233?page=all ]
     
Radu Preotiuc-Pietro resolved XMLBEANS-233:
-------------------------------------------

    Resolution: Won't Fix

The fact that you get the two lines of output before the "The system is out of resources" error is a clear indication that it is the javac process running out of memory when trying to compile the generated classes. But since "javac" is invoked in a separate process, giving more memory to XmlBeans has no effect. The way to solve this is to pass more memory to the "javac" process itself, using the "mx" option to scomp,  like so

scomp -mx 1024m myschema.xsd


> Schema compiler throws "java.lang.OutOfMemoryError: Java heap space" for some schemas
> -------------------------------------------------------------------------------------
>
>          Key: XMLBEANS-233
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-233
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>     Versions: Version 2
>  Environment: Windows XP Professional SP2, JDK 1.5.0_04, XMLBeans Development Kit Version 2.0.0, System RAM 1 GB
>     Reporter: Vijayaganesh M
>     Priority: Critical

>
> "scomp" throws the following while compiling some XSD files.
> Time to build schema type system: 2.844 seconds
> Time to generate code: 26.251 seconds
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: Java heap space
> BUILD FAILED
> Tried the following modifications in the scomp.cmd file in the "\xmlbeans-2.0.0\bin" folder.
> java -Xmx1024M -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaCompiler %*
> and
> java -Xmx1024M -Xms512M -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaCompiler %*

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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