Les connexions peuvent pas être obtenues à partir des th e sous-jacente de la base de données! — HSQL DB

Je suis en train d'apprendre Hibernate Java Persistance avec hibernate par Gavin King.

Je viens de télécharger les exemples donnés dans le livre à partir de cet emplacement http://downloads.jboss.org/hibernate/caveatemptor/jpwh-gettingstarted-070401.zip

J'ai commencé mon HSQL db à l'aide de ant startdb et de la base de données a démarré avec succès.

Lorsque vous essayez d'exécuter la cible schemaexport j'obtiens l'erreur ci-dessous..

schemaexport: [hibernatetool]
L'exécution de veille prolongée de l'Outil avec un
Configuration Standard [hibernatetool]
1. tâche: hbm2ddl (Génère schéma de base de données) [hibernatetool] 18:07:56,555
INFO Environnement:500 - Hibernate
3.2.0.cr5 [hibernatetool] 18:07:56,555 INFO Environnement:533 -
mise en veille prolongée.propriétés non fo und
[hibernatetool] 18:07:56,555 INFO
Environnement:667 - Bytecode fournisseur
nom : cg lib [hibernatetool]
18:07:56,571 INFO Environnement:584 -
à l'aide du JDK 1.4 de java.sql.Horodatage
manipulation [hibernatetool] 18:07:56,617
INFO de Configuration:1384 - configuration
à partir d'un fichier: h ibernate.cfg.xml
[hibernatetool] 18:07:56,680 INFO
Configuration:507 - Lecture mappages
à partir de ser ource: hello/Message.hbm.xml
[hibernatetool] 18:07:56,758 INFO
HbmBinder:300 - Cartographie de la classe:
bonjour.Message
-> MESSAGES [hibernatetool] 18:07:56,851 INFO de Configuration:1465
- Configuré SessionFactor y: null [hibernatetool] 18:07:56,851 INFO
Dialecte:141 - en Utilisant le dialecte:
org.mise en veille prolongée.di alect.HSQLDialect
[hibernatetool] 18:07:56,914 INFO
SchemaExport:154 - l'Exécution de hbm2ddl
schéma exp ort [hibernatetool]
18:07:56,914 INFO SchemaExport:174 -
écrit schéma généré t o fichier:
C:\Users\Ramesh\Desktop\Tutorials\hibernate\Hibernate
Les exemples de Code\jpwh-
gettingstarted-070401\helloworld-native\helloworld-ddl.sql
[hibernatetool] 18:07:56,914 INFO
SchemaExport:179 - l'exportation généré
schéma de base de données [hibernatetool]
18:07:56,914 INFO
C3P0ConnectionProvider:50 - C3P0 à l'aide de
pilote : org.hsqldb.jdbcDriver à l'adresse URL:
jdbc:hsqldb:hsql://localhost
[hibernatetool] 18:07:56,914 INFO
C3P0ConnectionProvider:51 - Connexion
bon liens: {utilisateur=sa} [hibernatetool]
18:07:56,914 INFO
C3P0ConnectionProvider:54 - autocommit
mode: false [hibernatetool]
18:08:26,554 AVERTIR
BasicResourcePool:1222 -
com.mchange.v2.resou
rcepool.BasicResourcePool$AcquireTask@61f1680f
-- Acquisition Tentative A Échoué!!! Compensation en attendant acquiert. Alors que
essayer d'en acquérir un nouveau
ressource, nous fai led pour réussir plus
que le nombre maximal de permis
acquisition des tentatives (30) .
[hibernatetool] 18:08:26,554 ERREUR
SchemaExport:202 - schéma d'exportation
échec

[hibernatetool] java.sql.SQLException:
Les connexions peuvent pas être acquis à partir de
l e sous-jacente de la base de données!
[hibernatetool]
com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.j
ava:104) [hibernatetool]
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.che
ckoutPooledConnection(C3P0PooledConnectionPool.java:236)
[hibernatetool]
com.mchange.v2.c3p0.PoolBackedDataSource.getConnectio
n(PoolBackedDataSource.java:94)
[hibernatetool]
org.mise en veille prolongée.connexion.C3P0ConnectionProvider.getCo
nnection(C3P0ConnectionProvider.java:35)
[hibernatetool]
org.mise en veille prolongée.outil de.hbm2ddl.ManagedProviderConnectionH
elper.préparer(ManagedProviderConnectionHelper.java:28)
[hibernatetool]
org.mise en veille prolongée.outil de.hbm2ddl.SchemaExport.execute(Schem
aExport.java:180) [hibernatetool]
au
org.mise en veille prolongée.outil de.hbm2ddl.SchemaExport.créer(Schéma
À l'exportation.java:133) [hibernatetool]
au
org.mise en veille prolongée.outil de.ant.Hbm2DDLExporterTask.execute(Hb
m2DDLExporterTask.java:55)
[hibernatetool]
org.mise en veille prolongée.outil de.ant.HibernateToolTask.execute(Hibe
rnateToolTask.java:171)
[hibernatetool]
org.apache.outils.ant.UnknownElement.execute(UnknownEl
ement.java:291) [hibernatetool]
au
soleil.de réfléchir.NativeMethodAccessorImpl.invoke0(Native
M méthode) [hibernatetool]
soleil.de réfléchir.NativeMethodAccessorImpl.invoke(NativeMet
hodAccessorImpl.java:39)
[hibernatetool]
soleil.de réfléchir.DelegatingMethodAccessorImpl.invoke(Deleg
atingMethodAccessorImpl.java:25)
[hibernatetool]
java.lang.de réfléchir.La méthode.invoke(la Méthode.java:597)
[hibernatetool]
org.apache.outils.ant.de l'expédition.DispatchUtils.execute(D
ispatchUtils.java:106) [hibernatetool]
au
org.apache.outils.ant.De la tâche.effectuer(Tâche.java:348)
[hibernatetool]
org.apache.outils.ant.Cible.execute(la Cible.java:390)
[hibernatetool]
org.apache.outils.ant.Cible.performTasks(Target.java:
411) [hibernatetool]
org.apache.outils.ant.Projet.executeSortedTargets(Pro
ject.java:1397) [hibernatetool]
au
org.apache.outils.ant.Projet.executeTarget(du Projet.ja
va:1366) [hibernatetool]
org.apache.outils.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[hibernatetool]
org.apache.outils.ant.Projet.executeTargets(du Projet.j
ava:1249) [hibernatetool]
org.apache.outils.ant.Principal.runBuild(Principale.java:801)
[hibernatetool]
org.apache.outils.ant.Principal.startAnt(Principale.java:218)
[hibernatetool]
org.apache.outils.ant.de lancement.Lanceur.exécuter(Lanceur.jav
un:280) [hibernatetool]
org.apache.outils.ant.de lancement.Lanceur.principale(Lanceur.ja
va:109) [hibernatetool] Causé par:
com.mchange.v2.resourcepool.CannotAcquireResourceExce
ation: Une ResourcePool ne pouvait pas
l'acquisition d'une ressource à partir de ses principaux
de l'usine ou de la s ource. [hibernatetool]
au
com.mchange.v2.resourcepool.BasicResourcePool.awaitAc
quire(BasicResourcePool.java:970)
[hibernatetool]
com.mchange.v2.resourcepool.BasicResourcePool.checkou
tResource(BasicResourcePool.java:208)
[hibernatetool]
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.che
ckoutPooledConnection(C3P0PooledConnectionPool.java:232)
[hibernatetool] 24 ... plus
[hibernatetool] 1 erreur s'est produite
lors de l'exécution .
[hibernatetool] Erreur #1:
java.sql.SQLException: Connexions
n'a pas pu être acquis de l'ed de l'
sous-jacente de la base de données! [hibernatetool]
18:08:26,569 AVERTIR
BasicResourcePool:1222 -
com.mchange.v2.resou
rcepool.BasicResourcePool$AcquireTask@72f864fe
-- Acquisition Tentative A Échoué!!! Compensation en attendant acquiert. Alors que
essayer d'en acquérir un nouveau
ressource, nous fai led pour réussir plus
que le nombre maximal de permis
acquisition des tentatives (30) .`

Je n'ai pas trop de connaissance sur le hiberate ou HSQL..

Quelques un s'il vous plaît expliquer quel est le problème ici??

Grâce

EDIT: je suis en train de lancer le projet helloworld-native.

La cible en raison de la fourmi build.xml pour startdb est comme ci-dessous:

<!-- Start the HSQL DB server -->
<target name="startdb" description="Run HSQL database server with clean DB">
    <!-- Delete database files -->
    <delete dir="${database.dir}"/>
    <java classname="org.hsqldb.Server"
          fork="yes"
          classpathref="project.classpath"
          failonerror="true">
        <arg value="-database.0"/>
        <arg value="file:${database.dir}/db"/>
    </java>
</target>

et lorsque je lance la commande ant startdb je vois le dessous de sortie:

startdb:
     [delete] Deleting directory C:\Users\Ramesh\Desktop\Tutorials\hibernate\Hibernate Code samples\jpwh-gettingstarted-070401\helloworld-native\database
     [java] [Server@15ded0fd]: [Thread[main,5,main]]: checkRunning(false) entered
     [java] [Server@15ded0fd]: [Thread[main,5,main]]: checkRunning(false) exited

     [java] [Server@15ded0fd]: Startup sequence initiated from main() method
     [java] [Server@15ded0fd]: Loaded properties from [C:\Users\Ramesh\Desktop\Tutorials hibernate\Hibernate Code samples\jpwh-gettingstarted-070401\helloworld-native\server.properties]
     [java] [Server@15ded0fd]: Initiating startup sequence...
     [java] [Server@15ded0fd]: Server socket opened successfully in 29 ms.
     [java] [Server@15ded0fd]: Database [index=0, id=0, db=file:database/db, alias=] opened sucessfully in 469 ms.
     [java] [Server@15ded0fd]: Startup sequence completed in 523 ms.
     [java] [Server@15ded0fd]: 2010-11-08 22:11:08.027 HSQLDB server 1.8.0 is online
     [java] [Server@15ded0fd]: To close normally, connect and execute SHUTDOWN SQL
     [java] [Server@15ded0fd]: From command line, use [Ctrl]+[C] to abort abruptly

Alors, je pense que je suis en cours d'exécution HSQL DB en mode serveur uniquement (à partir du dessus de la sortie)..

S'il vous plaît dites-moi ce que je suis absent..

Essayé avec mysql..et c'est de travailler..je sais Pas quoi le problème?

OriginalL'auteur javanoob | 2010-11-07