Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1134879 - schedule.deleteActions returns 500 Internal Server Error
Summary: schedule.deleteActions returns 500 Internal Server Error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space23
TreeView+ depends on / blocked
 
Reported: 2014-08-28 11:56 UTC by Wolfram Joost
Modified: 2015-04-14 19:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1162668 (view as bug list)
Environment:
Last Closed: 2015-04-14 19:04:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Wolfram Joost 2014-08-28 11:56:37 UTC
Description of problem:

Trying to delete an archived action using "schedule.deleteActions" fails with an internal server error.


Version-Release number of selected component (if applicable):
spacewalk-java-2.2.123-1.el6

How reproducible:


Steps to Reproduce:
1. Archive an action with the api schedule.archiveActions
2. Try to delete this action with schedule.deleteActions

Actual results:
xmlrpclib.ProtocolError: <ProtocolError for 127.0.0.1/rpc/api: 500 Internal Server Error>

Expected results:
Actions deleted.


Additional info:
rhn_web_api.log

[2014-08-28 13:00:44,427] INFO  - REQUESTED FROM: 127.0.0.1 CALL: auth.login(scriptuser, ********) CALLER: (scriptuser) TIME: 0.137 seconds
[2014-08-28 13:00:44,522] INFO  - REQUESTED FROM: 127.0.0.1 CALL: schedule.listArchivedActions(scriptuser) CALLER: (scriptuser) TIME: 0.079 seconds
[2014-08-28 13:00:44,771] INFO  - REQUESTED FROM: 127.0.0.1 CALL: schedule.deleteActions(scriptuser, [32, 33, 34, 37]) CALLER: (scriptuser) TIME: 0.21 seconds

localhost.2014-08-28.log

Aug 28, 2014 1:01:08 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet XMLRPC threw exception
com.redhat.rhn.common.hibernate.HibernateRuntimeException: Error during transaction. Rolling back
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:72)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.hibernate.exception.ConstraintViolationException: could not update: [com.redhat.rhn.domain.action.rhnpackage.PackageActionDetails#57]
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
        at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
        at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
        at com.redhat.rhn.common.hibernate.ConnectionManager.commitTransaction(ConnectionManager.java:233)
        at com.redhat.rhn.common.hibernate.HibernateFactory.commitTransaction(HibernateFactory.java:331)
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:58)
        ... 18 more
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "name_id" violates not-null constraint
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:321)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:469)
        at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2403)
        ... 32 more

Comment 1 Tomas Lestach 2014-11-07 16:20:15 UTC
Wolfram, I tried to reproduce your issue and I managed to get the ISE. Unfortunately the traceback in catalina.log was slightly different.

I fixed the issue I saw with ...

spacewalk.git: e6ac23b6b9bb3d0f5bbd570672d5037bd167db5c

It may (but must not) fix your issue as well.

If you would let me know, what kind of package action is the one you cannot delete, I'll try to reproduce it again.

Otherwise I'm switching the BZ to MODIFIED.

Comment 2 Wolfram Joost 2014-11-10 09:02:16 UTC
I tried to delete an archived package install.

Comment 3 Tomas Lestach 2014-11-10 09:55:27 UTC
Package install is covered by the fix.
Thank you.

Comment 4 Grant Gainey 2015-03-23 16:59:38 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 5 Grant Gainey 2015-04-14 19:04:12 UTC
Spacewalk 2.3 has been released. See

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23


Note You need to log in before you can comment on or make changes to this bug.