This discussion is archived
1 Reply Latest reply: Apr 29, 2010 11:45 PM by odie_63 RSS

NoClassDefFoundError: oracle/i18n/text/OraCollator while running xquery

769550 Newbie
Currently Being Moderated
While running the following query, for extracting all the namespaces defined in the xml document, I am running into java.lang.NoClassDefFoundError: oracle/i18n/text/OraCollator exception (stack pasted in the end). I have xquery.jar and xmlparser2.jar in the classpath. Please also note I am getting this exception only when distinct-values function is used. Is this function supported?

I might be missing some required jar. Can someone please point me what jar I am missing and where can I get that jar.

     for $b in distinct-values(
for $i in (doc("XMLDocument.xml")//* | doc("XMLDocument.xml")//@*)
return namespace-uri($i)

Exception in thread "main" java.lang.NoClassDefFoundError: oracle/i18n/text/OraCollator
     at oracle.xml.xqxp.functions.builtIns.FNUtil.getCollator(
     at oracle.xml.xqxp.functions.builtIns.DistinctValue.invoke(
     at oracle.xml.xqxp.functions.builtIns.DistinctValue.invoke(
     at oracle.xquery.exec.FunctionCall.EvaluateJavaFunction(
     at oracle.xquery.exec.FunctionCall.Evaluate(
     at oracle.xquery.exec.Expr.getIterator(
     at oracle.xquery.exec.Scan$ScanNSIterator.Start(
     at oracle.xquery.exec.FilterProject$FilterProjectIterator.Start(
     at oracle.xquery.exec.FLWR$FLWRIterator.Restart(
     at oracle.xquery.exec.XMLElem.EvalDirectCons(
     at oracle.xquery.exec.XMLElem.Evaluate(
     at oracle.xquery.exec.Expr.getIterator(
     at oracle.xquery.exec.ExprSequence$ExprSequenceIterator.Restart(
     at migrate.MigrateTest.test(
     at migrate.MigrateTest.main(
Caused by: java.lang.ClassNotFoundException: oracle.i18n.text.OraCollator
     at Method)
     at java.lang.ClassLoader.loadClass(
     at sun.misc.Launcher$AppClassLoader.loadClass(
     at java.lang.ClassLoader.loadClass(
     at java.lang.ClassLoader.loadClassInternal(
     ... 17 more

Thaks in advance.

Malkit S. Bhasin


  • Correct Answers - 10 points
  • Helpful Answers - 5 points