could not alter table tig_ma_msgs to add missing column (#24)
Closed
wojciech.kapcia@tigase.net opened 9 years ago
Due Date
2015-10-08

Following exception is thrown while starting Tigase with UA component for the first time:

SEVERE: could not alter table tig_ma_msgs to add missing column by SQL:
alter table tig_ma_msgs add buddy_res nvarchar(1024)
com.microsoft.sqlserver.jdbc.SQLServerException: Column names in each table must be unique. Column name 'buddy_res' in table 'tig_ma_msgs' is specified more than once.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:792)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:662)
	at tigase.archive.db.JDBCMessageArchiveRepository.checkDB(JDBCMessageArchiveRepository.java:888)
	at tigase.archive.db.JDBCMessageArchiveRepository.initRepositoryDbSchema(JDBCMessageArchiveRepository.java:561)
	at tigase.archive.unified.db.JDBCUnifiedArchiveRepository.initRepositoryDbSchema(JDBCUnifiedArchiveRepository.java:101)
	at tigase.archive.db.JDBCMessageArchiveRepository.initRepository(JDBCMessageArchiveRepository.java:522)
	at tigase.archive.unified.db.JDBCUnifiedArchiveRepository.initRepository(JDBCUnifiedArchiveRepository.java:86)

Andrzej Wójcik (Tigase) commented 9 years ago

Fixed issue with upgrade of schema done from code.

Moved task to proper project.

wojciech.kapcia@tigase.net commented 9 years ago

Works.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
3576
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-message-archiving#24
Please wait...
Page is in error, reload to recover