-->
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.  [ 7 posts ] 
Author Message
 Post subject: DataSource not being loaded when JBoss loads
PostPosted: Thu Dec 23, 2004 12:07 pm 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
Hibernate version: 2.1.7c
Database: MySQL 4.1.7-nt
JBoss Version:4.0.1RC1
Mapping documents: Over 170 mapping documents

Problem: I have to load my sar file after the server starts up. I have read several comments, articles, wiki, and have followed them religiously but same problem. When I tried the same in JBoss 3.2.5 everything works fine but not in 4.0.1RC1. Please do let me know if someone has come against this problem in JBoss 4.

I have read that adding this to my jboss-service.xml should solve the problem and it does in JBoss 3.2.5, but not in JBoss 4.
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 27, 2004 1:47 pm 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
Is anyone working with JBoss 4? Is there something wrong with my configuration or am I suppose to expect this from JBoss 4, because JBoss 3 did not have this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 1:28 am 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
Can someone please help me outl. It is driving me nuts. Anyone?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 8:52 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://www.hibernate.org/ForumMailingli ... AskForHelp


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 9:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
essentially, we have no idea what you are talking about and need more information


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 11:59 am 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
Initially I had Jboss 3.2.5 and hibernate configured properly and had no problems. When I started to use Jboss 4.0.1RC1 I have to wait for the server to start up completely before I can deploy my SAR file. If I have the SAR file in the server and I start Jboss, Jboss complains by giving me the following error:

Code:
09:36:14,765 FATAL [DatasourceConnectionProvider] Could not find datasource: java:/MySqlDS
javax.naming.NameNotFoundException: MySqlDS not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:490)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:498)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:504)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:277)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(Da
tasourceConnectionProvider.java:44)
        at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionPr
ovider(ConnectionProviderFactory.java:83)
        at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.ja
va:76)
        at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1
160)
        at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:794)
        at net.sf.hibernate.jmx.HibernateService.buildSessionFactory(HibernateSe
rvice.java:163)
        at net.sf.hibernate.jmx.HibernateService.start(HibernateService.java:130
)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:908)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:416)
        at org.jboss.system.ServiceController.start(ServiceController.java:438)
        at org.jboss.system.ServiceController.start(ServiceController.java:438)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:944)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:718)
        at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:122)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:131)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
        at $Proxy8.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:305)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:481)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:204)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:277)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:272)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:222)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:891)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:416)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:944)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:718)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:702)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:122)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:131)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175)
        at $Proxy5.deploy(Unknown Source)
        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
        at org.jboss.Main.boot(Main.java:151)
        at org.jboss.Main$1.run(Main.java:405)
        at java.lang.Thread.run(Thread.java:595)
09:36:14,781 INFO  [HibernateServiceMBean] Could not build SessionFactory using
the MBean classpath - will try again using client classpath: Could not find data
source


Some have mentioned that adding the following to my jboss-service.xml would resolve the problem and I did that as well.
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>

I hope someone can shine some light into this problem. Thank you in advance if you can help me out.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 21, 2005 2:59 pm 
Newbie

Joined: Thu Feb 12, 2004 11:59 pm
Posts: 6
I had this same problem upgrading from Jboss 3.2.1 to Jboss 4.0 SP1. I was able to solve it by changing the deployment file. I found this pdf file on the web and followed the examples in Chapter 9 dealing with Hibernate.

http://www.dcs.ex.ac.uk/~pf201/EntrComp/manualJBoss.pdf

It seems the way for deploying hibernate as a service has changed and I had to rewrite the hibernate-service.xml file because of it.

Hope this link helps you as much as it did me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.