我正在将遗留代码迁移到java 8,并在将Spring版本更改为3.2.10.RELEASE并将其部署在jboss 4.2.3上后,我得到了:
2014-09-02 05:57:57,396 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/project/SA/opt/jboss-4.2.3.GA/server/sa/deploy/sa/sa-pmt-service-1.0.4-SNAPSHOT-dev.sar
org.jboss.deployment.DeploymentException: MBean attribute 'name' must be given.
at org.jboss.system.ServiceConfigurator.parseObjectName(ServiceConfigurator.java:783)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
在jdk 7编译版本上运行正常。这是jboss-service.xml
<server>
<loader-repository>
com.sa:loader=pmt-password-service.sar
<loader-repository-config>java2ParentDelegation=true
</loader-repository-config>
</loader-repository>
<mbean code="com.ems.services.common.ServiceInvoker" name="jmx.service.ems:name=SAS_PMTPasswordService,version=1.0"
xmbean-dd="resource:META-INF/serviceinvoker-xmbean.xml">
<attribute name="Service">SAS_PMTPasswordService</attribute>
</mbean>
<mbean code="com.sa.services.pmtsender.PmtMomService"
xmbean-dd="resource:META-INF/serviceinvoker-xmbean.xml">
<attribute name="Listener">pmtMessageListener</attribute>
<attribute name="MomServiceName">pmt-service</attribute>
<attribute name="active">true</attribute>
</mbean>
</server>