我有同樣的事情。我需要將類加載器設置爲PARENT_LAST,但設置呈灰色。我通過在您的ear項目的META-INF/ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp中手動放置deployment.xml文件(下面的內容)來「解決」它。
<?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1212499072929">
<deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1212499072929" startingWeight="10">
<modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1212499072929" startingWeight="10000" uri="yourwarproject.war" classloaderMode="PARENT_LAST"/>
<classloader xmi:id="Classloader_1212499072929" mode="PARENT_LAST"/>
</deployedObject>
</appdeployment:Deployment>
希望這會有所幫助。