Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) LoadFromString Problem (Read 15974 times)
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #15 - Mar 18th, 2009 at 3:08pm
Print Post  
Hi,

A terminal connection is not possible.

I am trying to uninstall/reinstall eclipse. It seems that there is a problem with this version.

I will keep you informed.

Regards.

JR

  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #16 - Mar 18th, 2009 at 3:55pm
Print Post  
Reinstallation of eclipse does not change anything.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LoadFromString Problem
Reply #17 - Mar 18th, 2009 at 4:00pm
Print Post  
We'll try it with the latest Java runtime tomorrow.
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #18 - Mar 19th, 2009 at 9:59am
Print Post  
Hi Stoyan,

This morning, I tried with the jre 1.6.0 from SUN.
It works.

So the problem don't come from my Eclipse environment but from the jre 1.6.0_12.

Regards

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LoadFromString Problem
Reply #19 - Mar 19th, 2009 at 12:39pm
Print Post  
Yep, each one of the last three JRE updates had some surprises for us. Now we'll have to release patches for both the JDiagram and NetDiagram controls Undecided
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #20 - Mar 19th, 2009 at 12:43pm
Print Post  
Sorry Wink
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LoadFromString Problem
Reply #21 - Apr 5th, 2009 at 9:51am
Print Post  
We had tough time finding the root of this problem. Ultimately, it's caused by a StackOverflow in the Java's ObjectInputStream code. The Java's built-in serialization system supports writing and reading a graph of objects, and JDiagram uses this to implement serialization of the Diagram object and the nodes and links it contains. With Java 6 update 12, Sun have either moved from a queue-based to a stack-based deserialization implementation, or they decreased the default stack size, and as a result now it can't load very large graphs that loaded fine in the older JRE versions.

What matters here is the largest connected component of the graph, and not the overall number of items in the graph. So, the larger graphs that you said are loaded correctly probably have smaller connected components than the one you get the exception with.

As a workaround, either set a larger stack size for the JRE, or while using the old JRE version, load all diagrams and save them again as XML/CompressedXml strings.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #22 - Apr 6th, 2009 at 8:23am
Print Post  
Hi,

I put this jre argument -Xss1024k and now it works.

Regards

JR
  
Back to top
 
IP Logged
 
mimma
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Mar 30th, 2009
Re: LoadFromString Problem
Reply #23 - Apr 10th, 2009 at 11:04am
Print Post  
Hello I'm trying to make a simple web application and I have problems with loadFromString (string).


my servlet is:
package controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
/**
* Servlet implementation class for Servlet: SimpleController
*
*/
public class SimpleController extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
{
  /* (non-Java-doc)
   * @see javax.servlet.http.HttpServlet#HttpServlet()
   */
  public SimpleController()
  {
    super();
  }
 
  /* (non-Java-doc)
   * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
   
    String string =” String obtained by saveToString ()”;


   HttpSession session = request.getSession();
    session.setAttribute("string", string);
   
     
    RequestDispatcher dispatcher;
    dispatcher = getServletContext().getRequestDispatcher("/ShowUser.jsp");
    dispatcher.forward(request,response);

  }
 
  /* (non-Java-doc)
   * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    this.doGet(request, response);
  }
}


my jsp is:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<jsp:useBean id="string" scope="session" class="java.lang.String"></jsp:useBean>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<script type="text/javascript">

function load(){

var applet = document.getElementById("fcapplet");
    applet.getDiagramView().setAllowInplaceEdit(true);
    var fc = applet.getDiagram();
    fc.loadFromString(<%=string %>);
  }
</script>

<title>Informazioni utente salvate su file</title>
</head>
<body onload="load()">
<table>


<tr><td>
<applet id="fcapplet" code="com.mindfusion.diagramming.DiagramApplet.class" archive="JDiagram.jar" width="640" height="480" mayscript>
</applet>
</td></tr>
</table>
</body>
</html>


Can you help?
sorry my English!

Mimi
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: LoadFromString Problem
Reply #24 - Apr 10th, 2009 at 11:23am
Print Post  
Hello,

I think you have to put this line in the applet tag :
<param name="AppletStarted" value="load">

like this

<applet id="fcapplet" code="com.mindfusion.diagramming.DiagramApplet.class" archive="JDiagram.jar" width="640" height="480" mayscript>
<param name="AppletStarted" value="load">
</applet>

and delete the following line :
<body onload="load()">

The problem is when the html page is loaded the applet is not still started.
Triggering the AppletStarted event in the applet tags allows the applet to load the string contained in your string when it is really started.

Regards

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