[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - InitialContext did not implement EventContext

HamdurRahman do-not-reply at jboss.com
Wed Dec 17 00:14:20 EST 2008

I am using ejb 3.0 and Jboss and during the deployment of my application(i.e. during server startup), I am regularly getting warning 
"InitialContext did not implement EventContext" from SessionFactoryObjectFactory class. 
I went in the source code of hibernate, there in the class I found this: 
try { 
Context ctx = NamingHelper.getInitialContext(properties); 
NamingHelper.bind(ctx, name, instance); 
log.info("Bound factory to JNDI name: " + name); 
( (EventContext) ctx ).addNamingListener(name, EventContext.OBJECT_SCOPE, LISTENER); 
catch (InvalidNameException ine) { 
log.error("Invalid JNDI name: " + name, ine); 
catch (NamingException ne) { 
log.warn("Could not bind factory to JNDI", ne); 
catch(ClassCastException cce) { 
log.warn("InitialContext did not implement EventContext"); 

I cannot understand why the context is cast to Event Context. 
One more thing, Seeing the log what I found that this warning is not only comming on server startup but also in between. 
Can anybody suggest changes I have to make in my application. 

Thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197027#4197027

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197027

More information about the jboss-user mailing list