[Laszlo-dev] [JIRA] Resolved: (LPP-7766) java.util.Set<JavaBean> does not get serialized / generates Exception in javaRPC

Sebastian Wagner seba.wagner at gmail.com
Wed Feb 18 15:08:04 PST 2009


okay thanks that works!

2009/2/18 Henry Minsky <henry.minsky at gmail.com>

> You might need to up the amount of memory your Java gets allocated
>
> I have
>
> export JAVA_OPTS="-Xmx800m"
>
> in my bashrc file.
>
> Since the flex compiler is called from inside of the Laszlo compiler,
> it eats more
> heap now.
>
> Another option you can have is in
> WEB-INF/lps/config/lps.properties, you can set
>
> compiler.swf9.execflex=true
>
> that will exec the flex compiler in a separate process, instead of in a
> thread.
> But that should not be necessary if you up the Java heap size...
>
>
> On Wed, Feb 18, 2009 at 4:31 PM, Sebastian Wagner <seba.wagner at gmail.com>
> wrote:
> > Thanks, I gonna wait for a nightly build.
> > If i run ant build in trunk I do get
> >
> >      [java] Stray error string from external compiler:
> >      [java] compiler output:
> >      [java] Konfigurationsdatei
> >
> /Users/sebastianwagner/Documents/work/openlaszlo/branches/openlaszlo/trunk/WEB-INF/frameworks/flex-config.xml
> > wird geladen
> >
> >      [java] SEVERE ERROR: Fehler: Java heap space
> >      [java] SEVERE ERROR: java.lang.OutOfMemoryError: Java heap space
> >      [java] FAIL: compiler returned 1
> >      [java] Done executing compiler
> >      [java] Intermediate file /tmp/lzswf9/lzgen47435/app.swc: does not
> exist
> >      [java] Exception compiling scriptfile:
> org.openlaszlo.sc.CompilerError:
> > SEVERE ERROR: Fehler: Java heap space
> >      [java] SEVERE ERROR: java.lang.OutOfMemoryError: Java heap space
> >      [java] org.openlaszlo.sc.CompilerException:
> > org.openlaszlo.sc.CompilerError: SEVERE ERROR: Fehler: Java heap space
> >      [java] SEVERE ERROR: java.lang.OutOfMemoryError: Java heap space
> >      [java]     at org.openlaszlo.sc.Compiler.compile(Compiler.java:401)
> >      [java]     at org.openlaszlo.sc.lzsc.compile(lzsc.java:110)
> >      [java]     at org.openlaszlo.sc.lzsc.compile(lzsc.java:325)
> >      [java]     at org.openlaszlo.sc.Main.main(Main.java:10)
> >      [java] Compilation aborted.
> >
> >
> > But I can also only verify by doing a simple sample with java.util.Set.
> > Maybe I can contrbute that to the wiki or docs to have a complete check
> with
> > all possible java-values. The hole Application is not lps-4.2.x ready as
> we
> > use some of the incubator components.
> >
> > sebastian
> >
> > 2009/2/18 Henry Minsky <hminsky at laszlosystems.com>
> >>
> >> I checked in a version of your fix for the JavaRPC serialization of
> >> Set. I did this in trunk though, and in trunk we've made the JavaRPC
> >> transport layer use JSON, in order to unify both the swf and DHTML
> >> runtimes. So I made the serialization of Set use a JSON list.  If you
> >> happen to test your application
> >> in 4.2, it would be good to know if you have any trouble with the new
> >> JSON layer being used.
> >>
> >>
> >>
> >>
> >> ---------- Forwarded message ----------
> >> From: Henry Minsky (JIRA) <jira at laszlosystems.com>
> >> Date: Wed, Feb 18, 2009 at 11:15 AM
> >> Subject: [JIRA] Resolved: (LPP-7766) java.util.Set<JavaBean> does not
> >> get serialized / generates Exception in javaRPC
> >> To: hminsky at laszlosystems.com
> >>
> >>
> >>
> >>    [
> >>
> http://www.openlaszlo.org/jira/browse/LPP-7766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> >> ]
> >>
> >> Henry Minsky resolved LPP-7766.
> >> -------------------------------
> >>
> >>      Fix Version/s: 4.2.0.1
> >>   Fixed in Change#: 12916
> >>         Resolution: Fixed
> >>
> >> r12916 | hqm | 2009-02-18 11:14:45 -0500 (Wed, 18 Feb 2009) | 28 lines
> >> Changed paths:
> >>  M
> >>
> /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/LZReturnObject.java
> >>
> >> Change 20090218-hqm-Z by hqm at badtzmaru.home on 2009-02-18 11:11:59 EST
> >>   in /Users/hqm/openlaszlo/trunk6
> >>   for http://svn.openlaszlo.org/openlaszlo/trunk
> >>
> >> Summary:  java.util.Set<JavaBean> does not get serialized / generates
> >> Exception in javaRPC
> >>
> >> New Features:
> >>
> >> Bugs Fixed: LPP-7766
> >>
> >> Technical Reviewer: hqm
> >> QA Reviewer: (pending)
> >> Doc Reviewer: (pending)
> >>
> >> Documentation:
> >>
> >> Release Notes:
> >>
> >> Details:
> >>
> >> + make the JAVARPC serializer understand Java Set class.
> >>
> >> - serializes a Set as an Javascript array
> >>
> >> Tests:
> >>
> >>
> >>
> >> > java.util.Set<JavaBean> does not get serialized / generates Exception
> in
> >> > javaRPC
> >> >
> >> >
> --------------------------------------------------------------------------------
> >> >
> >> >                 Key: LPP-7766
> >> >                 URL: http://www.openlaszlo.org/jira/browse/LPP-7766
> >> >             Project: OpenLaszlo
> >> >          Issue Type: Bug
> >> >          Components: RPC - JavaRemoting
> >> >    Affects Versions: Bastet (4.0.15)
> >> >            Reporter: Sebastian Wagner
> >> >            Assignee: Henry Minsky
> >> >             Fix For: 4.2.0.1
> >> >
> >> >         Attachments: LZReturnObject.java
> >> >
> >> >
> >> > If you have a Javabean with
> >> > class MyBean() {
> >> >     private Set<MySet> mySet;
> >> >     public Set getMySet() {
> >> >         return mySet;
> >> >     }
> >> >     public void setMySet(Set<MySet>mySet) {
> >> >         this.mySet = mySet;
> >> >     }
> >> > }
> >> > class MySet() {
> >> >    private Long mySetId;
> >> >    ... getters / setters
> >> > }
> >> > when you use this MyBean in a javaRPC call it will throw an Exception
> >> > while trying to serialize the java.util.Set
> >> > Like:
> >> > org.i4change.app.hibernate.beans.adresses.Adresses_Emails cannot be
> cast
> >> > to java.lang.String : Exception stack: java.lang.ClassCastException:
> >> > org.i4change.app.hibernate.beans.adresses.Adresses_Emails cannot be
> cast to
> >> > java.lang.String  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushMap(LZReturnObject.java:247)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:281)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushList(LZReturnObject.java:105)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:279)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createObjectProgram(LZReturnObject.java:338)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createObjectFile(LZReturnObject.java:388)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createObject(LZReturnObject.java:406)
> >> >  at
> org.openlaszlo.data.JavaDataSource.execute(JavaDataSource.java:639)  at
> >> > org.openlaszlo.data.JavaDataSource.getData(JavaDataSource.java:315)
>  at
> >> > org.openlaszlo.data.DataSource.getAsSWF(DataSource.java:112)  at
> >> >
> org.openlaszlo.servlets.responders.ResponderCache.respondImpl(ResponderCache.java:417)
> >> >  at
> org.openlaszlo.servlets.responders.Responder.respond(Responder.java:265)
> >> >  at org.openlaszlo.servlets.LZServlet._doGet(LZServlet.java:441)  at
> >> > org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:355)  at
> >> > org.openlaszlo.servlets.LZServlet.doPost(LZServlet.java:522)  at
> >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:637)  at
> >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  at
> >> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >> >  at
> >> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >> >  at
> >> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> >> >  at
> >> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >> >  at
> >> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >> >  at
> >> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> >> >  at
> >> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >> >  at
> >> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> >> >  at
> >> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> >> >  at
> >> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> >> >  at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> >> >  at java.lang.Thread.run(Thread.java:637) '«string(3819)#181|
> >> > 'org.i4change.app.hibernate.beans.adresses.Adresses_Emails cannot be
> cast to
> >> > java.lang.String : Exception stack: java.lang.ClassCastException:
> >> > org.i4change.app.hibernate.beans.adresses.Adresses_Emails cannot be
> cast to
> >> > java.lang.String  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushMap(LZReturnObject.java:247)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:281)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.java:220)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObject(LZReturnObject.java:146)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.createReturnValue(LZReturnObject.java:327)
> >> >  at
> >> >
> org.openlaszlo.remote.swf.LZReturnObject.pushObjectJavaBean(LZReturnObject.j...»
> >>
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> If you think it was sent incorrectly contact one of the
> >> administrators:
> >> http://www.openlaszlo.org/jira/secure/Administrators.jspa
> >> -
> >> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Henry Minsky
> >> Software Architect
> >> hminsky at laszlosystems.com
> >
> >
> >
> > --
> > Sebastian Wagner
> > http://www.webbase-design.de
> > http://openmeetings.googlecode.com
> > http://www.laszlo-forum.de
> > seba.wagner at gmail.com
> >
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
>



-- 
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.laszlo-forum.de
seba.wagner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090218/de47a4b1/attachment-0001.html


More information about the Laszlo-dev mailing list