[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-discuss
Subject:    RE: [opennms-discuss] Cannot make changes to unmanaging services
From:       Aaron Paxson <apaxson () decorativeconcepts ! com>
Date:       2005-04-27 5:03:47
Message-ID: 45C467706C40D441B8EB80F39FE465F70401DF8D () ncemail ! ncegifts ! com
[Download RAW message or body]

DJ,

Awesome, man!  But, unfortunately I don't this is what is exactly happening,
although, I think it's very close.  The error does not come up when I access
the page the first time, which means, that allNodes is not null at that
point in time.  

It occurs when I remove a single service and 'submit'.  My guess is, it's
happening when the page gets reloaded with the new values? I've done this
very quickly, so I do not believe it's a timeout issue.  At least, not the
Tomcat session.

I believe you are on the right track though.  I'm not sure how the
getAttribute("listAll.manage.jsp") works.

-----Original Message-----
From: DJ Gregor [mailto:dgregor@interhack.com] 
Sent: Tuesday, April 26, 2005 6:12 PM
To: opennms-discuss@lists.sourceforge.net
Subject: Re: [opennms-discuss] Cannot make changes to unmanaging services

Hello.

First off, many thanks for letting us know which version of OpenNMS you are
running.  That, along with the stack trace lets us know exactly where this
is happening.  See below for the detailed description, but the short answer
is that I think your browser sat at the "Manage/unmanage services" page for
awhile before you continued on, and at that point you got the error.  In
particular, I think that your session expired in the Tomcat web server,
which I think happens after 10 minutes of no access or something like that.

Here is the code in question:

	....

	HttpSession userSession = request.getSession(false);
	java.util.List allNodes = null;

	if (userSession != null) {
		allNodes = (java.util.List)
userSession.getAttribute("listAll.manage.jsp");
	}

	...

	for (int j = 0; j < allNodes.size(); j++) {
	...

That last line is 130, which is the one that threw the NullPointerException.
If you notice, it is possible for the allNodes variable to be set to null if
userSession is null (which would be the case if you hadn't access the webapp
in awhile), or if the attribute "listAll.manage.jsp" in your session is not
set or null (I'm not sure  
of the cases where this would happen--it probably isn't too common).   
My guess is that your session expired.

See bug 869 for an issue related to this, but I think we should have a more
general bug open to cleanly and sanely deal with expired sessions in the
webapp.  Feel like opening up a bug?


	- djg

On Apr 26, 2005, at 12:12 PM, Aaron Paxson wrote:

> I am currently running onms 1.2.2 using Redhat9 and jdk1.4.1.
>
> When I go to "Manage/Unmanage interfaces/services", I remove the 
> HTTP-8080 service from a node, and once I click, submit I receive the 
> following error:
>
> java.lang.NullPointerException
>          at
> org.opennms.web.admin.nodeManagement.ManageNodesServlet.doPost(ManageN
> o
> desServlet.java:130)
>          at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>          at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>          at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> c
> ationFilterChain.java:247)
>          at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> l
> terChain.java:193)
>          at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> l
> ve.java:260)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:643)
>          at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 480)
>          at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>          at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
> l
> ve.java:191)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:643)
>          at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat
> o
> rBase.java:550)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:641)
>          at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 480)
>          at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>          at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java: 
> 2415)
>          at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
> v
> a:180)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:643)
>          at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
> V
> alve.java:170)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:641)
>          at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
> v
> a:172)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:641)
>          at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 480)
>          at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>          at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
> e
> .java:174)
>          at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
> invokeNext(StandardPipeline.java:643)
>          at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
> 480)
>          at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>          at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java)
>          at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java)
>          at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
> s
> Connection(Http11Protocol.java)
>          at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 
> 534)
>          at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
> o
> l.java:530)
>          at java.lang.Thread.run(Thread.java:534)
>
>
> Any ideas?
>
> Aaron Paxson
> IT Manager, Network Operations
> Decorative Concepts, Inc
> Aldik Artifical Flowers, New Creative Enteprises, Teters Floral 
> Products www.decorativeconcepts.com
>
>  



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net Plus
IDC's 2005 look-ahead and a copy of this survey Click here to start!
http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://wiki.opennms.org/tiki-index.php?page=MailingListFaq

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this
page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://wiki.opennms.org/tiki-index.php?page
opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic