constellation icon indicating copy to clipboard operation
constellation copied to clipboard

NullPointerException importing simple graphML file

Open yellek opened this issue 1 year ago • 3 comments

Prerequisites

  • [X ] Put an X between the brackets on this line if you have done all of the following:

    • Running the latest version of Constellation

    • Attached the Support Package via Help > Support Package

    • Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ

    • Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues

    • Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories

Description

When I try to import a simple .graphML file I get a null pointer exception.

Steps to Reproduce

  1. Open Constellation

  2. Go to Data Access View tab

  3. Set maximum time range in global parameters

  4. Select GraphML under import graph file

  5. Select the file from the local file system

  6. Click Go

Expected behaviour: GraphML file is imported into Constellation or documentation is updated to explain how to perform the action successfully.

Actual behaviour: NullPointerException

Reproduces how often: 100%

Additional Information

Stack Trace:

java.lang.NullPointerException

au.gov.asd.tac.constellation.views.dataaccess.plugins.importing.file.GraphMLImportProcessor.process(GraphMLImportProcessor.java:187) au.gov.asd.tac.constellation.views.dataaccess.plugins.importing.file.GraphMLImportProcessor.process(GraphMLImportProcessor.java:58) au.gov.asd.tac.constellation.views.dataaccess.plugins.importing.ImportGraphFilePlugin.query(ImportGraphFilePlugin.java:151) au.gov.asd.tac.constellation.views.dataaccess.templates.RecordStoreQueryPlugin.lambda$query$0(RecordStoreQueryPlugin.java:140) java.base/java.util.concurrent.FutureTask.run(Unknown Source) java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base/java.lang.Thread.run(Unknown Source)

Input File:

<?xml version="1.0" encoding="UTF-8"?> <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> <graph id="G" edgedefault="undirected"> <node id="n0"/> <node id="n1"/> <node id="n2"/> <node id="n3"/> <node id="n4"/> <node id="n5"/> <node id="n6"/> <node id="n7"/> <node id="n8"/> <node id="n9"/> <node id="n10"/> <edge source="n0" target="n2"/> <edge source="n1" target="n2"/> <edge source="n2" target="n3"/> <edge source="n3" target="n5"/> <edge source="n3" target="n4"/> <edge source="n4" target="n6"/> <edge source="n6" target="n5"/> <edge source="n5" target="n7"/> <edge source="n6" target="n8"/> <edge source="n8" target="n7"/> <edge source="n8" target="n9"/> <edge source="n8" target="n10"/> </graph> </graphml>

yellek avatar Dec 11 '23 22:12 yellek

Hello @yellek, thank you for your interest in our work! If you have a question about using Constellation then please have a read of our Quick Start Guide. If you are a developer then it is advised to go through the Developer Training Guide. Note: We have already migrated to NetBeans 12, however the examples in the training guide still reference NetBeans 8.2. We are working on a new version so just bear that in mind. PS: I'm just an automated script, not a human being.

github-actions[bot] avatar Dec 11 '23 22:12 github-actions[bot]

Hi @yellek. Looking at the input file you've provided, it appears your edges are missing id tags which our processor is looking for and that's why you are getting the error.

Perhaps on our end we can add some checks and some better messaging which mentions that

antares1470 avatar Dec 13 '23 00:12 antares1470

Thanks for that. On to the next issue :)

BTW this is the example file on the GraphML site so may be a common file to be imported.

yellek avatar Dec 13 '23 00:12 yellek

@Guilty-Spark-343 Thanks for resolving the .GraphML file import. Looks like it working now as expected.

image

HolandCrick avatar Mar 04 '24 22:03 HolandCrick