I'm new to Java, and I am trying to import a project from GitHub into Intellij just to get the hang of it. I get an error message when I try to build the solution, and it is saying that the package "com.sun.org.apache.xpath.internal.operations" does not exist. Does anybody know whats wrong? Would really appreciate answers.
I've got this problem and I don't know how to solve this.
I would like to use XPath in the WebSphere 6 Server.I put the Xalan 2.7.1 into the lib folder in the Web-Inf
and all a got is this error-msg:java.lang.NoSuchMethodError: org.apache.xpath.XPathContext: method (Z)V not foundWhat I'm doing wrong?thanks for your helpMarkus
When I try to leverage the compile only (but with ! on the org.apache.xerces*, org.apache.xpath* and javax.xml.xpath* dependencies I get a linkage error and/or NoClassDefFound for javax.xml.xpath.XPathFactory
And the stacktrace is still showing xalan.
lucee.runtime.exp.NativeException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Could not find function: format-date javax.xml.transform.TransformerException: Could not find function: format-date at lucee.runtime.exp.NativeException.newInstance(NativeException.java:73) at lucee.runtime.op.Caster.toPageException(Caster.java:3201) at lucee.runtime.op.Caster.toPageException(Caster.java:3176) at lucee.runtime.functions.xml.XmlTransform.call(XmlTransform.java:54) at lucee.runtime.functions.xml.XmlTransform.call(XmlTransform.java:39) at xsl_body_cfm$cf.call(/xsl_body.cfm:55) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:897) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:842) at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:63) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2408) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2398) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2366) at lucee.runtime.engine.Request.run(Request.java:34) Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Could not find function: format-date javax.xml.transform.TransformerException: Could not find function: format-date at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:925) at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:771) at lucee.runtime.text.xml.XMLUtil.transform(XMLUtil.java:1048) at lucee.runtime.functions.xml.XmlTransform.call(XmlTransform.java:51) ... 10 more Caused by: org.xml.sax.SAXException: Could not find function: format-date javax.xml.transform.TransformerException: Could not find function: format-date at org.apache.xalan.processor.XSLTAttributeDef.processAVT(XSLTAttributeDef.java:526) at org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:1393) at org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1601) at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:355) at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:267) at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:283) at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207) at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917) ... 13 more Caused by: javax.xml.transform.TransformerException: Could not find function: format-date at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:610) at org.apache.xpath.compiler.XPathParser.FunctionCall(XPathParser.java:1507) at org.apache.xpath.compiler.XPathParser.PrimaryExpr(XPathParser.java:1446) at org.apache.xpath.compiler.XPathParser.FilterExpr(XPathParser.java:1345) at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1278) at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1236) at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1142) at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1063) at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1005) at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:930) at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:870) at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:834) at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:807) at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:790) at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:129) at org.apache.xpath.XPath.(XPath.java:227) at org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:152) at org.apache.xalan.templates.AVT.(AVT.java:308) at org.apache.xalan.processor.XSLTAttributeDef.processAVT(XSLTAttributeDef.java:520) ... 24 more
This is not the real problem. If you try to run in 1.5 without overriding
the built in XML support with some version of Xalan and Xerces, then you
discover that there is a bunch of imports and dependencies on explcit
org.apache.xml and org.apache.xpath classes (Serializer for example) that
are not exposed under that name in a vanilla JAXP stack. It is, therefore,
unlikely that uPortal will run in a raw 1.5 environment. It requires some
version of Xerces. If you add Xerces 2.6.x "endorsed" to Tomcat it overrides
the XML built into 1.5 and you don't have to change anything. If you wait
for Xerces 2.7.0, which will support DOM 3, and put it in the endorsed
library then you will have to change PortalDocumentImpl to support the DOM3
methods but that is all you will have to change. A third more bizarre option
exists today. You can run 1.5, and then put into the endorsed directory the
version of 1.5 source distributed by Sun for earlier releases. This is
distributed as six jar files and includes a xercesimpl jar which claims to
provide the org.apache.xml classes. This is functionally equivalent to
waiting for 2.7.0 because it would be a DOM3 stack with JAXP 1.3 support,
but it would also have the old Xerces concrete classes we depend on.