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. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:285) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170) at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:662) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:612) at com.isdm.rmibeans.RMISubmissionManagerController$$EnhancerByCGLIB$$2f8e0bc6.finalize(<generated>) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)