Hi!
Background:
I have embedded OpenEJB 3.1 in a web application which uses Spring
and runs in Tomcat 6. No OpenEJB stuff has been installed in Tomcat,
so Spring is "in charge" of the OpenEJB instance. I also enable remote
access of EJBs deployed in the application.
Everything works very well until I shut down the server or try to
redeploy the application, then I get the following exceptions which
repeats endlessly:
INFO - Undeploying app: classpath.ear
java.util.concurrent.ExecutionException:
java.lang.NullPointerException
    at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
    at
java.util.concurrent.FutureTask.get(FutureTask.java:80)
    at
org.apache.openejb.util.Memoizer.compute(Memoizer.java:53)
    at
org.apache.openejb.util.Logger.getInstance(Logger.java:141)
    at
org.apache.openejb.util.Logger.getInstance(Logger.java:164)
    at
org.apache.openejb.core.transaction.SimpleWorkManager.(SimpleWorkManager.java:49)
    at sun.misc.Unsafe.ensureClassInitialized(Native
Method)
    at
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    at
java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
    at
java.lang.reflect.Field.getFieldAccessor(Field.java:898)
    at java.lang.reflect.Field.get(Field.java:357)
    at
org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1641)
    at
org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1524)
    at
org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
    at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4557)
    at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
    at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
    at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
    at
org.apache.catalina.core.StandardService.stop(StandardService.java:584)
    at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at
org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
    at
org.apache.catalina.startup.Catalina.start(Catalina.java:603)
    at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at
java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
    at
org.apache.openejb.util.Memoizer$1.call(Memoizer.java:42)
    at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at
java.util.concurrent.FutureTask.run(FutureTask.java:123)
    at
org.apache.openejb.util.Memoizer.compute(Memoizer.java:49)
    ... 26 more
I have tried to add the following code, in order to clean up at time
of shut down, but to no avail:
        Assembler theAssembler =
           
SystemInstance.get().getComponent(Assembler.class);
        for (AppInfo theAppInfo :
theAssembler.getDeployedApplications())
        {
           
try
            {
               
theAssembler.destroyApplication(theAppInfo.jarPath);
            }
catch (final Exception theException)
            {
               
/* Shutting down, so ignore exceptions. */
            }
        }
        OpenEJB.destroy();
I have tried to set the openejb.deployments.classpath.ear flag both
to true and to false, also to no avail.
Does anyone have any idea on how to remedy this?
Many thanks in advance!

Reply via email to