Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.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
Spring boot IllegalStateException:未能内省类_Spring Boot_Websphere Liberty_Ibm Jdk - Fatal编程技术网

Spring boot IllegalStateException:未能内省类

Spring boot IllegalStateException:未能内省类,spring-boot,websphere-liberty,ibm-jdk,Spring Boot,Websphere Liberty,Ibm Jdk,我试图在我的SpringBoot应用程序上实现扩展功能,@ComponentScan应该在类路径中的一个单独的jar中扫描bean定义 @ComponentScan如下所示 @ComponentScan({"com.myapp.rest","com.mycompany.search.rest"}) 其中包“com.mycompany.search.rest”将出现在外部jar ESExt.jar中 我在WebSphereLiberty服务器的server

我试图在我的SpringBoot应用程序上实现扩展功能,@ComponentScan应该在类路径中的一个单独的jar中扫描bean定义

@ComponentScan如下所示

@ComponentScan({"com.myapp.rest","com.mycompany.search.rest"})
其中包“com.mycompany.search.rest”将出现在外部jar ESExt.jar中

我在WebSphereLiberty服务器的
server.xml
文件中添加了以下配置,以包括用于类路径扫描的外部文件夹

<library id="extention" apiTypeVisibility="+third-party, -api">
  <fileset dir="${server.config.dir}/ext" includes="*.jar" scanInterval="5s" />
</library>

<webApplication id="Myapp" location="Myapp.war" type="war" name="Myapp" contextRoot="/resources">
    <classloader commonLibraryRef="extention" />
</webApplication>
下面是jar-tf ESExt.jar的输出

META-INF/
META-INF/MANIFEST.MF
com/
com/mycompany/
com/mycompany/search/
com/mycompany/search/rest/
com/mycompany/search/rest/StoreResource.class

此异常
IllegalStateException:Failed to introspect Class
甚至是什么意思?我甚至在互联网上找不到任何关于它的信息。

通过如下更改
server.xml解决了这个问题

<library id="extension">
    <fileset dir="${server.config.dir}/ext" includes="*.jar" scanInterval="5s" />
</library>
    
<webApplication id="Myapp" location="Myapp.war" type="war" name="Myapp" contextRoot="/resources">
    <classloader commonLibraryRef="extension" delegation="parentFirst"/>
</webApplication>

<library id="extension">
    <fileset dir="${server.config.dir}/ext" includes="*.jar" scanInterval="5s" />
</library>
    
<webApplication id="Myapp" location="Myapp.war" type="war" name="Myapp" contextRoot="/resources">
    <classloader commonLibraryRef="extension" delegation="parentFirst"/>
</webApplication>