gpt4 book ai didi

java - JBoss 7 类未找到错误

转载 作者:行者123 更新时间:2023-11-29 05:10:54 28 4
gpt4 key购买 nike

尝试在 JBoss 7 中部署新的 ear 文件并尝试访问服务时出现以下错误:

16:17:39,114 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app-ejb-1.0-SNAPSHOT].[MyServicesBean]] (http--10.232.165.117-8080-1) Servlet.service() for servlet MyServicesBean threw exception: java.util.MissingResourceException: Could not instantiate factory delegate, got exception(s): java.lang.ClassNotFoundException: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] java.lang.ClassNotFoundException: com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl from [Module "deployment.my-app-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader] at weblogic.xml.jaxp.Utils.getDelegate(Utils.java:28) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.WebLogicTransformerFactory.(WebLogicTransformerFactory.java:79) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.RegistryTransformerFactory.(RegistryTransformerFactory.java:62) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at weblogic.xml.jaxp.RegistrySAXTransformerFactory.(RegistrySAXTransformerFactory.java:12) [wlfullclient5-12.1.3.0.0.jar:12.1.3.0.0] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_65] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_65] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_65] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_65] at __redirected.__TransformerFactory.(__TransformerFactory.java:111) [jboss-modules.jar:1.1.1.GA] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_65] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_65]

你能建议如何解决这个问题吗?

最佳答案

这个问题可能是因为你的项目中没有xalan库。

因此,您可以将它添加到 http://mvnrepository.com/artifact/xalan/xalan/2.7.2 的项目中或者您可以通过创建一个 jboss-deployment-structure.xml 文件来使用包含在 JBoss 服务器中的那个:

<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.apache.xalan" />
</dependencies>
</deployment>
</jboss-deployment-structure>

如果你有任何问题 - 添加 xerces 库:

<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.apache.xalan" />
<module name="org.apache.xerces" />
</dependencies>
</deployment>
</jboss-deployment-structure>

希望这对您有所帮助。

附言关于 JBoss 中类加载的 JBoss 文档:https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

关于java - JBoss 7 类未找到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28586088/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com