Hi Sam,Thanks for reply.
I have declared my directory path.
Code:
String myFolderName = "c:/myfolder";
and then i have set parameter like this
Code:
trans.setParameter("dir", myFolderName);
trans.transform(new StreamSource(xmlFileName), new StreamResult(myFolderName));
and in my xslt i have declared like this ..
Code:
<xsl:param name="dir"/>
<xsl:variable name="filename" select="resolve-uri(concat($dir,'/',position(),'.xml'))" />
i got below exception when i perform
trans.transform(new StreamSource(xmlFileName), new StreamResult(myFolderName));
i dont know what the problem is .
Can anybody help ?
=================== Exception ================
java.lang.NoClassDefFoundError: oracle/i18n/text/OraCollator
at oracle.xml.xqxp.functions.builtIns.FNUtil.getColla tor(FNUtil.java:329)
at oracle.xml.xqxp.datamodel.OXMLItem.compareValue(OX MLItem.java:898)
at oracle.xml.xpath.XPathItem.compareValue(XPathItem. java:372)
at oracle.xml.xpath.XPathSequence.compareGeneral(XPat hSequence.java:1253)
at oracle.xml.xpath.ComparisonExpr.evaluate(XSLExpr.j ava:1505)
at oracle.xml.xpath.XPathPredicate.filter(XPathPredic ate.java:197)
at oracle.xml.xpath.XSLExprBase.filterPredicates(XSLE xprBase.java:415)
at oracle.xml.xpath.XPathVarReference.evaluate(XPathV arReference.java:145)
at oracle.xml.xslt.XSLForEach.processAction(XSLForEac h.java:124)
at oracle.xml.xslt.XSLNode.processChildren(XSLNode.ja va:480)
at oracle.xml.xslt.XSLTemplate.processAction(XSLTempl ate.java:205)
at oracle.xml.xslt.XSLStylesheet.execute(XSLStyleshee t.java:580)
at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcess or.java:313)
at oracle.xml.jaxp.JXTransformer.transform(JXTransfor mer.java:381)
at com.celtic.ccview.dao.db2sp.ConvertXMLtoDatabaseDb 2sp.insertXMLdataIntoTable(ConvertXMLtoDatabaseDb2 sp.java:68)
at com.celtic.ccview.service.impl.T0020andT0026Import ServiceImpl.validateAndUpdateXMLFileData(T0020andT 0026ImportServiceImpl.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy7.validateAndUpdateXMLFileData(Unknown Source)
at com.celtic.ccview.service.T0020andT0026ImportServi ceTest.testValidateAndUpdateXMLFileData(T0020andT0 026ImportServiceTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestM ethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMet hod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(Meth odRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBefores ThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(Me thodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(Method Roadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invok eTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMe thods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run (JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotec ted(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtecte d(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(J Unit4ClassRunner.java:42)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:197)