-
1. RHQ4: Handling plugin updates
genman May 5, 2011 3:22 PM (in response to genman)Just to be clear, I was running into this doing delete/add:
2011-05-05 13:22:11,019 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
2011-05-05 13:22:11,020 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (RHQ.RHQ_PLUGIN_NAME_DEPLOY_IDX) violated
2011-05-05 13:22:11,020 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
2011-05-05 13:22:11,020 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (RHQ.RHQ_PLUGIN_NAME_DEPLOY_IDX) violated
2011-05-05 13:22:11,020 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
-
2. RHQ4: Handling plugin updates
mazz May 5, 2011 3:43 PM (in response to genman)Unsure if this will answer all your questions, but the "Adding and Updating Agent Plugins" wiki page talks about some of this stuff.
If I'm developing a plugin, I don't delete/purge it after every change. I'm usually OK by just uploading a new plugin (or just copying the new jar in the "plugins" dropbox directory) and having the server find it on its next scan. Usually, the plugin update on the server will "just work" and I then command my agents to download the new plugins.
Follow steps 1-5 on that wiki to update the plugins.
On that wiki page, see the blue box titled, "Plugin Versioning" to answer your question about what happens if the plugin has the same version.
The bottom of that wiki talks about deleting plugins (so if you want to purge a plugin and start anew, follow those instructions).
-
3. RHQ4: Handling plugin updates
mazz May 5, 2011 3:46 PM (in response to genman)I've never seen that constraint violation happen before. That happens if we try to add a new agent plugin with the same name as a plugin that already exists. I'm not sure how that would happen unless you are trying to deploy two plugins at the same time that have the same name??? That doesn't seem right either, but, I dunno - I'm not sure how that violation can happen. I've never seen it before.
See if that wiki page I mentioned earlier can clarify anything.
-
4. RHQ4: Handling plugin updates
genman May 6, 2011 1:03 PM (in response to mazz)John,
I've been experimenting with adding my own plugin based on the Script plugin, so the constraint violation may have come from not modifying (as appropriate) the rhq-plugin.xml file.
The Wiki page was helpful. I think some of the docs are a little hard to follow since the UI for RHQ4 has changed a bit. Again, it would be helpful if exceptions generated by the update process would appear in the UI, or at least if there was a page that displayed captured system exceptions...I suppose one could be created through RHQ itself...
Thanks for your help.
-
5. RHQ4: Handling plugin updates
mazz May 6, 2011 1:14 PM (in response to genman)Elias Ross wrote:
Yeah, we do need to go through our wiki and update all our screenshots. The majority of the UI is now completely different (its using GWT now, not JSF). I created a BZ just so we don't forget to do this at some point.
-
6. RHQ4: Handling plugin updates
mkannapa May 21, 2011 11:53 AM (in response to genman)If you have changed the plugin name (this is JOPR/RHQ 3.0) then it will throw the unique constraint violation. Since in
3.0 it is really hard to delete a plugin, you have to be very careful with the name.