The stacker optical prism in the cashbox may be dirty.
I'm assuming you have the gray/yellow-handled JCM CashFlow cash boxes?
If so, what happens is that the bill pusher mechanism inside the cashbox has an optical prism that allows infrared light to go thru so the head knows that the stacker has returned to the home position.
If the prism is dirty with dust, the computer thinks that the stacker is "open" because the light doesn't get all the way thru the plastic optics.
There's a couple of ways to clear this error.
One is to carefully position the straw of compressed directly onto the prism and blow off the dust.
Two is to rotate the gears just right with one hand, while the other hand reaches down inside behind the stacking unit and rubs the dust off the prism with a fiber towel normally used for cleaning prescription eyeglasses.
Three is to throw the whole cashbox into a washing bin with warm soapy water and hung dry.
Four is if you're lucky that the stacker has two Philips screws that you can remove to slide out the stacker to clean the prism.
Often though, instead of Philips screws, they use some sort of metal screws with a rounded rivet-type head that's very hard to get off.
You have to tap the top of the two rounded screw heads with a metal center punch, then drill a small hole into the top of the heads with a 3/64" drill bit.
Then I stick in a small reverse thread extractor, pull out the 2 screws, and the whole stacker mechanism slides right out of the cashbox.
Later after cleaning the prism, I replace the 2 screws instead with 2 small Philips wood screws of the same size.
It holds the stacker in the cashbox perfectly.
Also, sometimes there's a small black 6-pin connector to the right of the bill box on top that has a jaded connection.
I find that if I pull it out and spray the pins with some De-Oxit electronics contact cleaner, and push it back on, the pins get better contact, and the stacker error goes away.