This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 412
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: 19655
    
  18

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: 412
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: 7552
    
  18

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot create Case because cached CaseID is 0.
 
Similar Threads
netbeans 5.5 + Jboss 4.0.4 + EJB 3.0
java.lang.IllegalArgumentException: No bean specified
Jboss portal starting issue
jar file issue
error message.