Hi, I tried searching, and I could not find a solution to this problem. I'm using Hibernate 3.3.2 with MySQL 5.0.45, Java 1.6.0_26, and jdbc 5.1.16. Normally, everything works fine. I can connect to my database, run my queries, and get my results. However, I ran into a situation after I started putting tables in different databases.
I'm getting the following error:
+ java -cp /home/bchin/testix/java/hibernate/bin/:/home/bchin/testix/0k/834 -Djava.ext.dirs=/sw/java/:/sw/java/jdbc/ de.laliluna.example.FormulaJoinTest 54 21:07:18,916 ERROR SchemaExport:202 - schema export unsuccessful com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: [11267] No such database: db828 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885) at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775) at com.mysql.jdbc.Connection.<init>(Connection.java:1555) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180) at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133) at de.laliluna.example.FormulaJoinTest.createTables(FormulaJoinTest.java:145) at de.laliluna.example.FormulaJoinTest.main(FormulaJoinTest.java:55) 21:07:19,114 ERROR SchemaExport:202 - schema export unsuccessful com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
Now my FormulaJoinTest is suppose to connect to database db834, but I'm getting an error stating it can't find db828! That was a different test that ran on a different client that connected to a different mysql server about 4 minutes earlier. The only problem I can find is that these two tests are accessing my nfs mounted directory, /sw/java/, where the hibernate3.jar, jdbc, and all the other necessary libs are located. The config file, hibernate.cfg.xml, is not on the shared nfs file server either
config (hibernate.cfg.xml ) for database db834:
<?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="connection.url">jdbc:mysql://foo:3306/db834</property> <property name="connection.username">root</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
config ((hibernate.cfg.xml ) for database db828:
<?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="connection.url">jdbc:mysql://bar:3306/db828</property> <property name="connection.username">root</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.password"></property>
What am I missing? Any help would be great!
Thanks, Brad
|