Description of problem: Spacewalk throws an error when you try and view a systems package profile javax.servlet.ServletException: com.redhat.rhn.common.db.WrappedSQLException: ORA-00904: "SUBSTRING": invalid identifier. Version-Release number of selected component (if applicable): 2.5 How reproducible: Always Steps to Reproduce: 1. View a systems profile System -> Software -> Packages -> Profile Actual results: ISE Expected results: A list of installed packages Additional info: Running on CentOS 6 with Oracle 11g Catalina logs show 2016-07-06 09:26:03,398 [TP-Processor12] ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing cached statement sql: SELECT S.id, S.name FROM rhnServer S, rhnServer SBase WHERE S.org_id = SBase.org_id AND SBase.id = ? AND EXISTS (SELECT 1 FROM rhnUserServerPerms WHERE user_id = ? AND server_id = S.id) AND S.server_arch_id = SBase.server_arch_id AND SUBSTRING(S.release, '^[0-9]+') = SUBSTRING(SBase.release, '^[0-9]+') AND S.id != ? AND EXISTS(SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = S.id AND SFV.label = 'ftr_profile_compare') ORDER BY UPPER(S.name) com.redhat.rhn.common.db.WrappedSQLException: ORA-00904: "SUBSTRING": invalid identifier Here is the commit that introduced this change https://github.com/spacewalkproject/spacewalk/commit/0420e50fa4fcd819b8c99ca28682a1a0f1fae621
SUBSTRING(str, regex) is postgres-only and fails on Oracle - we need to find a different, cross-db, way to accomplish this
Taking...
spacewalk.git: 408042f83c59fec4ff4095d2ad0512898244a509
Problem only on Oracle. Reproducer by #Description spacewalk-java-oracle-2.5.98-1.el6.noarch spacewalk-java-2.5.98-1.el6.noarch Verified with spacewalk-java-oracle-2.6.47-1.el7.noarch spacewalk-java-2.6.47-1.el7.noarch
Spacewalk 2.7 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27