aspose file tools*
The moose likes Java in General and the fly likes Cannot create Case because cached CaseID is 0. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Cannot create Case because cached CaseID is 0." Watch "Cannot create Case because cached CaseID is 0." New topic
Author

Cannot create Case because cached CaseID is 0.

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
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

Joined: Oct 27, 2005
Posts: 19757
    
  20

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).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
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

Joined: Mar 17, 2011
Posts: 8180
    
  23

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


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cannot create Case because cached CaseID is 0.