Discussions

EJB programming & troubleshooting: Code on Websphere 3.5.3 giving error when using Xalan

  1. I have wriiten a code which for XSL transformation that runs fine on Tomcat with xalan.jar and j2ee.jar in my classpath. But when using the same in Websphere it gives following error:

    org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found


    StackTrace:
    --------------------------------------------------------------------------------
    Root Error-1: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found
    java.lang.NoSuchMethodError: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found
         at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:177)
         at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:434)
         at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java(Compiled Code))
         at org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:568)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:796)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:752)
         at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:927)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1519)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
         at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)
         at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)
         at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
         at in.co.motech.timesheet.conrolclasses.MUPDom.createFile(MUPDom.java:95)
         at in.co.motech.timesheet.conrolclasses.MUPDom.createDom(MUPDom.java(Compiled Code))
         at in.co.motech.timesheet.conrolclasses.ReportGenDataBean.createReport(ReportGenDataBean.java(Compiled Code))
         at in.co.motech.timesheet.servlets.ReportGenServlet.service(ReportGenServlet.java:56)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
         at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
         at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
         at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java(Compiled Code))
         at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:221)
         at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutOfProcThread.java:248)
         at java.lang.Thread.run(Thread.java:481)
         
  2. Hi,

    Check that the two version of Xalan are the same on the two servers.

    You may need to update the one on Websphere or but the other one first in the class path.

    Owen