cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1362
Views
2
Helpful
5
Replies

A built-in element encountered an exception of type java.lang.NullPointerException

Jeff Russell
Level 1
Level 1

I have a custom CVP (8.5.1) element that accepts some parameters, then makes a web service call that calls a stored procdure to insert a record that stores the DTMF (and associated answer ID) after a user makes a selection from a modified menu element.

If my menu has three options, I get no errors when I select option 1 or 3, but only with option 2 (error in title). Also, when I execute the CVP application in our test environment, there are no errors. When I deploy to our Production VXML server, I get this error.

I checked the configurations of both elements in the "test" and "production" environments, and both are the same. Here is the stack trace that is posted from the error log:

TC_Lupron_GetBack_001,02/27/2014 07:59:48.609,A built-in element encountered an exception of type java.lang.NullPointerException. The error was: java.lang.NullPointerException

java.lang.NullPointerException

at com.spanlink.trialcard.data.voice.TC_AddSurveyQApair.addXmlBody(TC_AddSurveyQApair.java:121)

at com.audium.server.voiceElement.VoiceElementBase.getVoiceElementResult(VoiceElementBase.java:706)

at com.audium.server.voiceElement.VoiceElementBase.service(VoiceElementBase.java:484)

at com.audium.server.controller.Controller.goToVoiceElement(Controller.java:2779)

at com.audium.server.controller.Controller.goToElement(Controller.java:2681)

at com.audium.server.controller.Controller.continueCall(Controller.java:2511)

at com.audium.server.controller.Controller.doPost(Controller.java:733)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

at java.lang.Thread.run(Thread.java:662)

Any ideas as to why this element runs great on one server and not in another? Thanks in advance...

1 Accepted Solution

Accepted Solutions

Jeff Russell
Level 1
Level 1

I found out what the error was. At the start of the CVP application, I have an element that sets survey question/answer pairs (to be utilized in other elements in the CVP application) in the following format: QuestionID:DTMF_Value1|AnswerID1,DTMF_Value2|AnswerID2, etc.

The element that I referred to in the original post, accepts a Question ID, and then parses out the corresponding Answer ID based upon the DTMF value the user selects. The issue was I had a question answer pair in the following format:

QuestionID:DTMF_Value1|AnswerID1,<space>DTMF_Value2|AnswerID2 The space between each DTMF/AnswerID pair caused the NullPointerException. Thanks everyone for their help...

View solution in original post

5 Replies 5

janinegraves
Spotlight
Spotlight

What are you executing at this line in your java code?

TC_AddSurveyQApair.java:121

janinegraves
Spotlight
Spotlight

And are both (test and prod) vxml servers running identical versions of

VXML Server?

Are they both configured the same way?

Maybe there's a firewall issue? Or a database that's configured in test

but not prod?

hemal.mehta
Level 5
Level 5

You are obviously triggering a condition in production that is causing null pointer to happen. It is most likely caused by the data set being different in prod. You need to check your code and fix it and put the check for null variable.

Hemal

Jeff Russell
Level 1
Level 1

I found out what the error was. At the start of the CVP application, I have an element that sets survey question/answer pairs (to be utilized in other elements in the CVP application) in the following format: QuestionID:DTMF_Value1|AnswerID1,DTMF_Value2|AnswerID2, etc.

The element that I referred to in the original post, accepts a Question ID, and then parses out the corresponding Answer ID based upon the DTMF value the user selects. The issue was I had a question answer pair in the following format:

QuestionID:DTMF_Value1|AnswerID1,<space>DTMF_Value2|AnswerID2 The space between each DTMF/AnswerID pair caused the NullPointerException. Thanks everyone for their help...

Glad you found the problem - those s wreak havoc all over the

place with Studio/VXML Server!

Can you mark the question as answered on the DevNet?

Thanks, Janine