Bug 820102 - REST api createPackageSnapshot does not work on a package without an existing snapshot
Summary: REST api createPackageSnapshot does not work on a package without an existing...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER7
: BRMS 5.3.0.GA
Assignee: manstis
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-09 07:33 UTC by Geoffrey De Smet
Modified: 2025-02-10 03:19 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:19:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Geoffrey De Smet 2012-05-09 07:33:57 UTC
Hao Wu (Red Hat username hwu) has reported this problem to me by e-mail for a customer for 5.3.

However, on master (5.5.0-SNAPSHOT) we have a test that proves this is not a problem:
org.drools.guvnor.server.jaxrs.BasicPackageResourceIntegrationTest#testCreatePackageSnapshot
https://github.com/droolsjbpm/guvnor/blob/master/guvnor-webapp-drools/src/test/java/org/drools/guvnor/server/jaxrs/BasicPackageResourceIntegrationTest.java#L865

So we need to figure out what the difference is.

Comment 2 Geoffrey De Smet 2012-05-09 08:17:57 UTC
The test fails on 5.3.x:

RROR 09-05 10:17:11,800 (AbstractFaultChainInitiatorObserver.java:onMessage:106) 	 Error occurred during error handling, give up!
org.apache.cxf.interceptor.Fault: The package restPackage1 does not have any snapshots.
	at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:164)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:91)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
	at org.eclipse.jetty.server.Server.handle(Server.java:352)
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
	at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1051)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.drools.repository.RulesRepositoryException: The package restPackage1 does not have any snapshots.
	at org.drools.repository.RulesRepository.removePackageSnapshot(RulesRepository.java:612)
	at org.drools.guvnor.server.RepositoryPackageOperations.createPackageSnapshot(RepositoryPackageOperations.java:491)
	at org.drools.guvnor.server.jaxrs.PackageResource.createPackageSnapshot(PackageResource.java:853)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
	... 41 more

Comment 3 Geoffrey De Smet 2012-05-09 08:24:40 UTC
Once the permission is here to backport the fix for this to 5.3.x, ping me. I have the regression test in my local branch (branch bugzilla-820102).

Comment 4 Geoffrey De Smet 2012-05-10 07:53:43 UTC
Fixed on 5.3.x (was already fixed on master and 5.4.x)
https://github.com/droolsjbpm/guvnor/compare/eae71bd...e80cb13

Comment 5 Ryan Zhang 2012-05-14 08:16:00 UTC
The fixed for this issue should be included in ER7. Please do verification on it.

Comment 6 Lukáš Petrovický 2012-05-29 10:57:21 UTC
VERIFIED in ER8.

Comment 12 Red Hat Bugzilla 2025-02-10 03:19:48 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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