-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Jndi name error? HibernateFactory not bound.
PostPosted: Thu Sep 15, 2005 3:09 am 
Newbie

Joined: Tue Sep 06, 2005 4:12 am
Posts: 16
Hi all,

I get error "javax.naming.NameNotFoundException: HibernateFactory not bound" when run to this statement:
Code:
   Properties env = new Properties();
   env.put(Context.INITIAL_CONTEXT_FACTORY,
         "org.jnp.interfaces.NamingContextFactory");
   env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
   InitialContext ctx = new InitialContext(env);
   SessionFactory sessionFactory = (SessionFactory)ctx.lookup("java:HibernateFactory");

But when I deploy jboss-service.xml, JBoss console gave me feedback:
Code:
...
12:59:44,351 INFO  [SessionFactoryImpl] building session factory
12:59:44,351 WARN  [Configurator] No configuration found. Configuring ehcache fr
om ehcache-failsafe.xml found in the classpath: jar:file:/C:/jboss-4.0.2/server/
default/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
12:59:44,382 INFO  [SessionFactoryObjectFactory] Factory name: java:HibernateFac
tory
12:59:44,382 INFO  [NamingHelper] JNDI InitialContext properties:{}
12:59:44,382 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: jav
a:HibernateFactory
12:59:44,382 WARN  [SessionFactoryObjectFactory] InitialContext did not implemen
t EventContext
12:59:44,382 INFO  [NamingHelper] JNDI InitialContext properties:{}
12:59:44,398 INFO  [SessionFactoryImpl] Checking 0 named queries

It seems for me that the service is started already.

I tried it in a two tier environment only. That means I just lookup the context outside the EJB Container. Isn't it wrong operation?

Thank you very much.

--
Best regards,
Diviner.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 15, 2005 9:29 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Ok, that's the same post.

I think they have a rule against re-posting.

It's not fair to the others.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 2:33 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
There is no discrepency between the Exception and the logs. "InitialContext did not implement EventContext" means there were problems ... http://www.jsourcery.com/output/sourcef ... ource.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.