archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Sharp <forjsh...@gmail.com>
Subject BrowseServiceTest Error
Date Thu, 18 Sep 2014 04:25:41 GMT
Hello Archiva Dev Team,

I was fiddling around with the redback roles and in the process broke one
of the seemingly unrelated REST service test classes, BrowseServiceTest.
The tests pass but an error is thrown (see below) when deleting the test
repository it uses.

There are three tests in the class with concurrent browsing/adding and
scanning. It appears I can avoid getting the error by inserting a scan-wait
before deleting the repository:

    @After
    public void deleteTestRepo()
        throws Exception
    {
+      scanRepo( TEST_REPO_ID );
+      waitForScanToComplete( TEST_REPO_ID );
        deleteTestRepo( TEST_REPO_ID );
    }

I suppose this is bringing the index up to date with metadata added "after"
the previous scan. Is it the expected behavior that changing the test like
this would fix the problem?

Warm Regards,

-Jon

Here is the error message:

Running org.apache.archiva.rest.services.BrowseServiceTest
Tests run: 15, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 146.267
sec <<< FAILURE! - in org.apache.archiva.rest.services.BrowseServiceTest
browsegroupId(org.apache.archiva.rest.services.BrowseServiceTest)  Time
elapsed: 15.513 sec  <<< ERROR!
org.apache.cxf.jaxrs.client.ServerWebApplicationException:
<html><head><title>Apache Tomcat/7.0.54 - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - org.apache.cxf.interceptor.Fault: Unable
to update a stale item: item.save()</h1><HR size="1"
noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
<u>org.apache.cxf.interceptor.Fault: Unable to update a stale item:
item.save()</u></p><p><b>description</b> <u>The server
encountered an
internal error that prevented it from fulfilling this
request.</u></p><p><b>exception</b> <pre>java.lang.RuntimeException:
org.apache.cxf.interceptor.Fault: Unable to update a stale item: item.save()

org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)

org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)

org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)

org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
</pre></p><p><b>root cause</b> <pre>org.apache.cxf.interceptor.Fault:
Unable to update a stale item: item.save()

org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)

org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)

org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)

org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)

org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
</pre></p><p><b>root cause</b> <pre>java.lang.RuntimeException:
Unable to
update a stale item: item.save()

org.apache.archiva.metadata.repository.jcr.JcrMetadataRepository.save(JcrMetadataRepository.java:1269)

org.apache.archiva.metadata.repository.RepositorySession.save(RepositorySession.java:71)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:399)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:340)

org.apache.archiva.rest.services.DefaultManagedRepositoriesService.deleteManagedRepository(DefaultManagedRepositoriesService.java:99)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)

org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)

org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)

org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)

org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
</pre></p><p><b>root cause</b> <pre>javax.jcr.InvalidItemStateException:
Unable to update a stale item: item.save()

org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:262)

org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
    org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
    org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)

org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:65)

org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
    org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
    org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)

org.apache.archiva.metadata.repository.jcr.JcrMetadataRepository.save(JcrMetadataRepository.java:1265)

org.apache.archiva.metadata.repository.RepositorySession.save(RepositorySession.java:71)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:399)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:340)

org.apache.archiva.rest.services.DefaultManagedRepositoriesService.deleteManagedRepository(DefaultManagedRepositoriesService.java:99)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)

org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)

org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)

org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)

org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
</pre></p><p><b>root cause</b>
<pre>org.apache.jackrabbit.core.state.StaleItemStateException:
dc2d997f-dfbd-425e-9961-1967dd14e3b6 has been modified externally

org.apache.jackrabbit.core.ItemSaveOperation.removeTransientItems(ItemSaveOperation.java:723)

org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:228)

org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
    org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
    org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)

org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:65)

org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
    org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
    org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)

org.apache.archiva.metadata.repository.jcr.JcrMetadataRepository.save(JcrMetadataRepository.java:1265)

org.apache.archiva.metadata.repository.RepositorySession.save(RepositorySession.java:71)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:399)

org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.deleteManagedRepository(DefaultManagedRepositoryAdmin.java:340)

org.apache.archiva.rest.services.DefaultManagedRepositoriesService.deleteManagedRepository(DefaultManagedRepositoriesService.java:99)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)

org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)

org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)

org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)

org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
</pre></p><p><b>note</b> <u>The full stack trace of the
root cause is
available in the Apache Tomcat/7.0.54 logs.</u></p><HR size="1"
noshade="noshade"><h3>Apache Tomcat/7.0.54</h3></body></html>
    at
org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:292)
    at
org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:593)
    at
org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:555)
    at
org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:213)
    at com.sun.proxy.$Proxy79.deleteManagedRepository(Unknown Source)
    at
org.apache.archiva.rest.services.AbstractArchivaRestTest.deleteTestRepo(AbstractArchivaRestTest.java:503)
    at
org.apache.archiva.rest.services.BrowseServiceTest.deleteTestRepo(BrowseServiceTest.java:345)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message