Bug 1394245

Summary: ISE 500 when I try to create duplicate repository
Product: Red Hat Satellite 5 Reporter: Pavel Studeník <pstudeni>
Component: ServerAssignee: Jan Dobes <jdobes>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: galtukho, jdobes, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.5.14-24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:07:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1340444    

Description Pavel Studeník 2016-11-11 13:14:45 UTC
Description of problem:
I received ISE 500 when I tried to create repository with existing (duplicate) label or url. It is regression - on Satellite 5.7 it works correct.

Same problem on spacewalk: https://bugzilla.redhat.com/show_bug.cgi?id=1368490

Version-Release number of selected component (if applicable):
spacewalk-java-2.5.14-22.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. go to: "Channels" --> "Manage Software Channels" --> "Create Repository"
2. create a repository with same URL or label.
3. receive Internal Server Error 

Actual results:
Internal Server Error (500)

Expected results:
without ISE 500 and show correct page

Additional info:
tail /var/log/tomcat6/catalina.out
ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name contenttypes
	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	at org.apache.jsp.WEB_002dINF.pages.channel.manage.repo.repodetails_jsp._jspService(Unknown Source
...
javax.servlet.jsp.JspException: Cannot find bean under name contenttypes
	at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:377)
	at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:188)
	at org.apache.jsp.WEB_002dINF.pages.channel.manage.repo.repodetails_jsp._jspx_meth_html_005foptions_005f0(Unknown Source)
	at org.apache.jsp.WEB_002dINF.pages.channel.manage.repo.repodetails_jsp._jspx_meth_html_005fselect_005f0(Unknown Source)
	at org.apache.jsp.WEB_002dINF.pages.channel.manage.repo.repodetails_jsp._jspx_meth_html_005fform_005f0(Unknown Source)
	at org.apache.jsp.WEB_002dINF.pages.channel.manage.repo.repodetails_jsp._jspx_meth_html_005fhtml_005f0(Unknown Source)
	... 51 more

Comment 2 Jan Dobes 2016-11-16 16:40:28 UTC
fixed in spacewalk master:

8f2bf867696097c9e51a8633b6c3f9c7b820b5a8

also fixed one uncaught attempt to insert duplicate row if you are switching repository type on edit repository page:

cf29f69e45dc7e7af635e4421223dfdaf8f076e1

and fixed not displaying repository label/name and not working delete link on repository edit page when previous submit of form failed:

81d9e2bc5fe991dff99a5722d7f006619b47ed09

Comment 4 Pavel Studeník 2016-12-06 16:55:29 UTC
Verified with spacewalk-java-2.5.14-28.el6sat.noarch