Error 500 while uploading a new encounter

In which Wildbook did the issue occur?

What operating system were you using? (eg. MacOS 10.15.3)
Windows 10
What web browser were you using? (eg. Chrome 79)
Chrome 96
What is your role on the site? (admin, researcher, etc)
reviewer
local
researcher
approve
identifier
What happened?
Error while uploading
What did you expect to happen?
Successful submit
What are some steps we could take to reproduce the issue?
When I try to submit a new encounter, I receive the following error.

HTTP Status 500 ? Internal Server Error
Type Exception Report

Message Filtered request failed.

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Filtered request failed.
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:384)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.ecocean.servlet.StrutsUTF8Filter.doFilter(StrutsUTF8Filter.java:33)
Root Cause

org.datanucleus.exceptions.NucleusUserException: Object with id "1" is managed by a different persistence manager
	org.datanucleus.ExecutionContextImpl.findObjectProvider(ExecutionContextImpl.java:1281)
	org.datanucleus.ExecutionContextThreadedImpl.findObjectProvider(ExecutionContextThreadedImpl.java:133)
	org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObjectAsValue(PersistableMapping.java:411)
	org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObject(PersistableMapping.java:323)
	org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:191)
	org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1460)
	org.datanucleus.state.StateManagerImpl.providedObjectField(StateManagerImpl.java:120)
	org.ecocean.media.MediaAsset.dnProvideField(MediaAsset.java)
	org.ecocean.media.MediaAsset.dnProvideFields(MediaAsset.java)
	org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)
	org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:292)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObjectInTable(RDBMSPersistenceHandler.java:162)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:138)
	org.datanucleus.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3363)
	org.datanucleus.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3339)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2171)
	org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObjectAsValue(PersistableMapping.java:569)
	org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObject(PersistableMapping.java:323)
	org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:204)
	org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1460)
	org.datanucleus.state.StateManagerImpl.providedObjectField(StateManagerImpl.java:120)
	org.ecocean.media.Feature.dnProvideField(Feature.java)
	org.ecocean.media.Feature.dnProvideFields(Feature.java)
	org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)
	org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:485)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObjectInTable(RDBMSPersistenceHandler.java:162)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:138)
	org.datanucleus.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3363)
	org.datanucleus.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3339)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2176)
	org.datanucleus.store.types.SCOUtils.validateObjectForWriting(SCOUtils.java:1486)
	org.datanucleus.store.rdbms.scostore.ElementContainerStore.validateElementForWriting(ElementContainerStore.java:387)
	org.datanucleus.store.rdbms.scostore.JoinListStore.internalAdd(JoinListStore.java:197)
	org.datanucleus.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:137)
	org.datanucleus.store.rdbms.mapping.java.CollectionMapping.postInsert(CollectionMapping.java:157)
	org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:522)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObjectInTable(RDBMSPersistenceHandler.java:162)
	org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:138)
	org.datanucleus.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3363)
	org.datanucleus.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3339)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
	org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2176)
	org.datanucleus.store.types.SCOUtils.validateObjectForWriting(SCOUtils.java:1486)
	org.datanucleus.store.rdbms.scostore.ElementContainerStore.validateElementForWriting(ElementContainerStore.java:387)
	org.datanucleus.store.rdbms.scostore.JoinListStore.internalAdd(JoinListStore.java:197)
	org.datanucleus.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:137)
	org.datanucleus.store.types.wrappers.backed.ArrayList.initialise(ArrayList.java:151)
	org.datanucleus.store.types.wrappers.backed.ArrayList.initialise(ArrayList.java:66)
	org.datanucleus.store.types.SCOUtils.wrapAndReplaceSCOField(SCOUtils.java:176)
	org.datanucleus.state.StateManagerImpl.setObjectField(StateManagerImpl.java:1804)
	org.ecocean.Encounter.dnSetannotations(Encounter.java)
	org.ecocean.Encounter.setAnnotations(Encounter.java:2811)
	org.ecocean.servlet.EncounterForm.doPost(EncounterForm.java:688)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.ecocean.servlet.StrutsUTF8Filter.doFilter(StrutsUTF8Filter.java:33)
Note The full stack trace of the root cause is available in the server logs.

If this is a bulk import report, send the spreadsheet to services@wildme.org with the email subject line matching your bug report

Hi @pourmirzai

We restarted the server to resolve the issue. Data submission is restored. Can you please confirm it works for you?

Thanks,
Jason

Dear Jason
Today it worked and we submitted a few encounters but we got same error again now.

Hi @pourmirzai

The server has been restarted. I apologize that we did not see this update sooner. I will try to monitor for any post here from you more often as I know you are doing a lot of work now.

Thanks,
Jason

1 Like

Tracking the issue overall as WB-1899.

Hi @pourmirzai

This issue has been resolved with our completion of ticket WB-1899.

Thanks,
Jason