-->
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.  [ 2 posts ] 
Author Message
 Post subject: SELECT first Step
PostPosted: Wed Jun 28, 2006 5:08 am 
Beginner
Beginner

Joined: Thu Jun 22, 2006 8:56 am
Posts: 22
Hallo,

ich möchte nur ein Select Statement auführen, dabei bleiben meine Debug Ausgaben bei: DriverManagerConnectionProvider:109 - opening new JDBC connection
stehen.
Kann mir jemand einen Tipp geben?

Danke Euch,
seven-12


Hibernate version:3

Mapping documents:<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="Error" table="hibertest">
<id name="id" column="errorid">
<generator class="native"/>
</id>
<property name="timestamp" type="timestamp" column="LOGDATE"/>
</class>
</hibernate-mapping>


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

ArrayList arrayList = null;

String SQL_STRING = "FROM hibertest";
Query query = session.createQuery(SQL_STRING);
System.out.println(query);
ArrayList list = (ArrayList)query.list();

for(int i=0; i<list.size();i++){
System.out.println(list.get(i));
}




Debug level Hibernate log excerpt:

meine Ausgaben enden bei: 10:59:11,667 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection



Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 29, 2006 5:18 am 
Newbie

Joined: Mon Apr 24, 2006 5:56 am
Posts: 7
Hi,

1. Bist du dir sicher dass die hibernate.cfg.xml stimmt (zeig mal das Teil) und vor allem dass die darin enthaltenen Data-Source Attribute korrekt sind (richtige Datenbank, richtiger User, richtiges Passwort, User hat die benötigten Rechte, usw)

2. Wie lautet denn der komplette Stack-Trace der Exception?

10:59:11,667 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection

wird ja nicht alles sein

gruß
Harald


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