reset password
Author Message
tloi
Posts: 16
Posted 23:54 Apr 24, 2012 |

I run testng and get error message like this:

java.lang.RuntimeException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [-- DB Creation Script for CSNS
.....
]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "roles" already exists
 

what is the problem it could be?


Thanks.

cysun
Posts: 2935
Posted 11:31 Apr 25, 2012 |

The error says relation "roles" already exists. This may indicate that the csns2test database is not empty (maybe because your csns-drop script failed last time). Make sure csns2test is empty before you run the tests.

Fatemah
Posts: 59
Posted 21:33 Apr 25, 2012 |

Dear professor,

I got this message after I run TestNG Suite. What does that mean?

 

[TestNG] Running:
  C:\Users\Public\Documents\Computer Science_CSULA\CS520\workspace\csns2\src\test\resources\testng.xml


===============================================
csns
Total tests run: 27, Failures: 0, Skips: 27
Configuration Failures: 2, Skips: 41
===============================================

 

 

java.lang.RuntimeException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [-- DB Creation Script for CSNS
--

 

 

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [
drop function quarter_str( date )]; nested exception is org.postgresql.util.PSQLException: ERROR: function quarter_str(date) does not exist


 

Last edited by Fatemah at 21:52 Apr 25, 2012.
cysun
Posts: 2935
Posted 21:49 Apr 25, 2012 |
Fatemah wrote:

Dear professor,

I got this message after I run TestNG Suite. What does that mean?

...

 

It basically means there's something wrong with your db scripts. Check the changes you made to csns-create.sql and csns-drop.sql.