Seem that CSS parser cast the value into the wrong type. Try the example in an old java sdk from the time when that question-answer where put there. Maybe is that the new version has different and more "exquisite" and specific conversions/castings for values (typical java-guys messups). Can be any other thing, but I will start by discarding this. Then you may read this question as it deals with similar conversion problems: JavaFX - Getting class cast exception in css for blend mode