bug #7699
openNPE in CdmTransientEntityCacher.getCacheElement()
Added by Katja Luther over 5 years ago. Updated 10 months ago.
10%
Description
NPE when searching for specimen (but probably not only then).
#9174 (duplicate) suggests that it happens when the TaxEditor wasn't used longer time.
#note-21 suggests it explicitly happens for bulk editors when closed during an (asynchronous) specimen search. However, it is unlikely that this is the only reason (if at all) as it happens also in other contexts and as the last sentence in #note-21 mentions it leads to a situation where TaxEditor needs to be restarted or at least reconnected, so it is not only the problem of a single session/bulk editor.
login : editor version : 5.3.0.201808280657 server : () schema version : os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_121 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/occurrence.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy96.findByTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findOccurrences(SearchManager.java:158) at eu.etaxonomy.taxeditor.store.SearchManager.findOccurrences(SearchManager.java:115) at eu.etaxonomy.taxeditor.bulkeditor.input.OccurrenceEditorInput.listEntities(OccurrenceEditorInput.java:70) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:219) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:254) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:259) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.put(CdmTransientEntityCacher.java:235) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:273) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:298) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:87) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:189) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:160) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:72) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:132) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:77) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:131) at eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor.doExecuteRequest(CdmServiceRequestExecutor.java:75) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:138) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:194) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:176) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) ... 9 more
Related issues
Updated by Patrick Plitzner over 5 years ago
- Status changed from New to Feedback
- Assignee changed from Patrick Plitzner to Andreas Müller
I cannot reproduce this. On which DB did you test? Does it always happen for any search on any DB?
Updated by Andreas Müller over 5 years ago
On rem_conf_am (see stacktrace) and search for "A*"
Updated by Andreas Müller over 5 years ago
- Assignee changed from Andreas Müller to Patrick Plitzner
Updated by Patrick Plitzner over 5 years ago
- Assignee changed from Patrick Plitzner to Katja Luther
Andreas Müller wrote:
On rem_conf_am (see stacktrace) and search for "A*"
I cannot reproduce this here either
Updated by Andreas Müller over 5 years ago
It still exists sometimes
login : editor version : 5.3.0.201809042248 server : () schema version : os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_121 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/reference.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy58.findByTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findReferences(SearchManager.java:89) at eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput.listEntities(ReferenceEditorInput.java:102) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:219) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:254) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:259) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.put(CdmTransientEntityCacher.java:235) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:268) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:293) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:184) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:155) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:69) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:131) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:70) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:131) at eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor.doExecuteRequest(CdmServiceRequestExecutor.java:75) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:138) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:194) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:176) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) ... 8 more
my idea was that it happens if you start search while the views still refresh and tried to reproduce
login : editor version : 5.3.0.201809042248 server : () schema version : os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_121 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/reference.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy58.findByTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findReferences(SearchManager.java:89) at eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput.listEntities(ReferenceEditorInput.java:102) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:219) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException
This was reproducable after it happended once, even in other bulk editors. Only restarting the TaxEditor solved the issue. After restart also the first error could not be reproduced. So it seems to happen only in a certain state of the TaxEditor
However, even if difficult to reproduce we should think about handling the NPE case. What if getCache() returns null. Should we create a new cache and merge all existing data into it?
Also we should have a look why the cache can be null. Something wrong with dispose handling in special cases. Maybe a "disposed" flag can help to find the reason. Once the cacher is disposed the flag should be set to true. Calling getCache() on disposed Cacher then throws a specific Exception saying that this is not allowed.
Or do we reuse Cachers after dispose was called?
Updated by Andreas Müller over 5 years ago
Added AK as this is maybe a general ticket about handling of disposed in CdmTransientEntityCacher so might be interesting for him too.
Updated by Katja Luther over 5 years ago
- Target version changed from Release 5.3 to Release 5.4
Updated by Andreas Kohlbecker over 5 years ago
I also had it today in the Users Bulkeditor:
login : editor version : 5.4.0.201810151448 server : () schema version : os : Linux 4.15.0-34-generic amd64 java : 1.8.0_131 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://160.45.63.231:80/cdmserver/phycobank_01/remoting-public/user.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy25.listByUsername(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findUsers(SearchManager.java:166) at eu.etaxonomy.taxeditor.bulkeditor.input.UserEditorInput.listEntities(UserEditorInput.java:79) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:273) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:288) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:293) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.put(CdmTransientEntityCacher.java:261) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:268) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:293) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:184) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:155) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:67) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:157) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:70) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:131) at eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor.doExecuteRequest(CdmServiceRequestExecutor.java:75) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:138) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:194) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:176) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) ... 8 more
Updated by Andreas Müller over 5 years ago
- Target version changed from Release 5.4 to Release 5.5
As this does not seem to be solved yet I move it to the next version.
Updated by Katja Luther about 5 years ago
the cache is disposed if the cdmEntitySession is closed, for the bulkeditor this is the case when the editor is saved or closed. But I could not reproduce this exception whether for closing nor for saving and searching in parallel
Updated by Katja Luther about 5 years ago
- Target version changed from Release 5.5 to Release 5.6
Updated by Andreas Müller about 5 years ago
- Target version changed from Release 5.6 to Reviewed Next Major Release
Updated by Andreas Müller over 4 years ago
- Related to bug #8626: NullPointerException (NPE) on saving Specimen Editor (list) added
Updated by Katja Luther over 4 years ago
- Related to deleted (bug #8626: NullPointerException (NPE) on saving Specimen Editor (list))
Updated by Katja Luther over 4 years ago
- Has duplicate bug #8626: NullPointerException (NPE) on saving Specimen Editor (list) added
Updated by Andreas Müller about 4 years ago
- Status changed from Feedback to New
- Target version changed from Reviewed Next Major Release to Release 5.13
This exception appears quite often therefore I put it to the current milestone.
We need to find to handle it so that reopening the TaxEditor is not necessary anymore. And ofcourse it would be good to find out why it happens at all.
Updated by Andreas Kohlbecker about 4 years ago
- Tags set to RemoteAccessException
Updated by Andreas Kohlbecker about 4 years ago
- Description updated (diff)
Another report of the same issue:
Hallo, der bulk editor ist nicht zugänglich, das ist die Fehlermeldung, die kommt. viele Grüße Nadja last remote method : http://api.cybertaxonomy.org:80/caryophyllales_spp/remoting/reference.service last remote request client time : 2020-02-19T15:46:47.448 last remote request response header time : Wed, 19 Feb 2020 15:46:47 GMT client error time : 2020-02-19T15:46:47.507 login : editor version : 5.12.0 server : () schema version : os : Windows 7 6.1 amd64 java : 1.8.0_20 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://api.cybertaxonomy.org:80/caryophyllales_spp/remoting/reference.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy91.findByTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findReferences(SearchManager.java:97) at eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput.listEntities(ReferenceEditorInput.java:128) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:280) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput$$Lambda$77/494966836.run(Unknown Source) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:288) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:293) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.put(CdmTransientEntityCacher.java:261) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:268) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:293) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:184) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:155) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:69) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:157) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:70) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:131) at eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor.doExecuteRequest(CdmServiceRequestExecutor.java:82) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:138) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:194) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:176) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) ... 9 more
Updated by Andreas Kohlbecker about 4 years ago
- Tags deleted (
RemoteAccessException)
Updated by Andreas Kohlbecker about 4 years ago
As far as I am understanding this problem it is the bulk editors which can be saved or closed while a search process is still running in a subthread. These sub threads are started in AbstractBulkEditorInput.performSearch(BulkEditorQuery bulkEditorQuery, IStructuredSelection selection)
In case of saving or even closing the editor the following code is execued:
public void save(IProgressMonitor monitor, boolean resetMerge) {
...
input.dispose(); // calls internally cdmTransientEntityCacher.dispose();
input.bind();
...
if (lastQuery != null){
// NOTE AK: what if a search is already in progress here?
bulkEditorComposite.performSearch(lastQuery, selection);
}
}
@PreDestroy
public void dispose() {
...
if(input!=null){
input.dispose(); // calls internally cdmTransientEntityCacher.dispose();
}
...
}
The CachingHttpInvokerProxyFactoryBean
(formerly CdmServiceRequestExecutor
as shown in the stack traces here) will load the retuned entities into the cache by calling in principle
CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().load()
which internally uses
tlActiveSession.get().load(obj, update);
since tlActiveSession
is an InheritableThreadLocal
object the CdmEntitySession
of the parent thread, that is of the bulkeditor thread is being accessed. The session could be disposed at this time, which means that cdmTransientEntityCacher.dispose();
has been executed and CdmTransientEntityCacher.getCache()
will return null
. This can happen either after a call to the BulkEditorE4.dispose()
method or during BulkEditorE4.save()
while being in the middle of dispose()
and bind()
.
A solution to this problem would be to kill the search thread being in progress. This would require calling job.getThread().stop()
since job.cancel()
seems to wait for the job to gracefully shut down, which is not what we want in this case.
BTW: I also stumbled over these lines of code in .AbstractBulkEditorInput.performSearch(BulkEditorQuery bulkEditorQuery, IStructuredSelection selection)
:
public void performSearch(final BulkEditorQuery bulkEditorQuery, IStructuredSelection selection) {
//cancel previous search job
if(searchJob!=null && searchJob.getState()!=Job.NONE){
searchJob.cancel();
searchJob = null;
/*
* wait for a little while for the job to finish
* to avoid asynchronously loaded results of the
* previous search being shown in the next search
* (not critical but explicitly waiting for the job to finish
* could run into an endless loop by mistake)
*/
try {
Thread.sleep(500);
} catch (InterruptedException e) {
}
}
This seems not to be right since sleeping for half a second is not always enough. Think about massive searches or low data rate connections! I t would be better to kill the thread as suggested above.
However, there is one point which does not yet fit into this picture. After this phenomenon has appeared it is needed to restart the editor. It should be sufficient to just close the bulkeditor to heal the situation.
Updated by Katja Luther about 4 years ago
- Target version changed from Release 5.13 to Release 5.14
Updated by Andreas Kohlbecker about 4 years ago
- Has duplicate bug #8923: NullPointerException (NPE) after attempt to save invalid Group name added
Updated by Andreas Müller about 4 years ago
- Target version changed from Release 5.14 to Release 5.15
Updated by Katja Luther almost 4 years ago
- Target version changed from Release 5.15 to Release 5.18
Updated by Andreas Müller over 3 years ago
- Related to bug #9174: After longer inactivity NPE for cache added
Updated by Katja Luther over 3 years ago
- Target version changed from Release 5.18 to Release 5.19
Updated by Katja Luther over 3 years ago
Andreas Kohlbecker wrote:
As far as I am understanding this problem it is the bulk editors which can be saves or closed while a search process is still running in a subthread. These sub threads are started in
AbstractBulkEditorInput.performSearch(BulkEditorQuery bulkEditorQuery, IStructuredSelection selection)
In case of saving or even closing the editor the following code is execued:
since
tlActiveSession
is anInheritableThreadLocal
object theCdmEntitySession
of the parent thread, that is of the bulkeditor thread is being accessed. The session could be disposed at this time, which means thatcdmTransientEntityCacher.dispose();
has been executed andCdmTransientEntityCacher.getCache()
will returnnull
. This can happen either after a call to theBulkEditorE4.dispose()
method or duringBulkEditorE4.save()
while being in the middle ofdispose()
andbind()
.A solution to this problem would be to kill the search thread being in progress. This would require calling
job.getThread().stop()
sincejob.cancel()
seems to wait for the job to gracefully shut down, which is not what we want in this case.BTW: I also stumbled over these lines of code in
.AbstractBulkEditorInput.performSearch(BulkEditorQuery bulkEditorQuery, IStructuredSelection selection)
:
I did some more research and thread.stop() is deprecated and should not be used anymore, therefore I would add the following code to be sure that the thread is closed.
boolean isCanceled = searchJob.cancel();
if (!isCanceled){
while (!isCanceled){
try {
Thread.sleep(200);
} catch (InterruptedException e) {
}
isCanceled = searchJob.cancel();
}
}
searchJob = null;
Updated by Andreas Kohlbecker over 3 years ago
This way is would be more concise:
boolean isCanceled = false;
while (true){
try {
Thread.sleep(200);
} catch (InterruptedException e) {
}
isCanceled = searchJob.cancel();
if(isCanceled){
break;
}
}
// do something with isCanceled ....
Updated by Katja Luther over 3 years ago
There was the same issue while working with character matrix:
mail NK:
hm, es scheint aber doch noch ein Problem zu geben: Ich gebe heute seit einer Weile die Daten aus dem letzten Kurs in die aktuelle Matrix ein, habe eigentlich auch öfter gespeichert, aber dann geht der TaxEditor in den (Keine Rückmeldung)-Modus und scheint auch nicht mehr herauszukommen. Das klingt so wie bei Max, nur dass ich bloß den Editor zwangsschließen und neu laden muss, nicht den ganzen Rechner.
stacktrace in log file:
[http://160.45.63.231:80/cdmserver/greece_bupleurum_01_with_onthology/remoting/media.service]; nested exception is java.lang.NullPointerException at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy61.load(Unknown Source) at eu.etaxonomy.taxeditor.view.search.facet.term.TermSearchResultComposite$2.run(TermSearchResultComposite.java:122) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.NullPointerException at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:266) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:270) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:293) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:248) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:62) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:165) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:65) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:119) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:100) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:81) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150) ... 5 more
The exception comes from TermSearchResultComposite not CharacterMatrix.
Updated by Andreas Müller about 3 years ago
- Target version changed from Release 5.19 to Release 5.21
Updated by Andreas Müller about 3 years ago
- Target version changed from Release 5.21 to Release 5.22
Updated by Katja Luther about 3 years ago
- Target version changed from Release 5.22 to Release 5.46
Updated by Andreas Müller almost 3 years ago
- Severity changed from normal to major
As this problem (see also duplicates) appears again and again from time to time I increase severity.
Updated by Andreas Müller over 1 year ago
- Related to deleted (bug #9174: After longer inactivity NPE for cache)
Updated by Andreas Müller over 1 year ago
- Has duplicate bug #9174: After longer inactivity NPE for cache added
Updated by Andreas Müller over 1 year ago
- Subject changed from NPE when searching for specimen in bulk editor to NPE in CdmTransientEntityCacher.getCacheElement()
Updated by Andreas Müller over 1 year ago
- Description updated (diff)
- Status changed from New to In Progress
- Target version changed from Release 5.46 to Release 5.35
Updated by Andreas Müller over 1 year ago
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller over 1 year ago
- Related to bug #10186: Problems with session handling in taxeditor added
Updated by Andreas Müller over 1 year ago
- Target version changed from Release 5.35 to Release 5.44
Now an explicit error is thrown with message "No cache available for cacheId = xxx" and some debug information.
For now, we have to wait until the problem occurs again and that we get some more debug information. Therefore moving to next milestone.
Close it if it does not appear after >6 month anymore
Updated by Andreas Müller about 1 year ago
- Related to bug #10252: Session handling in name bulk editor not correct added
Updated by Andreas Müller about 1 year ago
AM 2023-01-27:
Cache Status, lange offen, aber kurz vorher genutzt, kurz vorher alle Fenster geschlossen und RefBulk versucht neu zu öffnen
last remote service : https://api.cybertaxonomy.org:443/euromed/remoting/reference.service last remote method : getDbSchemaVersion last remote request client time : 2023-01-27T22:29:49.217 last remote request response header time : Fri, 27 Jan 2023 21:29:49 GMT client error time : 2023-01-27T22:29:49.379 login : admin editor version : 5.35.0 server : api.cybertaxonomy.org (cybertaxonomy.org) / euromed schema version : 5.35.1.0.20221218 os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_131 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://api.cybertaxonomy.org:443/euromed/remoting/reference.service]; nested exception is java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput1273327527. See #7699. Available caches are: [Ljava.lang.String;@23088af7 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy90.findByTitleAndAbbrevTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findReferences(SearchManager.java:96) at eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput.listEntities(ReferenceEditorInput.java:171) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:304) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput1273327527. See #7699. Available caches are: [Ljava.lang.String;@23088af7 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCache(CdmTransientEntityCacher.java:153) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:282) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:286) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.putToCache(CdmTransientEntityCacher.java:250) at eu.etaxonomy.cdm.cache.CacheLoader.putToCache(CacheLoader.java:295) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:322) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveAny(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveCollection(CacheLoader.java:191) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:158) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:67) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:181) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:66) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:119) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:114) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:88) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150) ... 8 more
Updated by Andreas Müller about 1 year ago
AM 2023-01-28:
Schon wieder, nach Nacht, NameBulkeditor war noch offen, neue Anfrage
last remote service : https://api.cybertaxonomy.org:443/euromed/remoting/agent.service last remote method : getDbSchemaVersion last remote request client time : 2023-01-28T09:08:46.152 last remote request response header time : Sat, 28 Jan 2023 08:08:46 GMT client error time : 2023-01-28T09:08:46.333 login : admin editor version : 5.35.0 server : api.cybertaxonomy.org (cybertaxonomy.org) / euromed schema version : 5.35.1.0.20221218 os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_131 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://api.cybertaxonomy.org:443/euromed/remoting/agent.service]; nested exception is java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.bulkeditor.input.NameEditorInput2097525231. See #7699. Available caches are: [Ljava.lang.String;@5906dc01 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy95.findByTitleAndAbbrevTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findAgents(SearchManager.java:101) at eu.etaxonomy.taxeditor.store.SearchManager.findTeamOrPersons(SearchManager.java:109) at eu.etaxonomy.taxeditor.bulkeditor.input.AgentEditorInput.listEntities(AgentEditorInput.java:186) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:304) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.bulkeditor.input.NameEditorInput2097525231. See #7699. Available caches are: [Ljava.lang.String;@5906dc01 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCache(CdmTransientEntityCacher.java:153) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:282) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:286) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.putToCache(CdmTransientEntityCacher.java:250) at eu.etaxonomy.cdm.cache.CacheLoader.putToCache(CacheLoader.java:295) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:322) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveAny(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveCollection(CacheLoader.java:191) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:158) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:67) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:181) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:66) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:119) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:114) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:88) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150) ... 9 more
Updated by Andreas Müller about 1 year ago
Very interesting is observation in #10252 which seems to be related.
Updated by Andreas Müller 10 months ago
… dann nochmal in E+M nachdem der Editor einige Tage offen war mit Taxa aber auch TermTrees:
last remote service : https://api.cybertaxonomy.org:443/euromed/remoting/reference.service last remote method : getDbSchemaVersion last remote request client time : 2023-07-03T18:05:35.22 last remote request response header time : Mon, 03 Jul 2023 16:05:35 GMT client error time : 2023-07-03T18:05:35.495 login : admin editor version : 5.39.0 server : api.cybertaxonomy.org (cybertaxonomy.org) / euromed schema version : 5.38.0.0.20230510 os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_131 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://api.cybertaxonomy.org:443/euromed/remoting/reference.service]; nested exception is java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.termtree.e4.TermTreeEditor730884922. See #7699. Available caches are: [Ljava.lang.String;@53032437 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy108.findByTitleAndAbbrevTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findReferences(SearchManager.java:96) at eu.etaxonomy.taxeditor.bulkeditor.input.ReferenceEditorInput.listEntities(ReferenceEditorInput.java:171) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:304) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.termtree.e4.TermTreeEditor730884922. See #7699. Available caches are: [Ljava.lang.String;@53032437 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCache(CdmTransientEntityCacher.java:153) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:282) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:286) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.putToCache(CdmTransientEntityCacher.java:250) at eu.etaxonomy.cdm.cache.CacheLoader.putToCache(CacheLoader.java:295) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:322) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveAny(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveCollection(CacheLoader.java:191) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:158) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:67) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:181) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:66) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:119) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:114) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:88) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150) ... 8 more
Von: Müller, Andreas A.Mueller@bo.berlin
Gesendet: Freitag, 16. Juni 2023 15:59
An: Müller, Andreas A.Mueller@bo.berlin
Betreff: AW: STATUS_SHUTDOWN
Beim Bearbeiten von Termbildern
last remote service : https://api.cybertaxonomy.org:443/cdmterms/remoting/media.service last remote method : getDbSchemaVersion last remote request client time : 2023-06-16T15:53:13.475 last remote request response header time : Fri, 16 Jun 2023 13:53:13 GMT client error time : 2023-06-16T15:53:13.59 login : admin editor version : 5.39.0 server : api.cybertaxonomy.org (cybertaxonomy.org) / cdmterms schema version : 5.38.0.0.20230510 os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_131 org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://api.cybertaxonomy.org:443/cdmterms/remoting/media.service]; nested exception is java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.termtree.e4.TermTreeEditor1626789513. See #7699. Available caches are: [Ljava.lang.String;@6bac9b41 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy79.findByTitle(Unknown Source) at eu.etaxonomy.taxeditor.store.SearchManager.findMedia(SearchManager.java:215) at eu.etaxonomy.taxeditor.bulkeditor.input.MediaEditorInput.listEntities(MediaEditorInput.java:104) at eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput.lambda$0(AbstractBulkEditorInput.java:304) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:186) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.RuntimeException: No cache available for cacheId = eu.etaxonomy.taxeditor.termtree.e4.TermTreeEditor1626789513. See #7699. Available caches are: [Ljava.lang.String;@6bac9b41 CacheManager status is: STATUS_ALIVE Cache status is:STATUS_SHUTDOWN at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCache(CdmTransientEntityCacher.java:153) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getCacheElement(CdmTransientEntityCacher.java:282) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.getFromCache(CdmTransientEntityCacher.java:286) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.putToCache(CdmTransientEntityCacher.java:250) at eu.etaxonomy.cdm.cache.CacheLoader.putToCache(CacheLoader.java:295) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursive(CacheLoader.java:322) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveAny(CacheLoader.java:84) at eu.etaxonomy.cdm.cache.CacheLoader.loadRecursiveCollection(CacheLoader.java:191) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:158) at eu.etaxonomy.cdm.cache.CacheLoader.load(CacheLoader.java:69) at eu.etaxonomy.cdm.cache.CdmTransientEntityCacher.load(CdmTransientEntityCacher.java:181) at eu.etaxonomy.taxeditor.session.CdmEntitySession.load(CdmEntitySession.java:66) at eu.etaxonomy.taxeditor.session.CdmEntitySessionManager.load(CdmEntitySessionManager.java:119) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.handleGeneralRequest(CachingHttpInvokerProxyFactoryBean.java:114) at org.springframework.remoting.httpinvoker.CachingHttpInvokerProxyFactoryBean.executeRequest(CachingHttpInvokerProxyFactoryBean.java:88) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150) ... 8 more