简体   繁体   English

罐装Java xslt时不起作用

[英]Java xslt not working when jared

My problem only occurs when I jar my application. 我的问题仅在我打包应用程序时发生。 It works fine from under eclipse. 在日食下工作正常。

This is what loggs: 这是loggs:

javax.xml.transform.TransformerConfigurationException: Cannot find external method 'com.intellgis.saxonTransformExtensions.TransformCoordinates.convertGMLPosList' (must be public) javax.xml.transform.TransformerConfigurationException:找不到外部方法“ com.intellgis.saxonTransformExtensions.TransformCoordinates.convertGMLPosList”(必须是公开的)

(I also get similar errors for methods that are in other libraries I wrote earlier) (对于我之前编写的其他库中的方法,我也会遇到类似的错误)

From what I can think of it probably occurs because the system java doesn't have the correct classpath specified. 从我的想法来看,可能是因为系统java没有指定正确的类路径。

The question is: 问题是:

How can I fix it (add a classpath to the xsl file). 我该如何解决(将类路径添加到xsl文件)。

Update: 更新:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
    <classpathentry kind="lib" path="lib/gt-api-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/gt-epsg-wkt-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/gt-main-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/gt-metadata-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/gt-opengis-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/gt-referencing-2.7.5.jar"/>
    <classpathentry kind="lib" path="lib/jai_core-1.1.3.jar"/>
    <classpathentry kind="lib" path="lib/jsr-275-1.0-beta-2.jar"/>
    <classpathentry kind="lib" path="lib/jts-1.8.jar"/>
    <classpathentry kind="lib" path="lib/resolver.jar"/>
    <classpathentry kind="lib" path="lib/saxonTransformExtension.jar"/>
    <classpathentry kind="lib" path="lib/serializer.jar"/>
    <classpathentry kind="lib" path="lib/vecmath-1.3.2.jar"/>
    <classpathentry kind="lib" path="lib/xalan.jar"/>
    <classpathentry kind="lib" path="lib/xercesImpl.jar"/>
    <classpathentry kind="lib" path="lib/xercesSamples.jar"/>
    <classpathentry kind="lib" path="lib/xml-apis.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Your eclipse project has defined some dependencies which are not part of the standard jvm, otherwise your eclipse project cannot find the com.intellgis classes. 您的eclipse项目已定义了一些不属于标准jvm的依赖项,否则eclipse项目无法找到com.intellgis类。

You need to add these jars to your classpath by either setting the CLASS_PATH environment variable or passing it on to the java or javaw executable. 您需要通过设置CLASS_PATH环境变量或将其传递给java或javaw可执行文件,将这些jar添加到类路径中。 More information on this can be found on the tools documentation http://docs.oracle.com/javase/tutorial/essential/environment/paths.html 可以在工具文档http://docs.oracle.com/javase/tutorial/essential/environment/paths.html中找到有关此内容的更多信息。

See also this http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html 另请参见此http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java bouncy-castle KeyAgreement.getInstance 适用于 eclipse 但抛出异常:JCE 在 jared 时无法验证提供者 BC - java bouncy-castle KeyAgreement.getInstance works in eclipse but throws Exception: JCE cannot authenticate the provider BC when jared Java XSLT无法正常工作 - Java XSLT not working as expected java Web应用程序和xslt-更改xml / xslt文件时会发生什么? - java web app and xslt - what happens when xml/xslt files get changed? 在另一台机器上运行时,Java XSLT处理会引发TransformerConfigurationException - Java XSLT processing throws TransformerConfigurationException when run on another machine 转换 XML 时,无法在 XSLT 中找到 href。 Java - Unable find href within XSLT, when transforming XML. Java In Java, no TransformerException is thrown while performing XSLT transformation when I send a bad XML ( XML with no tags mentioned in XSLT) - In Java , no TransformerException is thrown while performing XSLT transformation when I send a bad XML ( XML with no tags mentioned in XSLT) 从xslt调用Java静态方法时出错 - Error when calling java static method from xslt 尝试在 xslt (Java JDK 8) 中调用 javascript function 时出错 - Error when try to call javascript function in xslt (Java JDK 8) 在XSLT中调用Java方法 - Calling Java Methods in XSLT 如何在xslt中使用Java - how to use java in xslt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM