Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) loadFromString error (Read 14477 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: loadFromString error
Reply #15 - Jul 4th, 2011 at 3:53pm
Print Post  
Which of the buttons should reproduce the problem? The Refresh button showed this, the other ones didn't do much and did not cause any exceptions:

  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: loadFromString error
Reply #16 - Jul 5th, 2011 at 8:27am
Print Post  
Il always reproduce the problem clicking in the Refresh button. I don't understand why you don't.

It's strange. Sometimes when I click on the button, I have the MalformedByteSequenceException in the loadFromString and sometimes the StackOverFlow in the savetostring.

Maybe it is a problem of environment ?
I use Eclipse 3.6 sr2, with java 1.6.0_26.
The fact is that I found the problem in different workstations.

The original problem occurs on a server tomcat with jsp calling my VegaGraphe class and displaying the graph in your Applet.

According to the datas from the database, I have the problem or not.

Have you a debug version of your classes to help us ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: loadFromString error
Reply #17 - Jul 5th, 2011 at 10:00am
Print Post  
Try this with the saveTo(fileName) and loadFrom(fileName) methods instead of the string versions. loadFrom should show the original exception, whereas loadFromString will catch it internally while trying several different string formats and encodings.

Also try running JVM with a bigger stack size using the -Xss option. The Java serialization code should not fall into infinite recursion since it marks already processed objects, but it still might run out of stack space if you are saving or loading a large object graph.
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: loadFromString error
Reply #18 - Jul 5th, 2011 at 11:05am
Print Post  
Thanks a lot,

Increasing the stack size of my JVM and of the Tomcat VM functionnes.

My local application now works : saveToString and loadFromString are OK.

Now the problem is that the applet does not load this diagram (others yes). We have in javascript an java.lang.reflect.InvocationTargetException in the loadFromString method.

Do you think that we can use saveTo and loadFrom for an internet application ? saveTo done by the servlet and loadFrom done by the applet ?

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: loadFromString error
Reply #19 - Jul 5th, 2011 at 11:16am
Print Post  
The JVM allocates even less memory for applets. You can change the defaults in this case by adding a java_arguments PARAM element under the APPLET element:
http://download.oracle.com/javase/6/docs/technotes/guides/jweb/applet/applet_dep...

Set larger values for both stack and heap size (Xss and Xmx) if you need to load large diagrams.
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: loadFromString error
Reply #20 - Jul 5th, 2011 at 11:32am
Print Post  
Changing the applet and overview jvm arguments works !!!

Thanks for your help, and sorry for the basic java memory problem ...........

Regards
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint