-->
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.  [ 1 post ] 
Author Message
 Post subject: Database connection
PostPosted: Wed Sep 10, 2003 7:23 am 
Regular
Regular

Joined: Wed Sep 10, 2003 7:09 am
Posts: 63
Hi,

I am having some problems with my SessionFactory settings.

I am trying to create a connection to a local MySQL database and i am getting the following error: "Could not find DataSource". After that i receive an exception.

I'm using the latest version of Hibernate as standalone, not connected to any J2EE container.

I am using XML as configuration file, with the following proprieties:

Code:
<!-- properties -->
        <property name="connection.datasource">my/first/datasource</property>
        <property name="connection.driver_class">org.gjt.mm.mysql.Driver</property>
        <!--property name="connection.driver_class">com.mysql.jdbc.Driver</property-->
        <property name="connection.url">jdbc:mysql://localhost/test</property>
        <property name="connection.username">root</property>
        <property name="connection.password"></property>

        <property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.session_factory_name">java:comp/env/hibernate/SessionFactory</property>


What am i doing wrong?

Thanks in advance,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.