This happens only with static EAR.
Lookup is using JBoss context classloader instead of Nuxeo context cl.
Logged issue is:
15:02:28,984 WARN [JBossManagedConnectionPool] Unable to fill pool
org.nuxeo.ecm.core.storage.StorageException: Unable to find EventProducer
at org.nuxeo.ecm.core.storage.sql.SessionImpl.<init>(SessionImpl.java:109)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.newSession(RepositoryImpl.java:346)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.getConnection(RepositoryImpl.java:336)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.getConnection(ManagedConnectionFactoryImpl.java:297)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:105)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:541)
at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
at java.lang.Thread.run(Thread.java:680)
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + BaseClassLoader@132d9844
]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.nuxeo.runtime.api.JndiServiceLocator.lookup(JndiServiceLocator.java:60)
at org.nuxeo.runtime.api.JBossServiceLocator.lookup(JBossServiceLocator.java:68)
at org.nuxeo.runtime.api.ServiceHost.lookup(ServiceHost.java:173)
at org.nuxeo.runtime.api.ServiceManager.getService(ServiceManager.java:114)
at org.nuxeo.runtime.api.Framework.getService(Framework.java:149)
at org.nuxeo.ecm.core.storage.sql.SessionImpl.<init>(SessionImpl.java:107)
... 9 more
Caused by: java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + BaseClassLoader@132d9844
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:410)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:161)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.nuxeo.ecm.core.event.ejb.EventProducerLocal from BaseClassLoader@132d9844{VFSClassLoaderPolicy@1667a232{name
...
<IMPORT-ALL>NON_EMPTY}}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:406)
... 24 more