Question

i tray to convert bpmn2.0 file to JSON , but i have this error :

java.lang.NoClassDefFoundError: **math/geom2d/line/LinearShape2D**

my code :

public void convertXmlToJson() throws Exception {
    XMLStreamReader streamReader = null ; 
    BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
    XMLInputFactory factory = XMLInputFactory.newInstance();
    //get Reader connected to XML input from filename
    Reader reader = new FileReader(filename);
    streamReader = factory.createXMLStreamReader(reader);
    ObjectNode node = new BpmnJsonConverter().convertToJson(bpmnXMLConverter.convertToBpmnModel(streamReader));
    node.toString();
}
Was it helpful?

Solution

Well, one of your JARs in the build path is trying to load the class math.geom2d.line.LinearShape2D - but it is not in your build path, so it can not be found. Add the jar with this class to the build path and it should work.

Seems like you need this jar: http://geom-java.sourceforge.net/

http://geom-java.sourceforge.net/api/math/geom2d/line/class-use/LinearShape2D.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top