SQL query fix

This is to fix the following java error:

ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while
processing cached statement sql: SELECT CTV.name, CTV.id,
CTV.channel_arch_id, C.org_id,
       CASE WHEN NOT CTV.parent_or_self_id = CTV.channel_id THEN
CTV.parent_or_self_id END AS parent_id,
       (SELECT COUNT (cp.package_id)
          FROM rhnchannelpackage cp
         WHERE cp.channel_id = CTV.id) AS package_count,
       CTV.label AS channel_label
  FROM rhnchannel C, rhnChannelTreeView CTV, rhnChannel C2
 WHERE CTV.id = C.ID
   AND  CTV.parent_or_self_id = C2.id
   AND (rhn_channel.user_role_check(C.id, ?, 'manage') = 1
        OR EXISTS (
              SELECT 1
                FROM rhnChannel C2
               WHERE C2.parent_channel = C.ID
                 AND rhn_channel.user_role_check(C2.id, ?, 'manage') =
1))
ORDER BY UPPER(C2.name), depth, UPPER(C.name)
com.redhat.rhn.common.db.WrappedSQLException: ERROR: column
ctv.channel_id does not exist
fix JSP variable names

This is to fix the following errors:

javax.el.PropertyNotFoundException: Property 'org_id' not found
on type com.redhat.rhn.frontend.dto.ChannelTreeNode

and

javax.el.PropertyNotFoundException: Property 'package_count' not found
on type com.redhat.rhn.frontend.dto.ChannelTreeNode