Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cell.cross returns Error: “java.lang.NullPointerException” #6453

Closed
magdmartin opened this issue Mar 15, 2024 · 1 comment · Fixed by #6474
Closed

cell.cross returns Error: “java.lang.NullPointerException” #6453

magdmartin opened this issue Mar 15, 2024 · 1 comment · Fixed by #6474
Assignees
Labels
metadata Adding metadata to projects, columns and other parts of the data model Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Milestone

Comments

@magdmartin
Copy link
Member

I am creating this issue to track in Github the error reported in conversation on the forum https://forum.openrefine.org/t/cell-cross-not-working-getting-the-following-error-message-error-java-lang-nullpointerexception/688 - I am not personally experiencing the issue and cannot help to reproduce it.

Summarizing the environment from the four users that reported issues we have no clear pattern:

  • OpenRefine 3.7.1 and 3.7.2 - macOS Ventura Opera 97.0.4 - archilecteur
  • OpenRefie version unknown Mac Os version 13.6.2 Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201) Bart_Magnus
  • OpenRefine 3.7.9 ubuntu Java version "21.0.2" 2024-01-16 LTS Michel_Guenard
  • OpenRefine 3.7.5 and 3.7.9 Windows 11 openjdk version "17.0.10" 2024-01-16 Michael_Beckett

Current Results

The cell.cross function returns a NullPointerException

@magdmartin magdmartin added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Mar 15, 2024
tfmorris added a commit to tfmorris/OpenRefine that referenced this issue Mar 20, 2024
- improve error messages for various types of corruption
- don't automatically recreate missing directories at startup
- extract magic strings into constants
tfmorris added a commit to tfmorris/OpenRefine that referenced this issue Mar 20, 2024
- improve error messages for various types of corruption
- don't automatically recreate missing directories at startup
- extract magic strings into constants
@tfmorris tfmorris added metadata Adding metadata to projects, columns and other parts of the data model and removed Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Mar 20, 2024
@tfmorris tfmorris self-assigned this Mar 20, 2024
@tfmorris
Copy link
Member

This is caused by corrupt workspaces which have projects listed in workspace.json which don't have project directories. Although we have code to attempt to recover a metadata.json file if it's missing and there's data there, if there's nothing at all, it will cause problems for the project lookup by name that cross() uses.

One way to identify workspaces that might be corrupted in this way is empty project directories in the workspace directory. If they are deleted, they will get recreated the next time OpenRefine is started. Editing the workspace.json file to remove the offending project ID(s) (there may be more than one) is a temporary workaround until a fixed version of OpenRefine is available.

wetneb pushed a commit that referenced this issue Mar 21, 2024
* Fix project name lookup with missing metadata. Fixes #6453

- improve error messages for various types of corruption
- don't automatically recreate missing directories at startup
- extract magic strings into constants

* Narrow Exception to IOException
@wetneb wetneb added this to the 3.8 milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metadata Adding metadata to projects, columns and other parts of the data model Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants