Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic JDiagram JSPSample is buggy (Read 6481 times)
spooky
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 7th, 2008
JDiagram JSPSample is buggy
Nov 7th, 2008 at 2:02am
Print Post  
I had to add (DiagramNode) to several lines.

I gave up after I got more servlet errors.

Anybody get this JSP example to even work under Tomcat 5, JDK 1.5
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram JSPSample is buggy
Reply #1 - Nov 7th, 2008 at 8:45am
Print Post  
It works fine on my system, but using apache-tomcat-6.0.16. Our developer will try this with Tomcat 5 next week.
  
Back to top
 
IP Logged
 
spooky
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 7th, 2008
Re: JDiagram JSPSample is buggy
Reply #2 - Nov 7th, 2008 at 4:46pm
Print Post  
Yes... I tried under Tomcat 6 and works but I really need it to work under Tomcat 5.

Let me know once resolved under version 5.X
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram JSPSample is buggy
Reply #3 - Nov 10th, 2008 at 2:14pm
Print Post  
We only had to change a coupe of "s to 's in this line to make it work under Tomcat 5:

<jsp:setProperty name="diagram" property="font" value='<%= new Font("Arial", Font.PLAIN, 12) %>' />

What kind of other errors are you getting - compilation or runtime ones?
  
Back to top
 
IP Logged
 
spooky
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 7th, 2008
Re: JDiagram JSPSample is buggy
Reply #4 - Nov 10th, 2008 at 4:05pm
Print Post  
Obviously it is missing an import and quite possibly reference to a JAR that I don't seem to have.
What is not clear is which jar it should be because 'setTextContent' is not being used in code.


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org.w3c.dom.Element.setTextContent(Ljava/lang/String;)V

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.
java:846)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.ja
va:779)

org.apache.jsp.index_jsp._jspService(index_jsp.java:339)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoSuchMethodError: org.w3c.dom.Element.setTextContent(Ljava/lang/String;)V

com.mindfusion.diagramming.XmlPersistContext.addChildElement(Unknown Source)

com.mindfusion.diagramming.XmlPersistContext.writeInt(Unknown Source)

com.mindfusion.diagramming.XmlPersistContext.writeEnum(Unknown Source)

com.mindfusion.diagramming.Diagram.a(Unknown Source)

com.mindfusion.diagramming.Diagram.saveToXml(Unknown Source)

com.mindfusion.diagramming.Diagram.saveToXml(Unknown Source)

com.mindfusion.diagramming.Diagram.saveToString(Unknown Source)

org.apache.jsp.index_jsp._jspService(index_jsp.java:314)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram JSPSample is buggy
Reply #5 - Nov 10th, 2008 at 4:48pm
Print Post  
The component uses DocumentBuilderFactory.newDocumentBuilder().newDocument() to get a org.w3c.dom.Document object for XML serialization. From what I know, it might depend on your server configuration what XML library is used, and it seems the XML API configured on your system doesn't provide the Element.setTextContent method. Do you have any idea if your Tomcat copy is configured to use a specific XML library? According to our developer, setTextContent is a DOM 3 level method, and it might not be available in older XML DOM implementations ...

Stoyan
  
Back to top
 
IP Logged
 
spooky
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 7th, 2008
Re: JDiagram JSPSample is buggy
Reply #6 - Nov 10th, 2008 at 6:22pm
Print Post  
It is Tomcat 5.0.30 but I don't know what XML library if any that comes with it. It will take some time to investigate.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram JSPSample is buggy
Reply #7 - Nov 10th, 2008 at 8:38pm
Print Post  
It worked out-of-the-box for us (after fixing the "s), using Tomcat 5.5.27, which is listed as the latest stable 5.X release at http://tomcat.apache.org/.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint