I'm trying to persist my owlim store in a shutdownHook. But when I'm sending a signal to the running java process I get the following error in your code and my shutdownHook is never called.

Exception in thread "Thread-4" java.lang.IllegalStateException: Shutdown in progress at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55) at java.lang.Runtime.removeShutdownHook(Runtime.java:220) at com.ontotext.trree.owlim_ext.SailImpl.shutDown(Unknown Source) at com.ontotext.trree.owlim_ext.SailImpl$1.run(Unknown Source)

It looks like you're removing a shutdown hook, while the shutdown is already initialized.

Am I doing something wrong?

This happens in owlim-lite 5.3 and also in 5.4. I was using 4.2, there it didn't happen.

Thanks, Hendrik

asked 25 Oct '13, 15:39

hendrik's gravatar image

accept rate: 0%

I'm observing the same error when I shut down Tomcat (7.0.29 on Windows), running owlim-lite 5.4. I've not tried to implement any shutdown hook to persist the data - I assume this should be done automatically when setting owlim:noPersist "false", but it is not happening for me.

The repository remains and the ontology imported when creating the repository, but no other imported ontologies or individuals.

(14 Nov '13, 10:50) vengen

Hi Hendrik,

Sorry for the headache and for the late response!

Owlim-Lite uses a shutdown hook in order to persist data and finish normally but there is a bug in the shutdown process which tries to remove that hook in order to prevent shutting down twice (removing the hook by the hook itself is forbidden). Because the hook is the most used way to shut down properly when using Owlim under Tomcat, this bug manifests every time Tomcat is stopped by killing its process. There is a fix that will be available in the next release which shuts down Owlim normally and persists the data using this way to stop the server.

Meanwhile, you can try to stop Tomcat through JConsole by connecting to the Tomcat process (org.apache.cataline.startup.Bootstrap), going to the 'MBeans' tab and then selecting Catalina->Service->Operations->stop(). This will invoke shutdown() in all servlets, including Sesame which on its side will shut down Owlim without losing data.



answered 19 Nov '13, 06:45

Ruslan's gravatar image

Ruslan ♦
accept rate: 25%


Can anybody help we this please? I've a problem with shutting down version 4.2 getting in an infinite loop and never persist. So I really need this.

Thanks, Hendrik


answered 11 Nov '13, 03:58

hendrik's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 25 Oct '13, 15:39

Seen: 5,198 times

Last updated: 26 May, 02:43

powered by BitNami OSQA