private int getMaxPackageId() {
		
		int maxPackageId = 0;
		
		try {
			// creates DB connection
			Class.forName("oracle.jdbc.driver.OracleDriver");
			Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "ictoosd", "ictoosd");
			Statement stmt = conn.createStatement();
					
			// get max row count
			String sql = "select count(*) cnt from packages";
			rs = stmt.executeQuery(sql);
			
			while (rs.next()){
			
				maxPackageId = Integer.parseInt(rs.getString("cnt"));
				System.out.println("rowCnt=" +maxPackageId);
			}
			
			conn.close();
			
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
		return maxPackageId;
	}