-->
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: Exception: MySql URL problem
PostPosted: Tue Sep 18, 2007 11:16 pm 
Newbie

Joined: Tue Sep 18, 2007 11:13 am
Posts: 8
The following are the configuration details.
I have tried various connection.url but every time I get the same error.
Some of the URLs I tried are
1. jdbc:mysql://localhost/dev
2. jdbc:mysql://localhost:3306/dev
3. jdbc:mysql:///dev


Hibernate version: 3.2.5

Mapping documents:
<hibernate-configuration>
<session-factory>
<property name="current_session_context_class">thread</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="connection.url">jdbc:mysql:///dev</property>
<property name="connection.username">root</property>
<property name="connection.password">nilay</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>

<property name="hibernate.c3p0.initialPoolSize">3</property>
<property name="hibernate.c3p0.minPoolSize">3</property>
<property name="hibernate.c3p0.maxPoolSize">10</property>
<property name="hibernate.c3p0.idleTestPeriod">300</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.maxStatements">10</property>

<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>

<mapping resource="web/persistence/config/UserLogin.hbm.xml"/>

</session-factory>
</hibernate-configuration>


Full stack trace of any exception that occurs:

org.hibernate.HibernateException: connection is not valid without active transaction
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
at $Proxy0.connection(Unknown Source)
at web.datamanager.test.UserLoginDAO_AT.testConnection(UserLoginDAO_AT.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)





Name and version of the database you are using: MySql
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)



Am I missing something.
Fyi, I havent modified the tomcat server.xml.

Thanks,
Nilay Chheda


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.