Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 将外部JAR导入WebSphereLiberty?[NoClassDefFoundError]_Eclipse_Jakarta Ee_Websphere_Websphere Liberty - Fatal编程技术网

Eclipse 将外部JAR导入WebSphereLiberty?[NoClassDefFoundError]

Eclipse 将外部JAR导入WebSphereLiberty?[NoClassDefFoundError],eclipse,jakarta-ee,websphere,websphere-liberty,Eclipse,Jakarta Ee,Websphere,Websphere Liberty,我想在WebSphereLiberty上运行的JAX-RS应用程序中使用它 我已经做了以下工作: 1) 右键单击项目->属性->Java构建路径->添加外部Jar->C:\javalib\quick-json.Jar 2) 将C:\javalib添加到环境变量类路径 3) 已将文件集xml添加到serverl.xml <library id="ExternalLibs"> <fileset dir="C:\javalib" includes="*.jar"/> &

我想在WebSphereLiberty上运行的JAX-RS应用程序中使用它

我已经做了以下工作:

1) 右键单击项目->属性->Java构建路径->添加外部Jar->C:\javalib\quick-json.Jar

2) 将C:\javalib添加到环境变量类路径

3) 已将文件集xml添加到serverl.xml

<library id="ExternalLibs">
    <fileset dir="C:\javalib" includes="*.jar"/>
</library>
第一步足以让它编译。现在,我得到了一个运行时错误。我会感激你的帮助

在server.xml中的应用程序定义中还需要一个
元素,该元素引用共享库。比如说,



或者,如果应用程序是库的唯一用户,则可以将其打包到war的WEB-INF/lib文件夹中。(将它放在Eclipse的WebContent/lib中应该可以实现这一点。)

javadir中唯一的jar是json吗?非常感谢!我昨晚浪费了两三个小时,没弄明白。如果我可以询问的话,你是从哪里得到这个信息的?仅供我将来参考。我使用了,尽管这实际上是RAD文档。此站点()上的websphere标记有指向各种文档的链接。WebSphere Application Server文档中的相应链接如下:@HollyCummins我面临一个简单Spring Web应用程序的Liberty共享库配置问题。您能帮我解决这个问题吗
The JNDI lookup failed for JNDI name java:module/ConsoleREST with the following Exception CNTR4007E: An error occurred creating the websphere.jaxrs.service.ConsoleREST interface for the ConsoleREST enterprise bean in the WebApiConsole.war module in the WebApiConsole application. The enterprise bean look up failed using the java:module/ConsoleREST JNDI name. Exception: com/json/parsers/JsonParserFactory.
CNTR4007E: An error occurred creating the websphere.jaxrs.service.ConsoleREST interface for the ConsoleREST enterprise bean in the WebApiConsole.war module in the WebApiConsole application. The enterprise bean look up failed using the java:module/ConsoleREST JNDI name. Exception: com/json/parsers/JsonParserFactory