[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Configuring dependencies in Services

Marcelo.S_ do-not-reply at jboss.com
Fri Jul 4 09:31:40 EDT 2008


Oddly enough, when I try to deploy my App.war (was trying without the "looking up" before) it loads before hibernate-service.jar and does not work since it cannot find the service:
10:10:22,468 INFO  [Catalina] Server startup in 87 ms
  | 10:10:22,625 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-w
  | eb.deployer/ROOT.war/
  | 10:10:23,625 INFO  [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
  | http-invoker.sar/invoker.war/
  | 10:10:23,828 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/
  | jbossws.sar/jbossws-context.war/
  | 10:10:24,515 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../
  | deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
  | 10:10:27,609 INFO  [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
  | loy/management/console-mgr.sar/web-console.war/
  | 
  | ...
  | 
  | 10:10:36,375 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
  | oss.jca:service=DataSourceBinding,name=hibernate-ds' to JNDI name 'java:hibernate-ds'
  | 
  | ...
  | 
  | 10:13:15,000 INFO  [TomcatDeployer] deploy, ctxPath=/App, warUrl=.../deploy/App.war/
  | 10:13:18,750 ERROR [HibernateUtil] Erro inicializando SessionFactory
  | javax.naming.NameNotFoundException: hibernate not bound
  |         at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
  |         at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
  |         at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
  |         at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
  |         at javax.naming.InitialContext.lookup(InitialContext.java:392)
  |         at dao.hibernate.HibernateUtil.<clinit>(HibernateUtil.jav
  | a:31)
  | 
  | ... // Lots of exceptions since App cannot load data
  |     // Don't know why, but in this case hibernate-service.jar will not load
  | 
  | 
  | 

In my HibernateUtils.java I have:


  |     static {
  |         try {
  |             Context ctx = new InitialContext();
  |             sessionFactory = (SessionFactory) ctx.lookup("java:/hibernate/HibernateFactory");
  | 
  |         } catch (Throwable ex) {
  |         	log.error("Erro inicializando SessionFactory", ex);
  |             throw new ExceptionInInitializerError(ex);
  |         }
  |     }
  | 

That means, I cannot have hibernate-service.sar since it will fail to load because of the datasource; and cannot have hibernate-service.jar because the application will load first. Guess I'm back to the place I started!

So, any hints of how to make this dependencies in the jboss-service.xml work?

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

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



More information about the jboss-user mailing list