Menu

#48 Error(s) while opening diagram from file

open
nobody
None
5
2011-03-04
2011-03-04
Frank
No

Just downloaded Violet version 0.21.1. Noticed that reopening an earlier created diagram results in exception (displayed in the bomb dialog):

com.horstmann.violet.framework.diagram.BentStyle not compatible with com.horstmann.violet.framework.diagram.Graph

- or -

com.horstmann.violet.framework.diagram.ArrowHead not compatible with com.horstmann.violet.framework.diagram.Graph

The diagram will not open. This can partly be worked around by opening the diagram file in a text- or xml editor and remove/comment all <object class="com.horstmann.violet.ArrowHead" ... /> and <object class="com.horstmann.violet.BentStyle" ... /> enties. Now the diagram will open in Violet again, but all line bends and arrowheads on the associations will be lost (ofcourse).

Discussion

  • Frank

    Frank - 2011-03-04

    small diagram example file with applied workaround

     
  • lubars

    lubars - 2011-12-10

    I'm experiencing this as well, with identical symptoms and (lossy) workaround.

    I was able to manually edit the XML to display correctly as follows:

    1) Find the following properties near the end of the file (multiple instances):

    <void property="bentStyle">
    </void>
    <void property="endArrowHead">
    </void>
    <void property="lineStyle">
    </void>

    2) Fill in the properties as follows:

    <void property="bentStyle">
    <object class="com.horstmann.violet.BentStyle" field="VHV"/>
    </void>
    <void property="endArrowHead">
    <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
    </void>
    <void property="lineStyle">
    <object class="com.horstmann.violet.ArrowHead" field="DOTTED"/>
    </void>

    Your actual values may (will) be different; they should mirror the corresponding values in the <object> tag near the top of the file.

     

Log in to post a comment.