I am working on a webapp where I am instantiating a session-scoped bean that connects to RMI. I am injecting this bean into many of my service objects so that they can make function calls without worrying about the connection (I am forced to use the company's method of connecting to RMI for the time being, so I can't use the Spring module). It appeared to work at first, however, I keep getting this error in my log from time to time:
Note that RMISubmissionManagerController is the session-scoped bean that I'm instantiating. Apparently, it's finalize method is causing this error. I was under the impression that when an IllegalStateException occurs, there was an error description that gave more detail into what caused it, but this error doesn't have that. Any idea what could be causing it? How can I avoid this error? Thanks.
INFO: Illegal access: this web application instance has been stopped already. Could not load org.springframework.beans.factory.support.AbstractBeanFactory$2. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)