How to make plugin's release?

I have tried to make a release of User Status plugin. I have tagged commit with version change as 1.2.1 https://github.com/igniterealtime/openfire-userStatus-plugin/releases/tag/1.2.1
I don’t know what else has to be done for it to be picked up by Archiva. I thought maybe it didn’t work because i have changed in pom.xml (from UserStatus Plugin to User Status Plugin). But i have already tried to rename it back, deleted old release/tag and tried again. Still can’t make new version to appear in the list https://www.igniterealtime.org/projects/openfire/plugin-archive.jsp?plugin=userStatus

@guus @akrherz need help :slight_smile:

I can’t see anything obviously wrong. My suspicion is that the Travis integration simply isn’t set up for this plugin - looking at https://www.igniterealtime.org/archiva/#artifact/org.igniterealtime.openfire.plugins/userStatus it seems nothing has been built since the new structure was introduced.

Greg

1 Like

PS. Not worth re-tagging for this, but https://github.com/igniterealtime/openfire-userStatus-plugin/blob/1.2.1/pom.xml#L7 should ideally be 4.3.0 (i.e. without -beta).

Greg

1 Like

Guus restarted Tomcat today and plugin has appeared. Noted about the beta tag :wink:

1 Like

Oh, sorry about that. Yeah, sometimes, the website stops picking up updates from Archiva. I’m not sure why. Maybe this has to do with Let’s Encrypt certificates being rotated (I don’t have any direct indication for this, other than that also happened this weekend).

Btw, @gdt
I have updated this plugin on my server and in the database it still says version 0 of its database and lastipaddress field is still 15 chars long. It doesn’t seem that upgrade script worked. I have only tested with HSQLDB embedded db though.

OK, not sure what’s going on there, to be honest :frowning:
Greg

it worked for me on postgresql

2019.06.04 12:13:27 INFO  [pool-27-thread-1]: org.jivesoftware.database.SchemaManager - Found old database version 0 for user-status. Upgrading to version 1...
2019.06.04 12:13:27 INFO  [pool-27-thread-1]: org.jivesoftware.database.SchemaManager - Database update successful.
\d userStatus
                        Table "public.userstatus"
     Column     |         Type          | Collation | Nullable | Default 
----------------+-----------------------+-----------+----------+---------
 username       | character varying(64) |           | not null | 
 resource       | character varying(64) |           | not null | 
 online         | integer               |           | not null | 
 presence       | character(15)         |           |          | 
 lastipaddress  | character(45)         |           | not null | 
 lastlogindate  | character(15)         |           | not null | 
 lastlogoffdate | character(15)         |           |          | 
1 Like

Great. Maybe some HSQLDB quirk.

If you shutdown the server, clear the logs, and restart (assuming you don’t mind losing the logs) the all.log may indicate what’s going wrong with the HSQLDB update. Probably a subtly different syntax error.

Greg

1 Like

2019.06.06 22:53:40 INFO [pool-6-thread-1]: org.jivesoftware.database.SchemaManager - Found old database version 0 for user-status. Upgrading to version 1…
2019.06.06 22:53:40 ERROR [pool-6-thread-1]: org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL:
alter table userStatus modify column lastIpAddress VARCHAR(45);
2019.06.06 22:53:40 ERROR [pool-6-thread-1]: org.jivesoftware.database.SchemaManager - unexpected token: MODIFY
java.sql.SQLSyntaxErrorException: unexpected token: MODIFY
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:388) ~[xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:285) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.database.SchemaManager.checkPluginSchema(SchemaManager.java:129) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:571) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:354) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:342) [xmppserver-4.3.2.jar:4.3.2]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
Caused by: org.hsqldb.HsqlException: unexpected token: MODIFY
at org.hsqldb.error.Error.parseError(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.ParserBase.unexpectedToken(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.ParserDDL.compileAlterTable(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.ParserDDL.compileAlter(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.ParserCommand.compilePart(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.ParserCommand.compileStatements(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.Session.executeDirectStatement(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
at org.hsqldb.Session.execute(Unknown Source) ~[hsqldb-2.4.1.jar:2.4.1]
… 14 more
2019.06.06 22:53:40 ERROR [pool-6-thread-1]: org.jivesoftware.openfire.container.PluginManager - Error while loading plugin ‘userstatus’: Database update failed. Please manually upgrade your database.

based on https://razorsql.com/features/hsqldb_change_column_type.html

That worked. Not sure if it warrants another release though. Probably not many running UserStatus with HSQLDB combination. And it only shows error in the log (still saves old IPv4 addresses).

1 Like

I’d agree; the problem will go away “next time” (another two years?) there’s an update to the plugin, and there’s an easy work-around if anyone hits the problem today.

Greg

1 Like