ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | xmlc List | August 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [xmlc] RE: [enhydra] java.lang.StackOverflowError


Is it possible for you to try a newer version of XMLC?  Newer versions should 
be
backward compatible with 2.2.5, only with important bugfixes applied.  I'm not
sure an upgrade will fix your issues here, but it's one thing to rule out and
it would be a good idea to be current anyway.

The other thing I suggest you try is XMLC's deferred parsing feature.  To 
enable
this, you can use either the command line switch "-for-deferred-parsing" or, 
if
you are using XML metadata, <documentClass deferParsing="true"/>.  Keep in 
mind
that you will need to copy both the markup files and the generated metadata
files to the same package as the corresponding class files since they will be
required when the XMLC classes are loaded at runtime.  The reason I think this
might solve your current issue is that the XMLC class doesn't generate massive
methods that recreate your DOM.  Instead, the DOM is parsed by the parser and
cached.  It is then cloned for each request.  Since you are seeing the error 
in
the compilation step (the source compilation, in contrast to the javac binary
compilation) and the fact that this step is skipped when deferred parsing is
used, I think this could solve your issue.  I'm not sure whether the issue can
be fixed for the normal XMLC compilation case?  That remains to be seen.

Note: there are also options to use resource directories rather than copy all
the markup and metadata files into the classpath, but that is usually for
development purposes since it allows you to copy in new versions of the markup
to have deferred parsing reload it dynamically at runtime.  That takes some
explaining and I wouldn't waste time thinking about it too much.  You can look
at the Tomcat demo in the source release for an example.

If you have further questions or need pointers on using deferred parsing, 
don't
hesitate to ask.


Jake

Quoting Mohammed Rafeeq <mrafeeq@xxxxxxx>:

> I am using enhydra 5.1 and xmlc.jar: 2.2.5
>
>
> -----Original Message-----
> From: Slobodan Vujasinovic [mailto:slobodan@xxxxxxxxxxxxx]
> Sent: Monday, August 14, 2006 1:26 AM
> To: enhydra@xxxxxxxxxxxxx; xmlc@xxxxxxxxxxxxx
> Subject: Re: [enhydra] java.lang.StackOverflowError
>
> Hi,
>
> I've forwarded your message to XMLC mailing list!
> Maybe someone else already had this problem with large HTML pages!?
>
> Which Enhydra and XMLC versions are you using currently (please post
> your response on XMLC mailing list too - xmlc@xxxxxxxxxxxxx)?
>
> Regards,
>   Slobodan Vujasinovic
> Enhydra Development Team
>
>
>
> mrafeeq@xxxxxxx wrote:
>
> >Hi all
> >
> >I have a big html file ( consisting of 550 <td> cells) . when i run the
>
> >xmlc
> >
> >When I run the ant task to compile my html to .java files it throws an
> >exception like below. ( i run a xmlc task)
> >
> >xmlc:
> >    [xmlc]     CARGO2QC.html --> CARGO2QC.class
> >     [xmlc] >>> parsing
> C:\xdx\svndatafinder\src\datafinder\resources\CARGO2QC.html
> >     [xmlc] >>> using DOM Factory class:
> org.enhydra.xml.xmlc.dom.lazydom.LazyHTMLDomFactory
> >     [xmlc] >>> generating code
> >     [xmlc]     creating class: C:\xdx\svndatafinder\classes\Generated
> Source\datafinder\presentation\CARGO2QCHTML.java
> >     [xmlc] >>> compiling code
> >     [xmlc] javac -d C:\xdx\svndatafinder\classes -encoding ISO-8859-1
> >C:\xdx\svndatafinder\classes\Generated
> >Source\datafinder\presentation\CARGO2QCHTML.java
> >
> >
> >The system is out of resources.
> >Consult the following stack trace for details.
> >java.lang.StackOverflowError
> >     [xmlc] Error: compile of generated java code failed
> >     [xmlc] org.enhydra.xml.xmlc.XMLCException: compile of generated
> java code failed
> >     [xmlc]     at
> org.enhydra.xml.xmlc.misc.ProcessRunner.run(ProcessRunner.java:283)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.codegen.JavaCompile.compile(JavaCompile.java:145)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.compiler.Javac.compile(Javac.java:88)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.compiler.Compiler.compileJavaSource(Compiler.java:1
> 53)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.compiler.Compiler.compileDocument(Compiler.java:185
> )
> >     [xmlc]     at
> org.enhydra.xml.xmlc.compiler.Compiler.compile(Compiler.java:226)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.commands.xmlc.XMLC.compile(XMLC.java:132)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.commands.xmlc.XMLC.compileHandleErrors(XMLC.java:14
> 2)
> >     [xmlc]     at
> org.enhydra.xml.xmlc.commands.xmlc.XMLC.main(XMLC.java:153)
> >     [xmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> >     [xmlc]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> >     [xmlc]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> >     [xmlc]     at java.lang.reflect.Method.invoke(Method.java:324)
> >     [xmlc]     at com.lutris.ant.taskdefs.Xmlc.execute(Unknown Source)
> >     [xmlc]     at org.apache.tools.ant.Task.perform(Task.java:317)
> >     [xmlc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> >     [xmlc]     at
> org.apache.tools.ant.Target.performTasks(Target.java:334)
> >     [xmlc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >     [xmlc]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> >     [xmlc]     at org.apache.tools.ant.Main.runBuild(Main.java:610)
> >     [xmlc]     at org.apache.tools.ant.Main.start(Main.java:196)
> >     [xmlc]     at org.apache.tools.ant.Main.main(Main.java:235)
> >
> >
> >On researching I found out that the java stack is getting overflown. I
> >tried to increase the java stack size and os stack size by mentioning
> >
> >%JAVA% -Xms256M -Xmx512M -Xss1000K -Xoss5000K -cp %CLASSPATH% .........
> >
> >in %ENHYDRA_HOME%/bin/ant.bat
> >
> >I am using jdk 1.4.2 and the operating system is windows xp
> professional.
> >
> >but this did not solve the problem. Any leads will be much appreciated
> >
> >I have posted this problem in this forum too
> >
> >http://forums.devx.com/showthread.php?t=155222&highlight=java.lang.Stac
> >kOverflowError
> >
> >Thanksm
> >-Rafeeq(mrafeeq@xxxxxxx)
> >
> >
> >
> >-----------------------------------------------------------------------
> >-
> >
> >
> >--
> >You receive this message as a subscriber of the enhydra@xxxxxxxxxxxxx
> mailing list.
> >To unsubscribe: mailto:enhydra-unsubscribe@xxxxxxxxxxxxx
> >For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
> >ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
>
>
>






<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.