<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebAccess v7.0.1-28479">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>RE: [Spacewalk-list] package removal problem in 1.4</title>
  <style type="text/css">
      body
      {
        font-family: Arial, Verdana, Sans-Serif ! important;
        font-size: 12px;
        padding: 5px 5px 5px 5px;
        margin: 0px;
        border-style: none;
        background-color: #ffffff;
      }

      p, ul, li
      {
        margin-top: 0px;
        margin-bottom: 0px;
      }
  </style>
</head>
<body>
<p><br /> Hi,</p><p> </p><p>Were you aware that when removing a package from a channel in fact the packages gets unlinked from it;s channel.</p><p>If you meant to really remove the package from spacewalk. First remove it from its channel and then find the pacakge</p><p>in the list of packages not related to a channe (manage software packages) l and remove it there again. Then the</p><p>package will be completely removed from spacewalk. After that you will be able to load the newly created package.</p><p> </p><p>The second way is to increase the version/build number of the new package (instead of identical version) Typically a</p><p>new build should have a increased version level. This will circumvents your issue.</p><p> </p><p>Rick</p><blockquote style="border-left: #325fba 2px solid; padding-left: 5px; margin-left: 5px"><div><div><p>Hi all,</p><p> </p><p>I seem to have a problem removing a package from a channel. Let me describe the situation:</p><p style="text-indent: -18pt;">-<span style="font: 7pt "Times New Roman"">          </span>We have some custom packages in a separate channel in spacewalk</p><p style="text-indent: -18pt;">-<span style="font: 7pt "Times New Roman"">          </span>It seems that a colleague of mine created a new version of a package, ran reposync; updated the package again (keeping the version the same) and ran reposync again</p><p> </p><p>The result is that in /var/satellite/redhat/, I now have 2 occurrences of the same package name (since the md5sum differs), but in spacewalk only the “oldest” one is being used.</p><p>I wanted to clean up the situation by removing the package from spacewalk, but it seems that even though spacewalk uses only one package, the 2 are somehow present in the database resulting in an error when trying to remove the package (see below). So I was wondering if there’s any method of forcibly removing the problem entries from the database?</p><p> </p><p>The tomcat catalina error:</p><p> </p><p>2012-01-09 11:17:21,802 [TP-Processor8] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class com.redhat.rhn.common.db.ConstraintViolationException</p><p>2012-01-09 11:17:21,803 [TP-Processor8] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back</p><p>javax.servlet.ServletException: ORA-00001: unique constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated</p><p>ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087</p><p>ORA-06512: at line 1</p><p> </p><p>        at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)</p><p>        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)</p><p>        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)</p><p>        at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)</p><p>        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)</p><p>        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)</p><p>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)</p><p>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)</p><p>        at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:101)</p><p>…</p><p><snip></p><p>…</p><p>Caused by: com.redhat.rhn.common.db.ConstraintViolationException: ORA-00001: unique constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated</p><p>ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087</p><p>ORA-06512: at line 1</p><p> </p><p>       at com.redhat.rhn.common.translation.SqlExceptionTranslator.oracleSQLException(SqlExceptionTranslator.java:77)</p><p>        at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:42)</p><p>        at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:118)</p><p>        at com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:511)</p><p>        at com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)</p><p>        at com.redhat.rhn.domain.channel.ChannelFactory.refreshNewestPackageCache(ChannelFactory.java:610)</p><p>        at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:179)</p><p>        at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:166)</p><p>        at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesRemoveAction.removePackages(ChannelPackagesRemoveAction.java:117)</p><p>        at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesRemoveAction.execute(ChannelPackagesRemoveAction.java:92)</p><p>        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)</p><p>        ... 40 more</p><p>Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated</p><p>ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087</p><p>ORA-06512: at line 1</p><p> </p><p>        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:759)</p><p>        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:661)</p><p>        at oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:544)</p><p>        at oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:727)</p><p>        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)</p><p>        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)</p><p>        at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)</p><p>        at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)</p><p>        at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)</p><p>        at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)</p><p>        at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:115)</p><p>        ... 48 more</p><p>2012-01-09 11:17:21,817 [TP-Processor8] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - Servlet.service() for servlet action threw exception</p><p>java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated</p><p>ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087</p><p>ORA-06512: at line 1</p><p> </p><p>        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:759)</p><p>        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:661)</p><p>        at oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:544)</p><p>        at oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:727)</p><p>        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)</p><p>        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)</p><p>        at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)</p><p>        at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)</p><p>        at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)</p><p>        at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)</p><p> </p><p>With friendly regards,</p><p> </p><p>Franky</p></div><br /><hr /><font color="#808080" size="1" face="Arial"><br />Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg<br />- 1130 Brussels - Belgium<br />RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872<br />Bankrekening-Compte Bancaire-Bank Account 310-0269424-44<br />BIC BBRUBEBB - IBAN BE55 3100 2694 2444<br /><br />"The information contained in this e-mail and any attachment thereto is confidential and may contain information which is protected by intellectual property rights.<br />This information is intended for the exclusive use of the recipient(s) named above.<br />This e-mail does not constitute any binding relationship or offer toward any of the addressees.<br />If you are not one of the addressees , one of their employees or a proxy holder entitled to hand over this message to the addressee(s), any use of the information contained herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited.<br />If you have received this message in error, please notify the sender and destroy it immediately after.<br />The integrity and security of this message cannot be guaranteed and it may be subject to data corruption, interception and unauthorized amendment, for which we accept no liability."<br /></font></div></blockquote>
</body>
</html>