OpenNMS 1.8.X Installation Fails in InstallerDb.databaseSetUser

"Panon, Paul-Andre" <[email protected]>
Newsgroups gmane.network.opennms.install
Message-ID <84D20D8353A4AB4F96ED08738919009A2BBBDE1C80@SCVANEX7.sierrasys.com>
There have been a number of people reporting getting errors when upgrading the database to OpenNMS 1.7+ with a PostgreSQL database.
This appears likely to be due to a PostgreSQL JDBC driver bug. I took the code for databaseSetUser() from the InstallerDB class and modified it a bit, as well as mashing the connection initialization code from the InstallerDB and Installer classes. I modified the method to display what was being returned from the getMetaData().getTables() call.

    public void databaseSetUser() throws SQLException {
        ResultSet rs = getAdminConnection().getMetaData().getTables(null, "public", "%", null);
        HashSet<String> objects = new HashSet<String>();
        while (rs.next()) {
            objects.add(rs.getString("TABLE_NAME"));
        }
        PreparedStatement st = getAdminConnection().prepareStatement("ALTER TABLE ? OWNER TO ?");
        for (String objName : objects) {
            st.setString(1, objName);
            st.setString(2, m_user);
            m_out.println("Would perform ALTER TABLE " + objName + " OWNER TO " + m_user );
            /* st.execute(); */
                }
        st.close();
    }

and got a lot more than just the list of tables. The list includes sequences, pkeys, and perhaps attributes as well. I have been able to upgrade a PG OpenNMS database to 1.8.0 on CentOS 5 with using PG 8.4-701 JDBC driver, but am running into this error when trying to upgrade to 1.8.1 with the same driver on Windows.

Would perform ALTER TABLE signature_name OWNER TO opennms
Would perform ALTER TABLE article_search_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_priority_name OWNER TO opennms
Would perform ALTER TABLE queue_preferences OWNER TO opennms
Would perform ALTER TABLE service_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_state_type_pkey OWNER TO opennms
Would perform ALTER TABLE personal_queues OWNER TO opennms
Would perform ALTER TABLE role_user_user_id OWNER TO opennms
Would perform ALTER TABLE queue_name OWNER TO opennms
Would perform ALTER TABLE article_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_lock_index_ticket_id OWNER TO opennms
Would perform ALTER TABLE group_customer_user OWNER TO opennms
Would perform ALTER TABLE signature OWNER TO opennms
Would perform ALTER TABLE ticket_escalation_update_time OWNER TO opennms
Would perform ALTER TABLE ticket_history_queue_id OWNER TO opennms
Would perform ALTER TABLE ticket_state_type_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_history_type_pkey OWNER TO opennms
Would perform ALTER TABLE link_object_pkey OWNER TO opennms
Would perform ALTER TABLE mail_account_id_seq OWNER TO opennms
Would perform ALTER TABLE auto_response_type_name OWNER TO opennms
Would perform ALTER TABLE ticket_history_state_id OWNER TO opennms
Would perform ALTER TABLE group_customer_user_user_id OWNER TO opennms
Would perform ALTER TABLE roles OWNER TO opennms
Would perform ALTER TABLE ticket_history_create_time OWNER TO opennms
Would perform ALTER TABLE salutation_pkey OWNER TO opennms
Would perform ALTER TABLE link_state_name OWNER TO opennms
Would perform ALTER TABLE ticket_history_priority_id OWNER TO opennms
Would perform ALTER TABLE ticket_type_name OWNER TO opennms
Would perform ALTER TABLE customer_company OWNER TO opennms
Would perform ALTER TABLE auto_response_type_pkey OWNER TO opennms
Would perform ALTER TABLE users_pkey OWNER TO opennms
Would perform ALTER TABLE system_address_id_seq OWNER TO opennms
Would perform ALTER TABLE sessions_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_history_history_type_id OWNER TO opennms
Would perform ALTER TABLE link_object OWNER TO opennms
Would perform ALTER TABLE standard_response_name OWNER TO opennms
Would perform ALTER TABLE ticket_priority_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_escalation_solution_time OWNER TO opennms
Would perform ALTER TABLE package_repository OWNER TO opennms
Would perform ALTER TABLE standard_response_pkey OWNER TO opennms
Would perform ALTER TABLE search_profile_login OWNER TO opennms
Would perform ALTER TABLE article_search_message_id OWNER TO opennms
Would perform ALTER TABLE link_type OWNER TO opennms
Would perform ALTER TABLE follow_up_possible_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_title OWNER TO opennms
Would perform ALTER TABLE role_user_role_id OWNER TO opennms
Would perform ALTER TABLE notification_event_item_event_key OWNER TO opennms
Would perform ALTER TABLE ticket_history_id_seq OWNER TO opennms
Would perform ALTER TABLE generic_agent_jobs OWNER TO opennms
Would perform ALTER TABLE sla_pkey OWNER TO opennms
Would perform ALTER TABLE package_repository_pkey OWNER TO opennms
Would perform ALTER TABLE service_sla_service_sla OWNER TO opennms
Would perform ALTER TABLE time_accounting_pkey OWNER TO opennms
Would perform ALTER TABLE article_message_id OWNER TO opennms
Would perform ALTER TABLE service_preferences_service_id OWNER TO opennms
Would perform ALTER TABLE ticket_watcher_ticket_id OWNER TO opennms
Would perform ALTER TABLE group_user OWNER TO opennms
Would perform ALTER TABLE auto_response_name OWNER TO opennms
Would perform ALTER TABLE role_user OWNER TO opennms
Would perform ALTER TABLE queue OWNER TO opennms
Would perform ALTER TABLE article_plain OWNER TO opennms
Would perform ALTER TABLE time_accounting_ticket_id OWNER TO opennms
Would perform ALTER TABLE sla_name OWNER TO opennms
Would perform ALTER TABLE service_sla OWNER TO opennms
Would perform ALTER TABLE theme_theme OWNER TO opennms
Would perform ALTER TABLE group_role_role_id OWNER TO opennms
Would perform ALTER TABLE ticket_state_id_seq OWNER TO opennms
Would perform ALTER TABLE service_preferences OWNER TO opennms
Would perform ALTER TABLE service_id_seq OWNER TO opennms
Would perform ALTER TABLE article_pkey OWNER TO opennms
Would perform ALTER TABLE queue_id_seq OWNER TO opennms
Would perform ALTER TABLE group_user_user_id OWNER TO opennms
Would perform ALTER TABLE ticket_user_id OWNER TO opennms
Would perform ALTER TABLE link_type_id_seq OWNER TO opennms
Would perform ALTER TABLE customer_company_name OWNER TO opennms
Would perform ALTER TABLE ticket_history_owner_id OWNER TO opennms
Would perform ALTER TABLE ticket_state_type_name OWNER TO opennms
Would perform ALTER TABLE link_object_id_seq OWNER TO opennms
Would perform ALTER TABLE follow_up_possible_name OWNER TO opennms
Would perform ALTER TABLE customer_user_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_lock_type_name OWNER TO opennms
Would perform ALTER TABLE package_repository_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_queue_view OWNER TO opennms
Would perform ALTER TABLE system_address OWNER TO opennms
Would perform ALTER TABLE article_plain_id_seq OWNER TO opennms
Would perform ALTER TABLE user_preferences OWNER TO opennms
Would perform ALTER TABLE article_plain_pkey OWNER TO opennms
Would perform ALTER TABLE generic_agent_jobs_job_name OWNER TO opennms
Would perform ALTER TABLE ticket_loop_protection_sent_date OWNER TO opennms
Would perform ALTER TABLE valid OWNER TO opennms
Would perform ALTER TABLE queue_preferences_queue_id OWNER TO opennms
Would perform ALTER TABLE link_type_name OWNER TO opennms
Would perform ALTER TABLE notification_event_name OWNER TO opennms
Would perform ALTER TABLE customer_user_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_lock_type OWNER TO opennms
Would perform ALTER TABLE queue_standard_response OWNER TO opennms
Would perform ALTER TABLE ticket_customer_id OWNER TO opennms
Would perform ALTER TABLE web_upload_cache OWNER TO opennms
Would perform ALTER TABLE postmaster_filter OWNER TO opennms
Would perform ALTER TABLE group_role_group_id OWNER TO opennms
Would perform ALTER TABLE groups_name OWNER TO opennms
Would perform ALTER TABLE link_state OWNER TO opennms
Would perform ALTER TABLE standard_attachment_pkey OWNER TO opennms
Would perform ALTER TABLE user_preferences_user_id OWNER TO opennms
Would perform ALTER TABLE article_sender_type OWNER TO opennms
Would perform ALTER TABLE article_type_id_seq OWNER TO opennms
Would perform ALTER TABLE article_search_ticket_id OWNER TO opennms
Would perform ALTER TABLE ticket_history_type_id OWNER TO opennms
Would perform ALTER TABLE service OWNER TO opennms
Would perform ALTER TABLE standard_attachment_name OWNER TO opennms
Would perform ALTER TABLE service_customer_user_service_id OWNER TO opennms
Would perform ALTER TABLE article_flag_article_id OWNER TO opennms
Would perform ALTER TABLE groups_pkey OWNER TO opennms
Would perform ALTER TABLE roles_pkey OWNER TO opennms
Would perform ALTER TABLE article_search_article_sender_type_id OWNER TO opennms
Would perform ALTER TABLE follow_up_possible OWNER TO opennms
Would perform ALTER TABLE article_flag_create_by OWNER TO opennms
Would perform ALTER TABLE ticket_state OWNER TO opennms
Would perform ALTER TABLE salutation_name OWNER TO opennms
Would perform ALTER TABLE link_relation_view OWNER TO opennms
Would perform ALTER TABLE article_type OWNER TO opennms
Would perform ALTER TABLE xml_storage OWNER TO opennms
Would perform ALTER TABLE sla_preferences OWNER TO opennms
Would perform ALTER TABLE ticket_state_type OWNER TO opennms
Would perform ALTER TABLE auto_response_pkey OWNER TO opennms
Would perform ALTER TABLE article_type_pkey OWNER TO opennms
Would perform ALTER TABLE customer_preferences_user_id OWNER TO opennms
Would perform ALTER TABLE ticket OWNER TO opennms
Would perform ALTER TABLE ticket_lock_type_pkey OWNER TO opennms
Would perform ALTER TABLE article_search_article_type_id OWNER TO opennms
Would perform ALTER TABLE theme_id_seq OWNER TO opennms
Would perform ALTER TABLE notifications_id_seq OWNER TO opennms
Would perform ALTER TABLE group_role OWNER TO opennms
Would perform ALTER TABLE users_login OWNER TO opennms
Would perform ALTER TABLE standard_attachment OWNER TO opennms
Would perform ALTER TABLE system_address_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_type_id OWNER TO opennms
Would perform ALTER TABLE groups OWNER TO opennms
Would perform ALTER TABLE ticket_type_id_seq OWNER TO opennms
Would perform ALTER TABLE article_sender_type_pkey OWNER TO opennms
Would perform ALTER TABLE groups_id_seq OWNER TO opennms
Would perform ALTER TABLE notification_event_pkey OWNER TO opennms
Would perform ALTER TABLE valid_name OWNER TO opennms
Would perform ALTER TABLE article_search OWNER TO opennms
Would perform ALTER TABLE article_plain_article_id OWNER TO opennms
Would perform ALTER TABLE mail_account OWNER TO opennms
Would perform ALTER TABLE ticket_history_pkey OWNER TO opennms
Would perform ALTER TABLE article_sender_type_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_escalation_time OWNER TO opennms
Would perform ALTER TABLE article_attachment_article_id OWNER TO opennms
Would perform ALTER TABLE ticket_index_queue_id OWNER TO opennms
Would perform ALTER TABLE ticket_responsible_user_id OWNER TO opennms
Would perform ALTER TABLE service_customer_user_customer_user_login OWNER TO opennms
Would perform ALTER TABLE notification_event_id_seq OWNER TO opennms
Would perform ALTER TABLE xml_storage_key_type OWNER TO opennms
Would perform ALTER TABLE process_id OWNER TO opennms
Would perform ALTER TABLE ticket_state_pkey OWNER TO opennms
Would perform ALTER TABLE auto_response_type OWNER TO opennms
Would perform ALTER TABLE ticket_lock_index OWNER TO opennms
Would perform ALTER TABLE follow_up_possible_pkey OWNER TO opennms
Would perform ALTER TABLE roles_name OWNER TO opennms
Would perform ALTER TABLE customer_company_pkey OWNER TO opennms
Would perform ALTER TABLE sessions OWNER TO opennms
Would perform ALTER TABLE ticket_lock_type_id_seq OWNER TO opennms
Would perform ALTER TABLE notifications_pkey OWNER TO opennms
Would perform ALTER TABLE theme OWNER TO opennms
Would perform ALTER TABLE valid_pkey OWNER TO opennms
Would perform ALTER TABLE standard_response_attachment_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_state_name OWNER TO opennms
Would perform ALTER TABLE roles_id_seq OWNER TO opennms
Would perform ALTER TABLE article_ticket_id OWNER TO opennms
Would perform ALTER TABLE queue_auto_response_pkey OWNER TO opennms
Would perform ALTER TABLE signature_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_history_type_name OWNER TO opennms
Would perform ALTER TABLE article OWNER TO opennms
Would perform ALTER TABLE article_sender_type_name OWNER TO opennms
Would perform ALTER TABLE group_customer_user_group_id OWNER TO opennms
Would perform ALTER TABLE xml_storage_xml_content_key OWNER TO opennms
Would perform ALTER TABLE search_profile OWNER TO opennms
Would perform ALTER TABLE notification_event_item OWNER TO opennms
Would perform ALTER TABLE ticket_ticket_state_id OWNER TO opennms
Would perform ALTER TABLE valid_id_seq OWNER TO opennms
Would perform ALTER TABLE salutation OWNER TO opennms
Would perform ALTER TABLE ticket_watcher OWNER TO opennms
Would perform ALTER TABLE standard_response_attachment_id_seq OWNER TO opennms
Would perform ALTER TABLE queue_pkey OWNER TO opennms
Would perform ALTER TABLE users OWNER TO opennms
Would perform ALTER TABLE ticket_type_pkey OWNER TO opennms
Would perform ALTER TABLE salutation_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_ticket_lock_id OWNER TO opennms
Would perform ALTER TABLE service_name OWNER TO opennms
Would perform ALTER TABLE time_accounting OWNER TO opennms
Would perform ALTER TABLE customer_preferences OWNER TO opennms
Would perform ALTER TABLE link_type_pkey OWNER TO opennms
Would perform ALTER TABLE article_article_sender_type_id OWNER TO opennms
Would perform ALTER TABLE article_attachment_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_index_ticket_id OWNER TO opennms
Would perform ALTER TABLE signature_pkey OWNER TO opennms
Would perform ALTER TABLE sla_id_seq OWNER TO opennms
Would perform ALTER TABLE standard_response OWNER TO opennms
Would perform ALTER TABLE search_profile_profile_name OWNER TO opennms
Would perform ALTER TABLE article_attachment OWNER TO opennms
Would perform ALTER TABLE users_id_seq OWNER TO opennms
Would perform ALTER TABLE sla OWNER TO opennms
Would perform ALTER TABLE theme_pkey OWNER TO opennms
Would perform ALTER TABLE queue_group_id OWNER TO opennms
Would perform ALTER TABLE article_attachment_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_type OWNER TO opennms
Would perform ALTER TABLE sla_preferences_sla_id OWNER TO opennms
Would perform ALTER TABLE standard_response_attachment OWNER TO opennms
Would perform ALTER TABLE queue_auto_response OWNER TO opennms
Would perform ALTER TABLE ticket_answered OWNER TO opennms
Would perform ALTER TABLE ticket_history_ticket_id OWNER TO opennms
Would perform ALTER TABLE ticket_watcher_user_id OWNER TO opennms
Would perform ALTER TABLE queue_auto_response_id_seq OWNER TO opennms
Would perform ALTER TABLE notifications OWNER TO opennms
Would perform ALTER TABLE ticket_tn OWNER TO opennms
Would perform ALTER TABLE notification_event OWNER TO opennms
Would perform ALTER TABLE ticket_queue_id OWNER TO opennms
Would perform ALTER TABLE notification_event_item_event_value OWNER TO opennms
Would perform ALTER TABLE personal_queues_user_id OWNER TO opennms
Would perform ALTER TABLE ticket_history OWNER TO opennms
Would perform ALTER TABLE link_state_pkey OWNER TO opennms
Would perform ALTER TABLE article_type_name OWNER TO opennms
Would perform ALTER TABLE ticket_loop_protection_sent_to OWNER TO opennms
Would perform ALTER TABLE notification_event_item_notification_id OWNER TO opennms
Would perform ALTER TABLE auto_response_type_id_seq OWNER TO opennms
Would perform ALTER TABLE customer_user_login OWNER TO opennms
Would perform ALTER TABLE ticket_index_group_id OWNER TO opennms
Would perform ALTER TABLE standard_response_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_timeout OWNER TO opennms
Would perform ALTER TABLE ticket_until_time OWNER TO opennms
Would perform ALTER TABLE group_user_group_id OWNER TO opennms
Would perform ALTER TABLE link_state_id_seq OWNER TO opennms
Would perform ALTER TABLE auto_response OWNER TO opennms
Would perform ALTER TABLE ticket_index OWNER TO opennms
Would perform ALTER TABLE customer_user OWNER TO opennms
Would perform ALTER TABLE ticket_customer_user_id OWNER TO opennms
Would perform ALTER TABLE ticket_history_type_id_seq OWNER TO opennms
Would perform ALTER TABLE link_relation OWNER TO opennms
Would perform ALTER TABLE personal_queues_queue_id OWNER TO opennms
Would perform ALTER TABLE time_accounting_id_seq OWNER TO opennms
Would perform ALTER TABLE postmaster_filter_f_name OWNER TO opennms
Would perform ALTER TABLE standard_attachment_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_priority_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_pkey OWNER TO opennms
Would perform ALTER TABLE article_article_type_id OWNER TO opennms
Would perform ALTER TABLE ticket_ticket_priority_id OWNER TO opennms
Would perform ALTER TABLE auto_response_id_seq OWNER TO opennms
Would perform ALTER TABLE ticket_history_type OWNER TO opennms
Would perform ALTER TABLE service_customer_user OWNER TO opennms
Would perform ALTER TABLE ticket_escalation_response_time OWNER TO opennms
Would perform ALTER TABLE article_flag OWNER TO opennms
Would perform ALTER TABLE ticket_priority OWNER TO opennms
Would perform ALTER TABLE ticket_loop_protection OWNER TO opennms
Would perform ALTER TABLE link_object_name OWNER TO opennms
Would perform ALTER TABLE mail_account_pkey OWNER TO opennms
Would perform ALTER TABLE ticket_id_seq OWNER TO opennms

----Notice Regarding Confidentiality----

This email, including any and all attachments, (this “Email”) is intended only for the party to whom it is addressed and may contain information that is confidential or privileged.  Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email.  If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited.  Please notify us of the error in communication by return email and destroy all copies of this Email. Thank you.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-install mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-install
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.