• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot create Case because cached CaseID is 0.

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I inherited this project from another person/entity. What should I do first to figure out where the error is coming from?


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

javax.servlet.ServletException: Cannot create Case because cached CaseID is 0.
bcc.lib.BaseBccServlet.doPost(BaseBccServlet.java:106)
bcc.lib.BaseBccServlet.doGet(BaseBccServlet.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.servlet.ServletException: Cannot create Case because cached CaseID is 0.
bcc.lib.BasePDF.doServletFunction(BasePDF.java:75)
bcc.lib.BaseBccServlet.doPost(BaseBccServlet.java:102)
bcc.lib.BaseBccServlet.doGet(BaseBccServlet.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

java.lang.Exception: Cannot create Case because cached CaseID is 0.
bcc.lib.Context.getCase(Context.java:758)
bcc.lib.dob.DocumentElement.caseElements(DocumentElement.java:335)
bcc.lib.dob.RDocument.getCaseElements(RDocument.java:213)
bcc.lib.BasePDF.getElements(BasePDF.java:120)
bcc.lib.BasePDF.doServletFunction(BasePDF.java:62)
bcc.lib.BaseBccServlet.doPost(BaseBccServlet.java:102)
bcc.lib.BaseBccServlet.doGet(BaseBccServlet.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

 
Rob Spoor
Sheriff
Pie
Posts: 20559
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out where the exception came from by following the stack trace. The root at the bottom would be the place to start:
java.lang.Exception: Cannot create Case because cached CaseID is 0.
bcc.lib.Context.getCase(Context.java:758)

Check out class bcc.lib.Context, line 758. That's where the exception is thrown from. If the issue is caused by some invalid parameter, go to the next line (class bcc.lib.dob.DocumentElement, line 335). Continue until you've either found the cause or have reached code from Sun/Oracle's code (or any other 3rd party library you use).
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Line 335 is this:

Case c = ctx.getCase( getAgent() );

Thanks,
Michele

P.S. I believe that in order to properly debug this I need a server installed and run it in debug mode, do you?
 
Winston Gutkowski
Bartender
Pie
Posts: 10430
63
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michele Smith wrote:Line 335 is this:
Case c = ctx.getCase( getAgent() );
P.S. I believe that in order to properly debug this I need a server installed and run it in debug mode, do you?

I don't see why. Assuming that ctx.getCase() is known to work (???), my first thought would be: why does getAgent() return a value (0?) that causes the error. If you still can't see it, then fire up a debugger.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic