Skip to main content
Participant
August 10, 2011
Question

how can i fix this error. i' m taking a class and this is preventing me from finishing the class.

  • August 10, 2011
  • 1 reply
  • 546 views

can you tell me how to fix this i have a class for the army i am trying to finish but this error on one of the class' will not allow me to take that class and move forward to the next i have a dead line.
can you tell me how to fix this.


java.lang.NullPointerException
     at com.saba.client.player.NewRedirectURLCommand.doExecute(NewRedirectURLCommand.java:370)
     at com.saba.web.dk.AbstractCommand.execute(AbstractCommand.java:165)
     at _SabaSite._content._players._redirect_content_url_new.executeCommand(_redirect_content_url_new.java:132)
     at _SabaSite._content._players._redirect_content_url_new.populateDocument(_redirect_content_url_new.java:897)
     at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
     at com.saba.web.engine.SabaXSPPage.getDocument(SabaXSPPage.java:106)
     at com.saba.web.engine.SabaXSPProcessor.process(SabaXSPProcessor.java:663)
     at org.apache.cocoon.Engine.handle(Engine.java:401)
     at org.apache.cocoon.Cocoon.service(Cocoon.java:185)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
     at com.saba.servlet.SabaCharacterSetFilter.doFilter(SabaCharacterSetFilter.java:85)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
     at com.saba.web.security.DataDecryptionFilter.doFilter(DataDecryptionFilter.java:37)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
     at com.saba.web.tools.MonitorHttpRequestFilter.doFilter(MonitorHttpRequestFilter.java:57)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
     at com.saba.tools.loadtest.ParamCaptureRequestFilter.doFilter(ParamCaptureRequestFilter.java:72)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    This topic has been closed for replies.

    1 reply

    Inspiring
    August 10, 2011

    Null pointer errors can be a right PitA to troubleshoot on CF, because the errors occur in the Java layer beneath CF, so the error msgs don't point to the relevant bit of CF code.

    However... seeing the code that's running when the error occurs always helps.

    You could also stick a <cfabort> in your code and move it progressively "down" the source code until the error is thrown, which'll give you a better idea of what code is causing the problem.

    --

    Adam

    Participant
    August 11, 2011

    ok so your speaking a language i do not understand i am in the army and do

    know understand computer codes i am not very computer savy i know how to

    turn it on and make what i need to work work thats it. if you could dumb it

    down for me and give me an idea on how to do this my self in a simple way

    that would help a bunch.

    Inspiring
    August 11, 2011

    Basically what I asked is can you show us the code that is erroring.

    Other than that I suggested that if you weren't getting a specific line number where the error is occurring - which you probably won't get with a null-pointer error - then you could insert a <cfabort> tag part way down your code - eg: half-way - and see if the code stops erroring... if so, it suggests the problem code is AFTER that line in the file.  So move the <cfabort> down further, and test again... repeat this until you start getting the error again, and you will then isolate where the problem code is.

    EG:

    <cfset a = 1>
    <cfset b = 1>
    <cfset c = 1>
    <cfset d = 1>
    <cfset e = 1>
    <cfset f = 1>
    <cfset g = 1>
    <cfset h = 1 / 0><!--- this will error --->
    <cfset i = 1>
    <cfset j = 1>

    This gives an error.  If you updated your code like this:

    <cfset a = 1>
    <cfset b = 1>
    <cfset c = 1>
    <cfset d = 1>
    <cfset e = 1>

    HERE

    <cfabort>
    <cfset f = 1>
    <cfset g = 1>
    <cfset h = 1 / 0><!--- this will error --->
    <cfset i = 1>
    <cfset j = 1>

    you will get "HERE" on the screen... so you know processing never got to the line that errors, so the line that errors must be AFTER where you put the <cfabort>.  So you move it down a bit:

    <cfset a = 1>
    <cfset b = 1>
    <cfset c = 1>
    <cfset d = 1>
    <cfset e = 1>

    <cfset f = 1>

    <cfset g = 1>

    HERE

    <cfabort>

    <cfset h = 1 / 0><!--- this will error --->
    <cfset i = 1>
    <cfset j = 1>

    Still no error, so it must be further down still. Move the <cfabort> again:

    <cfset a = 1>
    <cfset b = 1>
    <cfset c = 1>
    <cfset d = 1>
    <cfset e = 1>

    <cfset f = 1>

    <cfset g = 1>

    <cfset h = 1 / 0><!--- this will error --->

    <cfset i = 1>

    HERE

    <cfabort>

    <cfset j = 1>

    Now you WILL get the error, so you will know that the erroring line of code must be be between <cfset g=1> and <cfset j=1>.

    It's just a way of narrowing down where an error occurs.

    Althernatively, if you are using ColdFusion Builder as your code editor, you could set up debugging and run your code through the debugger, and you can find your error that way.

    --

    Adam