You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Chathura Herath <ch...@gmail.com> on 2008/07/27 01:55:41 UTC

SchemaCompiler kills the jvm when finished.

Hi,
I am using the SchemaCompiler.main to compile and jar the types in the
runtime and it genereates stuff fine. But when its done SchemaCompiler
shuts my program down, so my idea of dynamically genarating the  types
and classloading and then using is lost.
We had a similar problem in Axis wsdl2java looong time ago and it was
a System.exit(0) at the end. Any advice on how to mitigate the
situation.
Thanks in Advance
-- 
Chathura Herath
http://people.apache.org/~chathura/
http://chathurah.blogspot.com/

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


RE: SchemaCompiler kills the jvm when finished.

Posted by Radu Preotiuc-Pietro <ra...@oracle.com>.
We actually recommend using

XmlBeans.compileXmlbeans() instead of calling SchemaCompiler.main()

Radu 

> -----Original Message-----
> From: Chathura Herath [mailto:chathurah@gmail.com] 
> Sent: Tuesday, July 29, 2008 7:17 AM
> To: user@xmlbeans.apache.org
> Subject: Re: SchemaCompiler kills the jvm when finished.
> 
> Hi Jacob,
> I got it working with SchemaCompiler.compile(), so I am good. 
> May be its still worth doing a search replace of 
> System.exit(0) to "return"
> because calling main is a very convenient API.
> Chathura.
> 
> On Tue, Jul 29, 2008 at 1:43 AM, Jacob Danner 
> <ja...@gmail.com> wrote:
> > Is there a particular reason you are calling main()?
> > Why not try SchemaCompiler.compile(...)?
> > If you are curious how it works take a peek at some of the 
> unit tests 
> > like 
> > 
> http://svn.apache.org/viewvc/xmlbeans/trunk/test/src/compile/scomp/che
> > ckin/CompilationTests.java?view=markup
> >
> > HTH,
> > -jacobd
> >
> > On Sun, Jul 27, 2008 at 12:55 AM, Chathura Herath 
> <ch...@gmail.com> wrote:
> >> Hi,
> >> I am using the SchemaCompiler.main to compile and jar the types in 
> >> the runtime and it genereates stuff fine. But when its done 
> >> SchemaCompiler shuts my program down, so my idea of dynamically 
> >> genarating the  types and classloading and then using is lost.
> >> We had a similar problem in Axis wsdl2java looong time ago 
> and it was 
> >> a System.exit(0) at the end. Any advice on how to mitigate the 
> >> situation.
> >> Thanks in Advance
> >> --
> >> Chathura Herath
> >> http://people.apache.org/~chathura/
> >> http://chathurah.blogspot.com/
> >>
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> >> For additional commands, e-mail: user-help@xmlbeans.apache.org
> >>
> >>
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> >
> >
> 
> 
> 
> --
> Chathura Herath
> http://people.apache.org/~chathura/
> http://chathurah.blogspot.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> 


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


Re: SchemaCompiler kills the jvm when finished.

Posted by Chathura Herath <ch...@gmail.com>.
Hi Jacob,
I got it working with SchemaCompiler.compile(), so I am good. May be
its still worth doing a search replace of System.exit(0) to "return"
because calling main is a very convenient API.
Chathura.

On Tue, Jul 29, 2008 at 1:43 AM, Jacob Danner <ja...@gmail.com> wrote:
> Is there a particular reason you are calling main()?
> Why not try SchemaCompiler.compile(...)?
> If you are curious how it works take a peek at some of the unit tests like
> http://svn.apache.org/viewvc/xmlbeans/trunk/test/src/compile/scomp/checkin/CompilationTests.java?view=markup
>
> HTH,
> -jacobd
>
> On Sun, Jul 27, 2008 at 12:55 AM, Chathura Herath <ch...@gmail.com> wrote:
>> Hi,
>> I am using the SchemaCompiler.main to compile and jar the types in the
>> runtime and it genereates stuff fine. But when its done SchemaCompiler
>> shuts my program down, so my idea of dynamically genarating the  types
>> and classloading and then using is lost.
>> We had a similar problem in Axis wsdl2java looong time ago and it was
>> a System.exit(0) at the end. Any advice on how to mitigate the
>> situation.
>> Thanks in Advance
>> --
>> Chathura Herath
>> http://people.apache.org/~chathura/
>> http://chathurah.blogspot.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>> For additional commands, e-mail: user-help@xmlbeans.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>



-- 
Chathura Herath
http://people.apache.org/~chathura/
http://chathurah.blogspot.com/

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


Re: SchemaCompiler kills the jvm when finished.

Posted by Jacob Danner <ja...@gmail.com>.
Is there a particular reason you are calling main()?
Why not try SchemaCompiler.compile(...)?
If you are curious how it works take a peek at some of the unit tests like
http://svn.apache.org/viewvc/xmlbeans/trunk/test/src/compile/scomp/checkin/CompilationTests.java?view=markup

HTH,
-jacobd

On Sun, Jul 27, 2008 at 12:55 AM, Chathura Herath <ch...@gmail.com> wrote:
> Hi,
> I am using the SchemaCompiler.main to compile and jar the types in the
> runtime and it genereates stuff fine. But when its done SchemaCompiler
> shuts my program down, so my idea of dynamically genarating the  types
> and classloading and then using is lost.
> We had a similar problem in Axis wsdl2java looong time ago and it was
> a System.exit(0) at the end. Any advice on how to mitigate the
> situation.
> Thanks in Advance
> --
> Chathura Herath
> http://people.apache.org/~chathura/
> http://chathurah.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

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