michalbali / droolsbook

Automatically exported from code.google.com/p/droolsbook
8 stars 6 forks source link

"Approve Event" link exceptions in sampleApplication on null sessionId #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and install the "Drools JBoss Rules 5.0" source code for
   the sampleApplication
2. Bring up the web application: Add a customer, Fill out a loan request,
check the task list.
3. Click on the "Approve Event" link.

What is the expected output? What do you see instead?
Expected is a refresh of the "customerList.htm" page.  Instead:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is java.lang.NumberFormatException: null

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:583)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501
)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

root cause

java.lang.NumberFormatException: null
        java.lang.Integer.parseInt(Integer.java:443)
        java.lang.Integer.valueOf(Integer.java:570)

droolsbook.sampleApplication.web.ApproveEventController.handleRequestInternal(Ap
proveEventController.java:45)

org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractCon
troller.java:153)

org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Simple
ControllerHandlerAdapter.java:48)

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:875)

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:807)

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:571)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501
)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

What version of the product are you using? On what operating system?
Download as of 2 Dec 2009.  Linux OS Fedora 11.  I had to insert a
"?sessionId=1" to the end of the "approveEvent.htm" entry on the
CustomerList.jsp source code.

Please provide any additional information below.
Thanks for the book.  It is an essential guide to Drools and a lot of other
technology that is useful.

Original issue reported on code.google.com by harri...@gmail.com on 2 Jan 2010 at 11:09

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for reporting this. As you've correctly found out you need to pass a 
sessionId 
parameter to the approveEvent.html

Please see the book for more details.

Original comment by michalb...@gmail.com on 28 Apr 2010 at 9:22