ReST API calls with curl throw LazyInitializationException after a few POST requests

Description

[root@gernm1vmwoms01 tmp]# curl -s -u admin:admin -H "Content-Type: application/xml" -X POST --data "<category name=\"IPGW\"/>" http://10.41.29.171:8980/opennms/rest/nodes/75/categories
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' xmlns:opennms='xsds/coreweb.xsd'>
<head>
<title>

Unexpected Error |

Error |

OpenNMS Web Console
</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css"/>
<meta http-equiv="Content-Script-Type" content="text/javascript"/>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>

<!-- Set GWT property to get browsers locale -->
<meta name="gwt:property" content="locale=en_US">

<base href="http://10.41.29.171:8980/opennms/" />

<!-- -->

<link rel="stylesheet" type="text/css" href="http://10.41.29.171:8980/opennms/css/styles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://10.41.29.171:8980/opennms/css/gwt-asset.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://10.41.29.171:8980/opennms/css/onms-gwt-chrome.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://10.41.29.171:8980/opennms/css/print.css" media="print" />

<link rel="shortcut icon" href="http://10.41.29.171:8980/opennms/favicon.ico" />

<script type="text/javascript" src="http://10.41.29.171:8980/opennms/js/global.js"></script>

</head>

<body>

<!-- Header -->
<div id="header">
<h1 id="headerlogo"><a href="http://10.41.29.171:8980/opennms/index.jsp"><img src="http://10.41.29.171:8980/opennms/images/logo.png" alt="OpenNMS Web Console Home"/></a></h1>
<div id="headerinfo">
<h2>Error</h2>
<p align="right">

User: &hellip;<br/>

Tue May 06 19:32:44 UTC 2014
&nbsp;
Tue May 06 19:32:44 UTC 2014
</p>
</div>
<hr />

<div id="headernavbarright">
<div class="navbar">
<ul>
<li class="last"><a href="http://www.opennms.org/index.php/FAQ">FAQs</a></li>
</ul>
</div>
</div>

<div class="spacer"><!-- --></div>
</div>

<!-- Body -->

<div id="content">
<div class="onms">
<h2>

</h2>
</div>

<script type="text/javascript">
function toggleDiv(divName) {
var targetDiv = document.getElementById(divName);
if (! targetDiv) {
return;
}
targetDiv.style.display = (targetDiv.style.display == "none" ? "block" : "none");
}
</script>

<h3>The OpenNMS Web User Interface Has Experienced an Error</h3>
<br/>

<p>
The OpenNMS web UI has encountered an error that it does
not know how to handle.
</p>

<p>
Possible causes could be that the database is not responding,
the OpenNMS application has stopped or is not running, or there
is an issue with the servlet container.
</p>

<p>
Please bring this message to the attention of the
person responsible for maintaining OpenNMS for your organization,
and have him or her check that OpenNMS, the external servlet container
(if applicable), and the database are all running without errors.
</p>

<p>
To reveal details of the error encountered and instructions for
reporting it, click
<strong><a href="javascript:toggleDiv('errorDetails')">here</a></strong>.
</p>

<div id="errorDetails" style="display: none;">
<h3>Error Details</h3>

<p>
Please include the information below when reporting problems.
</p>

<h3>Exception Trace</h3>
<pre id="exceptionTrace">
org.hibernate.LazyInitializationException
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:119)
at org.hibernate.collection.PersistentSet.size(PersistentSet.java:162)
at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:104)
at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:72)
at org.springframework.core.style.DefaultToStringStyler.styleValue(DefaultToStringStyler.java:91)
at org.springframework.core.style.DefaultToStringStyler.styleField(DefaultToStringStyler.java:79)
at org.springframework.core.style.ToStringCreator.append(ToStringCreator.java:156)
at org.opennms.netmgt.model.OnmsCategory.toString(OnmsCategory.java:199)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at org.opennms.web.rest.OnmsCategoryResource.addCategory(OnmsCategoryResource.java:151)
at org.opennms.web.rest.OnmsCategoryResource$$FastClassByCGLIB$$3e8b683.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at org.opennms.web.rest.OnmsCategoryResource$$EnhancerByCGLIB$$138606aa.addCategory(<generated>)
at sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
at org.opennms.container.web.felix.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:52)
at org.opennms.container.web.felix.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:34)
at org.opennms.container.web.felix.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:50)
at org.opennms.container.web.felix.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:42)
at org.opennms.container.web.bridge.internal.DispatcherFilter.doFilter(DispatcherFilter.java:72)
at org.opennms.container.web.ProxyFilter.doFilter(ProxyFilter.java:58)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.opennms.web.servlet.AddAccessControlHeaderFilter.doFilter(AddAccessControlHeaderFilter.java:54)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.opennms.web.servlet.StoreRequestPropertiesFilter.doFilter(StoreRequestPropertiesFilter.java:77)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.opennms.web.springframework.security.AuthFilterEnabler.doFilter(AuthFilterEnabler.java:98)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:744)

</pre>

<h3>Request Details</h3>
<table class="standard">
<tr>
<td class="standardheader">Locale</td>
<td class="standard">en_US</td>
</tr>
<tr>
<td class="standardheader">Method</td>
<td class="standard">POST</td>
</tr>
<tr>
<td class="standardheader">Path Info</td>
<td class="standard">null</td>
</tr>
<tr>
<td class="standardheader">Path Info (translated)</td>
<td class="standard">null</td>
</tr>
<tr>
<td class="standardheader">Protocol</td>
<td class="standard">HTTP/1.1</td>
</tr>
<tr>
<td class="standardheader">URI</td>
<td class="standard">/opennms/errors/unknownexception.jsp</td>
</tr>
<tr>
<td class="standardheader">URL</td>
<td class="standard">http://10.41.29.171:8980/opennms/errors/unknownexception.jsp</td>
</tr>
<tr>
<td class="standardheader">Scheme</td>
<td class="standard">http</td>
</tr>
<tr>
<td class="standardheader">Server Name</td>
<td class="standard">10.41.29.171</td>
</tr>
<tr>
<td class="standardheader">Server Port</td>
<td class="standard">8980</td>
</tr>

</table>

<h3>System Details</h3>
<table class="standard">
<tr>
<td class="standardheader">OpenNMS Version:</td>
<td class="standard">1.12.3</td>
</tr>
<tr>
<td class="standardheader">Java Version:</td>
<td class="standard">1.7.0_51 Oracle Corporation</td>
</tr>
<tr>
<td class="standardheader">Java Virtual Machine:</td>
<td class="standard">24.51-b03 Oracle Corporation</td>
</tr>
<tr>
<td class="standardheader">Operating System:</td>
<td class="standard">Linux 2.6.32-358.el6.x86_64 (amd64)</td>
</tr>
<tr>
<td class="standardheader">Servlet Container:</td>
<td class="standard">jetty/7.6.12.v20130726 (Servlet Spec 2.5)</td>
</tr>
<tr>
<td class="standardheader">User Agent:</td>
<td class="standard">curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2</td>
</tr>
</table>

<h3>Options for Reporting This Problem</h3>
<p>
There are two options for reporting this problem outside your own organization.
</p>

<h5>OpenNMS Bug Tracker</h5>
<p>
If you have an account on the <a href="http://issues.opennms.org/">OpenNMS issue tracker</a>,
please consider reporting this problem. Bug reports help us make OpenNMS better, and are
often the only way we become aware of problems. Please do search the tracker first to check
that others have not already reported the problem that you have encountered.
</p>

<h5>OpenNMS Commercial Support</h5>
<p>
If you have a commercial support agreement with <a href="http://www.opennms.com/">The
OpenNMS Group</a>, please consider opening a support ticket about this problem at
<strong><a href="https://support.opennms.com/">support.opennms.com</a></strong> or via
e-mail. Tickets from our customers receive priority treatment from our support staff.
If you create a support ticket and the support engineer handling the ticket determines
that you have found a bug, he or she will create a record in the bug tracker.
</p>

<p>
For a plain-text version of the information above suitable for pasting into a bug report
or support ticket, click
<strong><a href="javascript:toggleDiv('plainTextErrorDetails');">here</a></strong>.
</p>

<div id="plainTextErrorDetails" style="display: none;">
<h3>Plain Text Error Details</h3>
<div class="boxWrapper">

<textarea id="plainTextArea" style="width: 100%; height: 300px;">
Please take a few moments to include a description of what you were doing when you encountered this problem. Without knowing the context of the error, it's often difficult for the person looking at the problem to narrow the range of possible causes. Bug reports that do not include any information on the context in which the problem occurred will receive a lower priority and may even be closed as invalid.

System Details
-------------- OpenNMS Version: 1.12.3
Java Version: 1.7.0_51 Oracle Corporation
Java Virtual Machine: 24.51-b03 Oracle Corporation
Operating System: Linux 2.6.32-358.el6.x86_64 amd64
Servlet Container: jetty/7.6.12.v20130726 (Servlet Spec 2.5)
User Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2

Request Details
--------------- Locale: en_US
Method: POST
Path Info: null
Path Info (translated): null
Protocol: HTTP/1.1
URI: /opennms/errors/unknownexception.jsp
URL: http://10.41.29.171:8980/opennms/errors/unknownexception.jsp
Scheme: http
Server Name: 10.41.29.171
Server Port: 8980

Exception Stack Trace
--------------------- org.hibernate.LazyInitializationException
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:119)
at org.hibernate.collection.PersistentSet.size(PersistentSet.java:162)
at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:104)
at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:72)
at org.springframework.core.style.DefaultToStringStyler.styleValue(DefaultToStringStyler.java:91)
at org.springframework.core.style.DefaultToStringStyler.styleField(DefaultToStringStyler.java:79)
at org.springframework.core.style.ToStringCreator.append(ToStringCreator.java:156)
at org.opennms.netmgt.model.OnmsCategory.toString(OnmsCategory.java:199)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at org.opennms.web.rest.OnmsCategoryResource.addCategory(OnmsCategoryResource.java:151)
at org.opennms.web.rest.OnmsCategoryResource$$FastClassByCGLIB$$3e8b683.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at org.opennms.web.rest.OnmsCategoryResource$$EnhancerByCGLIB$$138606aa.addCategory(<generated>)
at sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
at org.opennms.container.web.felix.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:52)
at org.opennms.container.web.felix.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:34)
at org.opennms.container.web.felix.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:50)
at org.opennms.container.web.felix.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:42)
at org.opennms.container.web.bridge.internal.DispatcherFilter.doFilter(DispatcherFilter.java:72)
at org.opennms.container.web.ProxyFilter.doFilter(ProxyFilter.java:58)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.opennms.web.servlet.AddAccessControlHeaderFilter.doFilter(AddAccessControlHeaderFilter.java:54)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.opennms.web.servlet.StoreRequestPropertiesFilter.doFilter(StoreRequestPropertiesFilter.java:77)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.opennms.web.springframework.security.AuthFilterEnabler.doFilter(AuthFilterEnabler.java:98)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:744)

</textarea>

</div>

</div>

<script type="text/javascript">
var reportArea = document.getElementById("plainTextArea");
</script>

<!-- End of Content -->
<div class="spacer"><!-- --></div>

</div><!-- id="content" -->

<!-- Footer -->

<div id="prefooter"></div>

<div id="footer">
<p>
OpenNMS <a href="support/about.jsp">Copyright</a> &copy; 2002-2013
<a href="http://www.opennms.com/">The OpenNMS Group, Inc.</a>
OpenNMS&reg; is a registered trademark of
<a href="http://www.opennms.com">The OpenNMS Group, Inc.</a>
</p>
</div>

</body>
</html>

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jeff Gehlbach May 6, 2014 at 3:54 PM

I suspect this problem is peculiar to the /nodes/N/categories end-point, and related to the way we expose expose the group-category permission mappings via Hibernate.

My Hibernate-fu is pretty weak, so this is about all I can offer at the moment.

Richard Kheir May 6, 2014 at 3:43 PM

Regarding my earlier comment, I have figured out how to use JSESSIONID with --cookie and even with that, some curl calls throw the same exception...

Richard Kheir May 6, 2014 at 3:37 PM

Can anyone please help me with a workaround? jeffg suggested setting jsessionid in curl but I could not figure out how to do that. My script makes about 300 curl calls to categorize nodes, any help with setting jsessionid in my calls would be much appreciated.

Details

Assignee

Reporter

Doc Backlog Status

Components

Affects versions

Priority

PagerDuty

Created May 6, 2014 at 3:35 PM
Updated July 26, 2023 at 2:17 PM