The story is this: the marijuana condonement policy in the Netherlands allows any individual to possess a "personal use quantity" of marijuana without getting arrested. How much that is varies a bit depending on how close you are to the borders, but that's a different story. Essentially it's one baggie full. Of course, this poses a bit of a problem for the coffeeshops that sell the stuff, which is why they are allowed about 500 gr by way of inventory. Where they're supposed to get that inventory is anybody's guess. Those purchases are not part of the policy. But that, too, is a different story.
What happened in Terneuzen is that Checkpoint for years - since 1996 to be precise - ran a very successful business, thanks in no small part to the fact that Terneuzen is only about a 20 mins. drive from the Belgian border. They had 5 cash registers and an annual turnover of several million euros. Because all this drug tourism started to annoy the law & order crowd more and more, in 2007 the mayor and the police decided to put an end to it. They raided the shop and found, to their extreme surprise I'm sure, that there was more than 500 grams of marijuana on the premises. To be precise, there was 4,5 kg, with another 92 kg. in a storage facility nearby. At a further raid in 2008, another 160 kg. was impounded and the coffee shop was closed. Since the terms of the condonement agreement had been violated, the court held that it had no choice but to convict the defendants of the various offences with which they had been charged. (Link, in Dutch.) The main defendant got 16 weeks in jail, of which 7 were suspended. More importantly, this meant the forfeiture of various equipment.
The Court of Appeals, however, decided to use one of the two (three?) big loopholes in Dutch criminal law. (We can argue whether a decision to convict without punishment is a loophole.) Under art. 349(1) of the Code of Criminal Procedure, the court can decide that the prosecutor "cannot be received in his prosecution". The law mentions some examples of when this happens, most importantly in various cases of prosecutorial misconduct (including serious cases of unlawfully obtained evidence), but doesn't define the term. Generally, a trial is concluded in this way in the interest of fundamental fairness, when the prosecutor has forfeited his right to prosecute in some way.
In this case, the Court of Appeals - quite rightly in my view - decided that the defendant was entitled to rely on the prosecutor not suddenly changing his de facto policy towards the coffeeshop, or rather on his not doing so without without weighing the public interest against the interest of the defendant, and without considering whether the route of administrative law should be preferred instead. Now that such a weighing did not take place, the prosecutor's right to prosecute was forfeited.
While this means that the defendant gets his stuff back, the time he spent in pre-trial arrest is gone forever. Also, it is unlikely that the coffeeshop will be able to do business as before. One way or another, it will probably have to close for good or at least drastically reduce its size, particularly when it comes to selling to foreigners. (In case anyone was wondering, selling weed to foreigners is not protected under EU law. Cf. Josemans v. Mayor of Maastricht, CJEU 16 December 2010.) After all, this criminal ruling does not affect the administrative courts' decision that the mayor was right to close the coffee shop, cf. the ruling of the Council of State of March 2011. Still, justice was done...