Ticket #996 (closed Defect: see follow-up)

Opened 8 years ago

Last modified 8 years ago

Broken Instance

Reported by: JuergeN Owned by: jri
Priority: Major Milestone: Release 4.8.3
Component: DeepaMehta Standard Distribution Version: 4.8.2
Keywords: Cc:
Complexity: 3 Area:
Module:

Description

When editing an Composition Definition and entering any Text into Custom Association Defintion, DeepaMehta is broken. Error is:

Fetching all association types failed
(java.lang.RuntimeException?)
Reason:
Fetching association type "" failed
(java.lang.RuntimeException?)
Reason:
More than one element in org.neo4j.index.impl.lucene.LuceneIndex?$1@4b712592. First element is 'Node[1100]' and the second element is 'Node[1103]'
(java.util.NoSuchElementException?)
Server status: 500 Server Error

How can we fix this?

Change History

comment:1 Changed 8 years ago by JuergeN

Even though we were able to delete the text enty in the custom assoc def, and after restarting the server, we now get a general error:

Fetching all association types failed
(java.lang.RuntimeException?)
Reason:
Fetching association type "" failed
(java.lang.RuntimeException?)
Reason:
More than one element in org.neo4j.index.impl.lucene.LuceneIndex?$1@4b712592. First element is 'Node[1100]' and the second element is 'Node[1103]'
(java.util.NoSuchElementException?)
Server status: 500 Server Error

DeepaMehta is unreachable.

comment:2 Changed 8 years ago by jri

Oh yes, this is indeed a nasty show stopper :-(
It needs to be fixed.

IMPORTANT: at the moment you can't use the "Custom Association Type" field to create new assoc types. You can only select an existing assoc type from the menu (resp. type in its exact name).

If you type in a name of a non-existing assoc type, DM will create an assoc type with that name. However that assoc type will be invalid as it have no URI (empty string). Such an assoc type can't be fetched from the DB as types require proper URIs.

You can fix your instance via REST API. First find out the ID of your invalid assoc type:

GET /core/topic/by_type/dm4.core.assoc_type

This gives you a list of all assoc types. Find the one which has an empty URI (possibly at the end of the list) and remember its ID.

Then delete that (assoc type) topic by ID:

DELETE /core/topic/{id}

Repeat these steps in case you have further invalid assoc types.

Your instance should come up again then.

comment:3 Changed 8 years ago by jri

Do you need any more help with repairing your instance?

comment:4 Changed 8 years ago by JuergeN

Thanks! Curl did the trick:

curl localhost:8080/core/topic/by_type/dm4.core.assoc_type -H "Authorization: Basic YOURBASE64ENCODEDUSERNAMEANDPASSPHRASEHERE=" | python -m json.tool

... got me the id. Then I was able to delete the corrupted assoc type:

curl -X DELETE localhost:8080/core/topic/6789 -H "Authorization: Basic YOURBASE64ENCODEDUSERNAMEANDPASSPHRASEHERE="

Please make sure, that this cannot happen again, by fixing this issue in the DeepaMehta Client.

Last edited 8 years ago by JuergeN (previous) (diff)

comment:5 Changed 8 years ago by jri

  • Status changed from new to closed
  • Resolution set to see follow-up

See follow-up: #1003

Note: See TracTickets for help on using tickets.