Subversion Repositories DevTools

Rev

Rev 7032 | Rev 7044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7032 Rev 7033
Line 20... Line 20...
20
import java.util.ListIterator;
20
import java.util.ListIterator;
21
import java.util.concurrent.locks.ReentrantLock;
21
import java.util.concurrent.locks.ReentrantLock;
22
 
22
 
23
import oracle.sql.ArrayDescriptor;
23
import oracle.sql.ArrayDescriptor;
24
 
24
 
25
import org.apache.log4j.Logger;
25
import org.slf4j.Logger;
-
 
26
import org.slf4j.LoggerFactory;
26
 
27
 
27
import com.erggroup.buildtool.ripple.RunLevel.BuildState;
28
import com.erggroup.buildtool.ripple.RunLevel.BuildState;
28
import com.erggroup.buildtool.utilities.MutableDate;
29
import com.erggroup.buildtool.utilities.MutableDate;
29
 
30
 
30
/**Release Manager schema abstraction
31
/**Release Manager schema abstraction
Line 111... Line 112...
111
    public static final Package NULL_PACKAGE = new Package();
112
    public static final Package NULL_PACKAGE = new Package();
112
 
113
 
113
    /**Logger
114
    /**Logger
114
     * @attribute
115
     * @attribute
115
     */
116
     */
116
    private static final Logger mLogger = Logger.getLogger(ReleaseManager.class);
117
    private static final Logger mLogger = LoggerFactory.getLogger(ReleaseManager.class);
117
 
118
 
118
    /** Class to contain a lock and a connection as a single entity
119
    /** Class to contain a lock and a connection as a single entity
119
     * 
120
     * 
120
     */
121
     */
121
    static class RmConnection {
122
    static class RmConnection {
Line 158... Line 159...
158
                if (connection != null)
159
                if (connection != null)
159
                	connection.close();
160
                	connection.close();
160
            }
161
            }
161
            catch (SQLException e)
162
            catch (SQLException e)
162
            {
163
            {
163
                mLogger.fatal("SQL Exception closing connection:" + e.getMessage());
164
                mLogger.error("SQL Exception closing connection:" + e.getMessage());
164
            }
165
            }
165
    	}
166
    	}
166
    }
167
    }
167
    
168
    
168
    /**database connection for use when not planning a build
169
    /**database connection for use when not planning a build
Line 268... Line 269...
268
        mPassword = password;
269
        mPassword = password;
269
 
270
 
270
        String gbeBtDebug = System.getenv("GBE_BUILDTOOL_DEBUG");
271
        String gbeBtDebug = System.getenv("GBE_BUILDTOOL_DEBUG");
271
        if ( gbeBtDebug != null )
272
        if ( gbeBtDebug != null )
272
        {
273
        {
273
            mLogger.fatal("GBE_BUILDTOOL_DEBUG set - Use of database mutex supressed");
274
            mLogger.error("GBE_BUILDTOOL_DEBUG set - Use of database mutex supressed");
274
            setNoMutex();
275
            setNoMutex();
275
        }
276
        }
276
    }
277
    }
277
    
278
    
278
    /**
279
    /**
Line 500... Line 501...
500
            // allow another low priority thread to connect
501
            // allow another low priority thread to connect
501
            try {
502
            try {
502
                mLowPriorityQueue.unlock();
503
                mLowPriorityQueue.unlock();
503
            }
504
            }
504
            catch( IllegalMonitorStateException e ) {
505
            catch( IllegalMonitorStateException e ) {
505
                mLogger.fatal("disconnectForPlanning. IllegalMonitorStateException exception");
506
                mLogger.error("disconnectForPlanning. IllegalMonitorStateException exception");
506
            }
507
            }
507
        }
508
        }
508
 
509
 
509
        disconnect( mPlanningConnection );
510
        disconnect( mPlanningConnection );
510
    }
511
    }
Line 542... Line 543...
542
            mLogger.debug("disconnect calling unlock");
543
            mLogger.debug("disconnect calling unlock");
543
            try {
544
            try {
544
                connection.mSession.unlock();
545
                connection.mSession.unlock();
545
            }
546
            }
546
            catch (IllegalMonitorStateException e) {
547
            catch (IllegalMonitorStateException e) {
547
                mLogger.fatal("disconnect. IllegalMonitorStateException exception");
548
                mLogger.error("disconnect. IllegalMonitorStateException exception");
548
            }
549
            }
549
            mLogger.debug("disconnect called unlock");
550
            mLogger.debug("disconnect called unlock");
550
        }
551
        }
551
        
552
        
552
        mIsConnected = false;
553
        mIsConnected = false;
Line 563... Line 564...
563
     * @throws Exception
564
     * @throws Exception
564
     */
565
     */
565
    void handleSQLException(SQLException e, String instanceId ) throws SQLException, Exception
566
    void handleSQLException(SQLException e, String instanceId ) throws SQLException, Exception
566
    {
567
    {
567
        String callingMethodName = Thread.currentThread().getStackTrace()[2].getMethodName() + instanceId ;
568
        String callingMethodName = Thread.currentThread().getStackTrace()[2].getMethodName() + instanceId ;
568
        mLogger.fatal(callingMethodName + " sql exception:" + e.getMessage());
569
        mLogger.error(callingMethodName + " sql exception:" + e.getMessage());
569
        
570
        
570
        if ( mConnection == null || !mConnection.isValid(10) )
571
        if ( mConnection == null || !mConnection.isValid(10) )
571
        {
572
        {
572
            mLogger.error(callingMethodName + " database access error only");
573
            mLogger.error(callingMethodName + " database access error only");
573
            RmConnection.closeConnection(mConnection);
574
            RmConnection.closeConnection(mConnection);
574
            throw new SQLException(e);
575
            throw new SQLException(e);
575
        }
576
        }
576
        else
577
        else
577
        {
578
        {
578
            mLogger.fatal(callingMethodName + " show stopper");
579
            mLogger.error(callingMethodName + " show stopper");
579
            throw new Exception(callingMethodName + " show stopper");
580
            throw new Exception(callingMethodName + " show stopper");
580
        }
581
        }
581
    }
582
    }
582
    
583
    
583
    /** Claim the Build System Planning Lock
584
    /** Claim the Build System Planning Lock
Line 592... Line 593...
592
        if ( mUseDatabase && mUseMutex )
593
        if ( mUseDatabase && mUseMutex )
593
        {
594
        {
594
            try
595
            try
595
            {
596
            {
596
                CallableStatement stmt = mConnection.prepareCall("select CONFIG from release_manager.BUILD_SERVICE_CONFIG WHERE SERVICE='MUTEX' FOR UPDATE");
597
                CallableStatement stmt = mConnection.prepareCall("select CONFIG from release_manager.BUILD_SERVICE_CONFIG WHERE SERVICE='MUTEX' FOR UPDATE");
597
                mLogger.fatal("claimMutex calling stmt.executeUpdate");
598
                mLogger.error("claimMutex calling stmt.executeUpdate");
598
                stmt.executeUpdate();
599
                stmt.executeUpdate();
599
                mLogger.fatal("claimMutex called stmt.executeUpdate");
600
                mLogger.error("claimMutex called stmt.executeUpdate");
600
                stmt.close();
601
                stmt.close();
601
                mDoNotCommit = true;
602
                mDoNotCommit = true;
602
                mMutexState = "Holding Mutex";
603
                mMutexState = "Holding Mutex";
603
            }
604
            }
604
            catch ( SQLException e )
605
            catch ( SQLException e )
Line 622... Line 623...
622
        if ( mUseDatabase )
623
        if ( mUseDatabase )
623
        {
624
        {
624
            try
625
            try
625
            {
626
            {
626
                mDoNotCommit = false;
627
                mDoNotCommit = false;
627
                mLogger.fatal("releaseMutex calling commit");
628
                mLogger.error("releaseMutex calling commit");
628
                commit();
629
                commit();
629
                mLogger.fatal("releaseMutex called commit");
630
                mLogger.error("releaseMutex called commit");
630
                mMutexState = "Released Mutex";
631
                mMutexState = "Released Mutex";
631
            }
632
            }
632
            catch ( SQLException e )
633
            catch ( SQLException e )
633
            {
634
            {
634
                mMutexState = "Mutex Release Exception";
635
                mMutexState = "Mutex Release Exception";
Line 686... Line 687...
686
            }
687
            }
687
            catch( SQLException e )
688
            catch( SQLException e )
688
            {
689
            {
689
                // do not throw Exception
690
                // do not throw Exception
690
                // this is part of Exception handling
691
                // this is part of Exception handling
691
                mLogger.fatal( "indefinitePause caught SQLException " + e.getMessage() );
692
                mLogger.error( "indefinitePause caught SQLException " + e.getMessage() );
692
                RmConnection.closeConnection(mConnection);
693
                RmConnection.closeConnection(mConnection);
693
            }
694
            }
694
            catch( Exception e )
695
            catch( Exception e )
695
            {
696
            {
696
                mLogger.fatal( "indefinitePause caught Exception " + e.getMessage() );
697
                mLogger.error( "indefinitePause caught Exception " + e.getMessage() );
697
            }
698
            }
698
            finally
699
            finally
699
            {
700
            {
700
                // this block is executed regardless of what happens in the try block
701
                // this block is executed regardless of what happens in the try block
701
                // even if an exception is thrown
702
                // even if an exception is thrown
Line 706... Line 707...
706
                }
707
                }
707
                catch( Exception e )
708
                catch( Exception e )
708
                {
709
                {
709
                    // do not throw Exception
710
                    // do not throw Exception
710
                    // this is part of Exception handling
711
                    // this is part of Exception handling
711
                    mLogger.fatal( "indefinitePause2 caught Exception " + e.getMessage() );
712
                    mLogger.error( "indefinitePause2 caught Exception " + e.getMessage() );
712
                    RmConnection.closeConnection(mConnection);
713
                    RmConnection.closeConnection(mConnection);
713
                }
714
                }
714
            }
715
            }
715
        }
716
        }
716
    }
717
    }
Line 796... Line 797...
796
     * @exception   SQLException
797
     * @exception   SQLException
797
     * @exception   Exception
798
     * @exception   Exception
798
     */
799
     */
799
    public void discardVersion() throws SQLException, Exception
800
    public void discardVersion() throws SQLException, Exception
800
    {
801
    {
801
        mLogger.fatal("discardVersion");
802
        mLogger.error("discardVersion");
802
        
803
        
803
        if ( mPlannedPkgId != null && mPlannedPkgVersion != null )
804
        if ( mPlannedPkgId != null && mPlannedPkgVersion != null )
804
        {
805
        {
805
            try
806
            try
806
            {
807
            {
Line 855... Line 856...
855
     *  @param pkgId - Identifies the name of the package being built
856
     *  @param pkgId - Identifies the name of the package being built
856
     *  @param pkgPvId - Identifies the packageVersion the build is based upon
857
     *  @param pkgPvId - Identifies the packageVersion the build is based upon
857
     */
858
     */
858
    public void setCurrentPackageBeingBuilt(int rconId, int pkgId, int pkgPvId) throws SQLException, Exception
859
    public void setCurrentPackageBeingBuilt(int rconId, int pkgId, int pkgPvId) throws SQLException, Exception
859
    {
860
    {
860
        mLogger.fatal("setCurrentPackageBeingBuilt " + rconId);
861
        mLogger.error("setCurrentPackageBeingBuilt " + rconId);
861
        if ( mUseDatabase )
862
        if ( mUseDatabase )
862
        {
863
        {
863
            CallableStatement stmt = null;
864
            CallableStatement stmt = null;
864
            try
865
            try
865
            {
866
            {
Line 901... Line 902...
901
     * 
902
     * 
902
     *  @param rconId - Identifies the Release Config table entry
903
     *  @param rconId - Identifies the Release Config table entry
903
     */
904
     */
904
    public void clearCurrentPackageBeingBuilt(int rconId) throws SQLException, Exception
905
    public void clearCurrentPackageBeingBuilt(int rconId) throws SQLException, Exception
905
    {
906
    {
906
        mLogger.fatal("clearCurrentPackageBeingBuilt " + rconId);
907
        mLogger.error("clearCurrentPackageBeingBuilt " + rconId);
907
        if ( mUseDatabase )
908
        if ( mUseDatabase )
908
        {
909
        {
909
            try
910
            try
910
            {
911
            {
911
                connect();
912
                connect();
Line 1002... Line 1003...
1002
                //  Report per-package errors directly
1003
                //  Report per-package errors directly
1003
                //  Exceptions are for errors that need to halt the entire system
1004
                //  Exceptions are for errors that need to halt the entire system
1004
                //
1005
                //
1005
                if ( result <= 0 )
1006
                if ( result <= 0 )
1006
                {
1007
                {
1007
                    mLogger.fatal("autoMakeRelease PK_RMAPI.AUTO_MAKE_VCSRELEASE failed, returned " + result);
1008
                    mLogger.error("autoMakeRelease PK_RMAPI.AUTO_MAKE_VCSRELEASE failed, returned " + result);
1008
                    if ( result == -4 ) {
1009
                    if ( result == -4 ) {
1009
                        mReporting.errMsg = "Package migrated to SVN being built from CC tag";
1010
                        mReporting.errMsg = "Package migrated to SVN being built from CC tag";
1010
                    } else if ( result == -3 ) {
1011
                    } else if ( result == -3 ) {
1011
                        mReporting.errMsg = "Package not approved for autobuild";
1012
                        mReporting.errMsg = "Package not approved for autobuild";
1012
                    } else if ( result == -2 ) {
1013
                    } else if ( result == -2 ) {
Line 1068... Line 1069...
1068
                int result = stmt.getInt( 1 );
1069
                int result = stmt.getInt( 1 );
1069
 
1070
 
1070
                if ( result != 0 )
1071
                if ( result != 0 )
1071
                {
1072
                {
1072
                    // flag build failure
1073
                    // flag build failure
1073
                    mLogger.fatal("insertPackageMetrics show stopper PK_RMAPI.INSERT_PACKAGE_METRICS failed, returned" + result);
1074
                    mLogger.error("insertPackageMetrics show stopper PK_RMAPI.INSERT_PACKAGE_METRICS failed, returned" + result);
1074
                    throw new Exception("insertPackageMetrics show stopper PK_RMAPI.INSERT_PACKAGE_METRICS failed, returned" + result);
1075
                    throw new Exception("insertPackageMetrics show stopper PK_RMAPI.INSERT_PACKAGE_METRICS failed, returned" + result);
1075
                }
1076
                }
1076
                stmt.close();
1077
                stmt.close();
1077
                commit();
1078
                commit();
1078
            }
1079
            }
Line 1253... Line 1254...
1253
                    stmt.execute();
1254
                    stmt.execute();
1254
                    int rv = stmt.getInt( 1 );
1255
                    int rv = stmt.getInt( 1 );
1255
                    
1256
                    
1256
                    if (rv != 1)
1257
                    if (rv != 1)
1257
                    {
1258
                    {
1258
                        mLogger.fatal("insertTestResults show stopper. Insert error");
1259
                        mLogger.error("insertTestResults show stopper. Insert error");
1259
                        throw new Exception("insertTestResults show stopper. Insert error");
1260
                        throw new Exception("insertTestResults show stopper. Insert error");
1260
                    }
1261
                    }
1261
                }
1262
                }
1262
            }
1263
            }
1263
            stmt.close();
1264
            stmt.close();
Line 1823... Line 1824...
1823
        }
1824
        }
1824
        catch ( Exception e )
1825
        catch ( Exception e )
1825
        {
1826
        {
1826
            // this catch and rethrow is historical
1827
            // this catch and rethrow is historical
1827
            // problems were found using CallableStatement when updating a CLOB column with data > 4000 bytes
1828
            // problems were found using CallableStatement when updating a CLOB column with data > 4000 bytes
1828
            mLogger.fatal("publishBuildFile caught Exception " + e.getMessage());
1829
            mLogger.error("publishBuildFile caught Exception " + e.getMessage());
1829
            throw new Exception("publishBuildFile caught Exception " + e.getMessage());
1830
            throw new Exception("publishBuildFile caught Exception " + e.getMessage());
1830
        }
1831
        }
1831
        finally
1832
        finally
1832
        {
1833
        {
1833
            // this block is executed regardless of what happens in the try block
1834
            // this block is executed regardless of what happens in the try block
Line 1911... Line 1912...
1911
     * @throws SQLException
1912
     * @throws SQLException
1912
     * @throws Exception
1913
     * @throws Exception
1913
     */
1914
     */
1914
    private void disableDaemons(final int rtag_id) throws SQLException, Exception
1915
    private void disableDaemons(final int rtag_id) throws SQLException, Exception
1915
    {
1916
    {
1916
        mLogger.fatal("disableDaemons: " + rtag_id );
1917
        mLogger.error("disableDaemons: " + rtag_id );
1917
        
1918
        
1918
        try
1919
        try
1919
        {
1920
        {
1920
            CallableStatement stmt1 = mConnection.prepareCall( "call PK_BUILDAPI.set_daemon_states(?,2)" );
1921
            CallableStatement stmt1 = mConnection.prepareCall( "call PK_BUILDAPI.set_daemon_states(?,2)" );
1921
            stmt1.setInt( 1, rtag_id );
1922
            stmt1.setInt( 1, rtag_id );
Line 2023... Line 2024...
2023
                rset.close();
2024
                rset.close();
2024
                stmt.close();
2025
                stmt.close();
2025
 
2026
 
2026
                if ( rsetSize > 1 )
2027
                if ( rsetSize > 1 )
2027
                {
2028
                {
2028
                    mLogger.fatal("queryDirectedRunLevel rsetSize > 1");
2029
                    mLogger.error("queryDirectedRunLevel rsetSize > 1");
2029
                    // show stopper
2030
                    // show stopper
2030
                    throw new Exception("queryDirectedRunLevel rsetSize > 1");
2031
                    throw new Exception("queryDirectedRunLevel rsetSize > 1");
2031
                }
2032
                }
2032
            }
2033
            }
2033
            catch ( SQLException e )
2034
            catch ( SQLException e )
Line 2121... Line 2122...
2121
                //      Handles case where daemon has just been started/restarted
2122
                //      Handles case where daemon has just been started/restarted
2122
                //
2123
                //
2123
                if ( daemon_mode == 'M' &&  build_age > 0 && days_since_last_build > (build_age + 1) )
2124
                if ( daemon_mode == 'M' &&  build_age > 0 && days_since_last_build > (build_age + 1) )
2124
                {
2125
                {
2125
                    long upTimeSecs = (System.currentTimeMillis() - threadStartTime)/1000;
2126
                    long upTimeSecs = (System.currentTimeMillis() - threadStartTime)/1000;
2126
                    mLogger.fatal("queryReleaseConfig 1: " + rtag_id + ", " + rcon_id + ", "+ daemon_mode + ", " + pause + ", " + build_age + ", " + days_since_last_build + ", " + upTimeSecs );
2127
                    mLogger.error("queryReleaseConfig 1: " + rtag_id + ", " + rcon_id + ", "+ daemon_mode + ", " + pause + ", " + build_age + ", " + days_since_last_build + ", " + upTimeSecs );
2127
                    if ( upTimeSecs > mPostponeShutdown)
2128
                    if ( upTimeSecs > mPostponeShutdown)
2128
                    {
2129
                    {
2129
                        disableDaemons(rtag_id);
2130
                        disableDaemons(rtag_id);
2130
                        pause = 2;
2131
                        pause = 2;
2131
                    }
2132
                    }
2132
                    else
2133
                    else
2133
                    {
2134
                    {
2134
                        mLogger.fatal("queryReleaseConfig 1: Shutdown Postponed"  );    
2135
                        mLogger.error("queryReleaseConfig 1: Shutdown Postponed"  );    
2135
                    }
2136
                    }
2136
                }
2137
                }
2137
 
2138
 
2138
                mLogger.info("queryReleaseConfig 1: " + rtag_id + ", " + rcon_id + ", "+ daemon_mode + ", " + pause + ", " + build_age + ", " + days_since_last_build );
2139
                mLogger.info("queryReleaseConfig 1: " + rtag_id + ", " + rcon_id + ", "+ daemon_mode + ", " + pause + ", " + build_age + ", " + days_since_last_build );
2139
 
2140
 
Line 2146... Line 2147...
2146
            rset.close();
2147
            rset.close();
2147
            stmt.close();
2148
            stmt.close();
2148
 
2149
 
2149
            if ( rsetSize > 1 )
2150
            if ( rsetSize > 1 )
2150
            {
2151
            {
2151
                mLogger.fatal("queryReleaseConfig 1 rsetSize > 1");
2152
                mLogger.error("queryReleaseConfig 1 rsetSize > 1");
2152
                // show stopper
2153
                // show stopper
2153
                throw new Exception("queryReleaseConfig 1 rsetSize > 1");
2154
                throw new Exception("queryReleaseConfig 1 rsetSize > 1");
2154
            }
2155
            }
2155
        }
2156
        }
2156
        catch ( SQLException e )
2157
        catch ( SQLException e )
Line 2621... Line 2622...
2621
 
2622
 
2622
                    // Previous Version of this package, without the project suffix
2623
                    // Previous Version of this package, without the project suffix
2623
                    String pkg_prevVersion = getBaseVersionNumber(pv_id);
2624
                    String pkg_prevVersion = getBaseVersionNumber(pv_id);
2624
                    if ( pkg_prevVersion == null)
2625
                    if ( pkg_prevVersion == null)
2625
                    {
2626
                    {
2626
                        mLogger.fatal("queryPackageVersions. No Previous version" + pv_id);
2627
                        mLogger.error("queryPackageVersions. No Previous version" + pv_id);
2627
                        // show stopper
2628
                        // show stopper
2628
                        throw new Exception("queryPackageVersions. No Previous version" + pv_id);
2629
                        throw new Exception("queryPackageVersions. No Previous version" + pv_id);
2629
                    }
2630
                    }
2630
                    
2631
                    
2631
                    String v_ext = rset1.getString("v_ext","");
2632
                    String v_ext = rset1.getString("v_ext","");
Line 3650... Line 3651...
3650
			rset.close();
3651
			rset.close();
3651
			stmt.close();
3652
			stmt.close();
3652
        
3653
        
3653
    	} catch (SQLException e) {
3654
    	} catch (SQLException e) {
3654
    		baseVersion = null;
3655
    		baseVersion = null;
3655
    		mLogger.fatal("Exception for getBaseVersionNumber " + pv_id);
3656
    		mLogger.error("Exception for getBaseVersionNumber " + pv_id);
3656
		}
3657
		}
3657
        return baseVersion;
3658
        return baseVersion;
3658
    }
3659
    }
3659
 
3660
 
3660
    /**called only in escrow mode
3661
    /**called only in escrow mode
Line 3896... Line 3897...
3896
                rset1.close();
3897
                rset1.close();
3897
                stmt1.close();
3898
                stmt1.close();
3898
 
3899
 
3899
                if ( rsetSize > 1 )
3900
                if ( rsetSize > 1 )
3900
                {
3901
                {
3901
                    mLogger.fatal("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3902
                    mLogger.error("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3902
                    // show stopper
3903
                    // show stopper
3903
                    throw new Exception("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3904
                    throw new Exception("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3904
                }
3905
                }
3905
 
3906
 
3906
                if ( rsetSize == 1 )
3907
                if ( rsetSize == 1 )
Line 3926... Line 3927...
3926
                    rset2.close();
3927
                    rset2.close();
3927
                    stmt2.close();
3928
                    stmt2.close();
3928
 
3929
 
3929
                    if ( rsetSize > 1 )
3930
                    if ( rsetSize > 1 )
3930
                    {
3931
                    {
3931
                        mLogger.fatal("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3932
                        mLogger.error("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3932
                        // show stopper
3933
                        // show stopper
3933
                        throw new Exception("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3934
                        throw new Exception("queryPackageVersions rsetSize > 1 " + pkg_id + " " + pkg_version);
3934
                    }
3935
                    }
3935
 
3936
 
3936
                    if ( rsetSize == 1 )
3937
                    if ( rsetSize == 1 )
Line 4103... Line 4104...
4103
                    int result = stmt.getInt( 1 );
4104
                    int result = stmt.getInt( 1 );
4104
 
4105
 
4105
                    if ( result != 0 )
4106
                    if ( result != 0 )
4106
                    {
4107
                    {
4107
                        // flag build failure
4108
                        // flag build failure
4108
                        mLogger.fatal( "excludeFromBuild show stopper PK_RMAPI.EXCLUDE_INDIRECT_FROM_BUILD failed, returned " + result );
4109
                        mLogger.error( "excludeFromBuild show stopper PK_RMAPI.EXCLUDE_INDIRECT_FROM_BUILD failed, returned " + result );
4109
                        throw new Exception("excludeFromBuild show stopper PK_RMAPI.EXCLUDE_INDIRECT_FROM_BUILD failed, returned " + result);
4110
                        throw new Exception("excludeFromBuild show stopper PK_RMAPI.EXCLUDE_INDIRECT_FROM_BUILD failed, returned " + result);
4110
                    }
4111
                    }
4111
                    stmt.close();
4112
                    stmt.close();
4112
                    if (!hasConnection )
4113
                    if (!hasConnection )
4113
                        commit();
4114
                        commit();
Line 4201... Line 4202...
4201
                    buildFile = rset.getString("current_build_files");
4202
                    buildFile = rset.getString("current_build_files");
4202
                }
4203
                }
4203
 
4204
 
4204
                if ( rsetSize > 1 )
4205
                if ( rsetSize > 1 )
4205
                {
4206
                {
4206
                    mLogger.fatal("queryRunLevel 1 rsetSize > 1");
4207
                    mLogger.error("queryRunLevel 1 rsetSize > 1");
4207
                    // show stopper
4208
                    // show stopper
4208
                    throw new Exception("queryRunLevel 1 rsetSize > 1");
4209
                    throw new Exception("queryRunLevel 1 rsetSize > 1");
4209
                }
4210
                }
4210
 
4211
 
4211
                rset.close();
4212
                rset.close();
Line 4387... Line 4388...
4387
            //
4388
            //
4388
            if ( rsetSize > 1 )
4389
            if ( rsetSize > 1 )
4389
            {
4390
            {
4390
                //  show stopper
4391
                //  show stopper
4391
                //  More rows than expected returned from the database
4392
                //  More rows than expected returned from the database
4392
                mLogger.fatal("querySingleRunLevel rsetSize > 1");
4393
                mLogger.error("querySingleRunLevel rsetSize > 1");
4393
                throw new Exception("querySingleRunLevel rsetSize > 1");
4394
                throw new Exception("querySingleRunLevel rsetSize > 1");
4394
            }
4395
            }
4395
        }
4396
        }
4396
        catch ( SQLException e )
4397
        catch ( SQLException e )
4397
        {
4398
        {