Project

Profile

Help

Bug #1804

closed

java.lang.ClassCastException: net.sf.saxon.type.ErrorType cannot be cast to com.saxonica.schema.UserUnionType

Added by O'Neil Delpratt almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Low
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2013-06-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Given the test case fn:error() castable as xs:error

It is causing Saxon is crash with the following exception:

java.lang.ClassCastException: net.sf.saxon.type.ErrorType cannot be cast to com.saxonica.schema.UserUnionType
	at com.saxonica.expr.ee.OptimizerEE.makeCastableToUnion(OptimizerEE.java:257)
	at net.sf.saxon.expr.parser.ExpressionParser.makeSingleTypeExpression(ExpressionParser.java:773)
	at net.sf.saxon.expr.parser.ExpressionParser.parseBinaryExpression(ExpressionParser.java:569)
	at net.sf.saxon.expr.parser.ExpressionParser.parseExprSingle(ExpressionParser.java:517)
	at net.sf.saxon.expr.parser.ExpressionParser.parseExpression(ExpressionParser.java:455)
	at net.sf.saxon.query.QueryParser.parseQuery(QueryParser.java:329)
	at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:140)
	at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:531)
	at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:454)
	at com.saxonica.testdriver.FOTestSuiteDriver.runTestCase(FOTestSuiteDriver.java:1127)
	at com.saxonica.testdriver.FOTestSuiteDriver.processTestSet(FOTestSuiteDriver.java:442)
	at com.saxonica.testdriver.FOTestSuiteDriver.processCatalog(FOTestSuiteDriver.java:397)
	at com.saxonica.testdriver.FOTestSuiteDriver.go(FOTestSuiteDriver.java:333)
	at com.saxonica.testdriver.FOTestSuiteDriver.main(FOTestSuiteDriver.java:97)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
5 successes, 4 failures, 19 incorrect ErrorCode
Actions #1

Updated by O'Neil Delpratt almost 11 years ago

  • Status changed from In Progress to Resolved

Patch committed to subversion.

In the 9.4 releases we have decided to fail more cleanly for such queries that involve xs:error with castable or @cast as@. However, these tests have been resolved in 9.5

Actions #2

Updated by O'Neil Delpratt almost 11 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.4.0.8

Bug now closed. Successfully applied to the Saxon 9.4.0.8 maintenance release.

Please register to edit this issue

Also available in: Atom PDF