class not found exception
Syed0208 opened this issue · 3 comments
Getting class not found exception while opening some diagrams. Please help in resolving this Error:
Cause : org.xml.sax.SAXException: org.argouml.sequence2.diagram.UMLSequenceDiagram
java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at org.tigris.gef.persistence.pgml.PGMLHandler.initDiagram(PGMLHandler.java:118)
at org.tigris.gef.persistence.pgml.PGMLHandler. (PGMLHandler.java:76)
at org.tigris.gef.persistence.pgml.InitialHandler.startElement(InitialHandler.java:65)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:166)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:128)
at org.argouml.persistence.PGMLStackParser.readDiagram(PGMLStackParser.java:392)
at org.argouml.persistence.PGMLStackParser.readArgoDiagram(PGMLStackParser.java:367)
at org.argouml.persistence.DiagramMemberFilePersister.load(DiagramMemberFilePersister.java:117)
at org.argouml.persistence.UmlFilePersister.doLoad(UmlFilePersister.java:392)
at org.argouml.persistence.ZargoFilePersister.doLoad(ZargoFilePersister.java:274)
at org.argouml.ui.ProjectBrowser.loadProject2(ProjectBrowser.java:1607)
at org.argouml.ui.ProjectBrowser.loadProject(ProjectBrowser.java:1532)
at org.argouml.ui.LoadSwingWorker.construct(LoadSwingWorker.java:91)
at org.argouml.ui.SwingWorker.doConstruct(SwingWorker.java:154)
at org.argouml.ui.SwingWorker$2.run(SwingWorker.java:282)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLHandler.initDiagram(PGMLHandler.java:110)
... 29 more
Full exception : org.argouml.persistence.OpenException: org.xml.sax.SAXException: org.argouml.sequence2.diagram.UMLSequenceDiagram
java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at org.argouml.persistence.DiagramMemberFilePersister.load(DiagramMemberFilePersister.java:123)
at org.argouml.persistence.UmlFilePersister.doLoad(UmlFilePersister.java:392)
at org.argouml.persistence.ZargoFilePersister.doLoad(ZargoFilePersister.java:274)
at org.argouml.ui.ProjectBrowser.loadProject2(ProjectBrowser.java:1607)
at org.argouml.ui.ProjectBrowser.loadProject(ProjectBrowser.java:1532)
at org.argouml.ui.LoadSwingWorker.construct(LoadSwingWorker.java:91)
at org.argouml.ui.SwingWorker.doConstruct(SwingWorker.java:154)
at org.argouml.ui.SwingWorker$2.run(SwingWorker.java:282)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXException: org.argouml.sequence2.diagram.UMLSequenceDiagram
java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at org.tigris.gef.persistence.pgml.PGMLHandler.initDiagram(PGMLHandler.java:118)
at org.tigris.gef.persistence.pgml.PGMLHandler. (PGMLHandler.java:76)
at org.tigris.gef.persistence.pgml.InitialHandler.startElement(InitialHandler.java:65)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:166)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:128)
at org.argouml.persistence.PGMLStackParser.readDiagram(PGMLStackParser.java:392)
at org.argouml.persistence.PGMLStackParser.readArgoDiagram(PGMLStackParser.java:367)
at org.argouml.persistence.DiagramMemberFilePersister.load(DiagramMemberFilePersister.java:117)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLHandler.initDiagram(PGMLHandler.java:110)
... 29 more
java.lang.ClassNotFoundException: org.argouml.sequence2.diagram.UMLSequenceDiagram
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLHandler.initDiagram(PGMLHandler.java:110)
at org.tigris.gef.persistence.pgml.PGMLHandler. (PGMLHandler.java:76)
at org.tigris.gef.persistence.pgml.InitialHandler.startElement(InitialHandler.java:65)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:166)
at org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:128)
at org.argouml.persistence.PGMLStackParser.readDiagram(PGMLStackParser.java:392)
at org.argouml.persistence.PGMLStackParser.readArgoDiagram(PGMLStackParser.java:367)
at org.argouml.persistence.DiagramMemberFilePersister.load(DiagramMemberFilePersister.java:117)
at org.argouml.persistence.UmlFilePersister.doLoad(UmlFilePersister.java:392)
at org.argouml.persistence.ZargoFilePersister.doLoad(ZargoFilePersister.java:274)
at org.argouml.ui.ProjectBrowser.loadProject2(ProjectBrowser.java:1607)
at org.argouml.ui.ProjectBrowser.loadProject(ProjectBrowser.java:1532)
at org.argouml.ui.LoadSwingWorker.construct(LoadSwingWorker.java:91)
at org.argouml.ui.SwingWorker.doConstruct(SwingWorker.java:154)
at org.argouml.ui.SwingWorker$2.run(SwingWorker.java:282)
at java.lang.Thread.run(Unknown Source)
It looks like the umldiagrams are not loaded. Exactly how do you start argouml (and what version are you running)?
I have the same problem
I start argouml using java -jar argouml.jar
I downloaded now ArgoUML latest release from https://github.com/argouml-tigris-org/argouml/releases (ArgoUML-0.35.1.zip), extracted it to a directory in my linux system (within /home/euluis/Programs/), all files and preserving the folder structure (resulted in 54 files, mainly jar files and 2 folders).
Then, within said directory, from the terminal,
~/Programs/argouml-0.35.1 $ java -jar argouml.jar
And it worked... In specific, I added a class to the default class diagram, added a sequence diagram using 2 instances of that class one calling the other, saved the model and quit ArgoUML.
NOTE My java --version
gives openjdk 17.0.8 2023-07-18
Maybe the directory you have the argouml.jar is missing all the other required jars in the release for it to work correctly?