Red Hat Bugzilla – Bug 618659
bundle upload does not work when using embedded H2 database
Last modified: 2013-09-02 03:23:56 EDT
install RHQ with the embedded H2 database option. try to upload a bundle distribution file and you get an exception. We haven't done any H2 testing in a while so it doesn't surprise me this is broken. I heard that uploading just the recipe and following the create wizard to individually unload the bundle files works around this problem - but it is unknown what other bundle-related activities fail on H2.
I think H2 is trying to tell us something :)
ERROR [ContentManagerBean] An error occurred while updating Blob with stream for PackageBits, Feature not supported: LOB update [50100-117]
ERROR [STDERR] org.h2.jdbc.JdbcSQLException: Feature not supported: LOB update [50100-117]
ERROR [STDERR] at org.h2.message.Message.getSQLException(Message.java:105)
ERROR [STDERR] at org.h2.message.Message.getSQLException(Message.java:116)
ERROR [STDERR] at org.h2.message.Message.getSQLException(Message.java:75)
ERROR [STDERR] at org.h2.message.Message.getUnsupportedException(Message.java:161)
ERROR [STDERR] at org.h2.jdbc.JdbcBlob.setBinaryStream(JdbcBlob.java:173)
ERROR [STDERR] at org.rhq.enterprise.server.content.ContentManagerBean.updateBlobStream(ContentManagerBean.java:1672)
ERROR [STDERR] at org.rhq.enterprise.server.content.ContentManagerBean.loadPackageBits(ContentManagerBean.java:1614)
ERROR [STDERR] at org.rhq.enterprise.server.content.ContentManagerBean.createPackageVersion(ContentManagerBean.java:1241)
see this thread:
specifically the email dated in May of 2010:
"Yes, that's true, this is not supported yet... Unfortunately I
can't tell you when it will be implemented. I'm afraid it's unlikely
that it will be implemented this year."
Therefore, if you use H2 with RHQ, you will not be able to use provisioning. This really only affects demos and testing because H2 is not one of our supported DBs in production.
Fix commit: 0ffb52081be378fcdcbbec84aea534a65969fe2d
Add H2 specific handling that avoids streaming blob update and instead uses byte logic. Of course, not good for large data but that should be ok for H2 use in demos etc. This can be removed if/when H2 adds the required support.
This seems to fix the bundle issue but the changes are actually at the PackageVersion handling, which should be applicable to other content-related use cases as well.
Verified on RHQ-Master build #418
Installed RHQ on H2DB
Created new bundle (using upload bundle)
Bundle upload works fine with embedded H2 database.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.