问题
I am migrating a legacy code to java 8 and after changing the Spring version to 3.2.10.RELEASE and deploying it on jboss 4.2.3 I am getting:
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)
It was running fine on jdk 7 compiled version. Here is 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>
来源:https://stackoverflow.com/questions/25625304/jboss-4-2-3-fails-to-deploy-java-8-compiled-mbean