Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34191 > unrolled thread

Hibernate is trying to fetch table meta from different database

Started bymcheung63@gmail.com
First post2016-04-24 06:22 -0700
Last post2016-04-30 20:29 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Hibernate is trying to fetch table meta from different database mcheung63@gmail.com - 2016-04-24 06:22 -0700
    Re: Hibernate is trying to fetch table meta from different database Lothar Kimmeringer <news200709@kimmeringer.de> - 2016-04-30 20:29 +0200

#34191 — Hibernate is trying to fetch table meta from different database

Frommcheung63@gmail.com
Date2016-04-24 06:22 -0700
SubjectHibernate is trying to fetch table meta from different database
Message-ID<4693e0a0-c89b-4704-bfe4-6195680da23b@googlegroups.com>
Hi All 
   Hibernate is trying to fetch table meta from *DIFFERENT* databases. Please take a look http://peter.kingofcoders.com/wp-content/uploads/2016/04/wrong-database.png

Here is my hibernate.cfg.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
	<session-factory>
		<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
		<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/SuperTrader?autoReconnect=true&amp;verifyServerCertificate=false&amp;useSSL=false&amp;serverTimezone=Asia/Hong_Kong</property>
		<property name="hibernate.hbm2ddl.auto">update</property>
		<property name="hibernate.connection.username">SuperTrader</property>
		<property name="hibernate.connection.password">SuperTrader</property>
		<property name="show_sql">true</property>

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


thanks
from Peter (cmk128@hotmail.com)

[toc] | [next] | [standalone]


#34227

FromLothar Kimmeringer <news200709@kimmeringer.de>
Date2016-04-30 20:29 +0200
Message-ID<1rsxz6vt1670u$.dlg@kimmeringer.de>
In reply to#34191
mcheung63@gmail.com wrote:

>    Hibernate is trying to fetch table meta from *DIFFERENT*
> databases. Please take a look
> http://peter.kingofcoders.com/wp-content/uploads/2016/04/wrong-database.png

it doesn't seem to fetch the metadata from the wrong database but the
metadata being retrieved from the database is pointing to a table
of a different one.


Cheers, Lothar
-- 
Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                 questions!

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web