-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate, JBoss, JDBC, deploy causes error
PostPosted: Wed Aug 18, 2004 1:30 pm 
Newbie

Joined: Wed Aug 18, 2004 1:14 pm
Posts: 3
Hibernate version:
The newest

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
SQL Server

Debug level Hibernate log excerpt:


Hello

Does anyone have any idea why I am getting an error when I hotdeploy to JBoss 3.2.3. This has not happened before. I start JBoss and no error. Then I hotdeploy application to JBoss and then, while hotdeployment goes on, Hibernate tries to create a new connection. And then comes an error through JBoss pool management that says 'could not get connection'. Now because of that, application don't work. I use jTDS driver v0.9. And problem comes with and without cursor mode. I tried with MS SQL Server JDBC Driver also (in cursor mode), but the error comes with that too. If I just start JBoss without hotdeployment, then the error does not come.


Top
 Profile  
 
 Post subject: Trace and believes
PostPosted: Thu Aug 19, 2004 1:08 pm 
Newbie

Joined: Wed Aug 18, 2004 1:14 pm
Posts: 3
Here is stack trace: LocalManagedConnectionFactory.createManagedConnection crashes at line 160.

We believe that the problem is in hotdeployment: JBoss does not manage to undeploy the application and connections and that is why hotdeployment fails when Hibernate asks for a connection from JBoss connection manager. I use jTDS driver, but problems occur with MS JDBC Driver too.

09:15:50,995 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.lang.RuntimeException: No message resource found for message property prop.servertype)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:160)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:477)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:213)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:122)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)


Top
 Profile  
 
 Post subject: Re: Trace and believes
PostPosted: Thu Aug 19, 2004 2:18 pm 
Beginner
Beginner

Joined: Mon Aug 16, 2004 6:09 am
Posts: 46
Location: Geneva, Switzerland
forhead wrote:
Here is stack trace: LocalManagedConnectionFactory.createManagedConnection crashes at line 160.

We believe that the problem is in hotdeployment: JBoss does not manage to undeploy the application and connections and that is why hotdeployment fails when Hibernate asks for a connection from JBoss connection manager. I use jTDS driver, but problems occur with MS JDBC Driver too.



This is neither a hibernate error nor jboss. Exception happens when jboss tries to create connection to DMBS using jdbc driver's connect().

nested throwable: (java.lang.RuntimeException: No message resource found for message property prop.servertype)

this is exactly what your MS JDBC driver wants to tell you (No message resource found for message property prop.servertype).

Check your driver configuration.
Make sure you can get connection from jboss datasource.
Deploy your hibernate application again.


Top
 Profile  
 
 Post subject: driver
PostPosted: Fri Aug 20, 2004 2:02 pm 
Newbie

Joined: Wed Aug 18, 2004 1:14 pm
Posts: 3
Yes, thank you. Driver jar should not be inside EAR file. Then there is no problem.


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