"could not get table metadata" "Got error 157 'Unknown error code' from NDBCLUSTER"

2.6k views Asked by At

I'm developping a java web application and I use MySQL Cluster for Database

I get this error when I try to instal the application in a Jboss server

.... org.hibernate.exception.GenericJDBCException: could not get table metadata: MY_TABLE_NAME .... Caused by: java.sql.SQLException: Got error 157 'Unknown error code' from NDBCLUSTER

environnement info :

  • prod environnement
  • jbos eap 6.2
  • mysql cluster with 2 data nodes
  • jboss data source URL : jdbc:mysql:loadbalance://< ip-1 >,< ip-2 >/BASE_NAME?loadBalanceBlacklistTimeout=5000
1

There are 1 answers

1
V R On BEST ANSWER

The Issue usually stems when the SQL you executed is not compatible with the JDBC implementation, try to add some fine logging to see what is getting executed to fetch the metadata.

Here are generic types of issues in Hib

JDBCConnectionException - indication an error with the underlying JDBC communication. SQLGrammarException - indicates grammar or syntax problem with the issued SQL. ConstraintViolationException - indicates some form of integrity constraint violation. LockAcquisitionException - indication an error acquiring a lock level necessary to perform the requested operation. and the last one: GenericJDBCException - a generic exception which did not fail into any of the other categories.