我正在使用wildfly 10.0.x. 而且我遷移到EJB2.1 ejb3.2 所以這是我的ejb-jar.xml文件:Entity Beans不再受支持
<?xml version="1.0"?>
<ejb-jar version="3.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd">
<description>www.cedar.com - Collaborative Planning</description>
<display-name>CP - J2EE</display-name>
<enterprise-beans>
<!-- BudgetCycleEditorSession -->
<session>
<description>no description</description>
<display-name>BudgetCycleEditorSessionSEJB</display-name>
<ejb-name>BudgetCycleEditorSessionSEJB</ejb-name>
<!--//<startUserCode BudgetCycleEditorSession-ws-endpoint-->
<!--//<endUserCode BudgetCycleEditorSession-ws-endpoint-->
<home>com.cedar.cp.ejb.api.model.BudgetCycleEditorSessionHome</home>
<remote>com.cedar.cp.ejb.api.model.BudgetCycleEditorSessionRemote</remote>
<local-home>com.cedar.cp.ejb.api.model.BudgetCycleEditorSessionLocalHome</local-home>
<local>com.cedar.cp.ejb.api.model.BudgetCycleEditorSessionLocal</local>
<ejb-class>com.cedar.cp.ejb.impl.model.BudgetCycleEditorSessionSEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/ModelLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.cedar.cp.ejb.impl.model.ModelLocalHome</local-home>
<local>com.cedar.cp.ejb.impl.model.ModelLocal</local>
<ejb-link>ModelEEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/DimensionLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.cedar.cp.ejb.impl.dimension.DimensionLocalHome</local-home>
<local>com.cedar.cp.ejb.impl.dimension.DimensionLocal</local>
<ejb-link>DimensionEEJB</ejb-link>
</ejb-local-ref>
<resource-ref>
<res-ref-name>jdbc/fc</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/oa</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/ad</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/db2</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jms/cp/TopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>jms/cp/entityEventTopic</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</session>
<entity>
<description>MODEL table entity bean</description>
<display-name>ModelEEJB</display-name>
<ejb-name>ModelEEJB</ejb-name>
<local-home>com.cedar.cp.ejb.impl.model.ModelLocalHome</local-home>
<local>com.cedar.cp.ejb.impl.model.ModelLocal</local>
<ejb-class>com.cedar.cp.ejb.impl.model.ModelEEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.cedar.cp.dto.model.ModelPK</prim-key-class>
<reentrant>false</reentrant>
<resource-ref>
<res-ref-name>jdbc/fc</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked/>
<method>
<ejb-name>ModelEEJB</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
<container-transaction>
<method><ejb-name>ModelEEJB</ejb-name><method-name>*</method-name></method><trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
但我不能部署此EJB服務器。
23:05:46,635錯誤[org.jboss.msc.service.fail](MSC服務線程1-2)MSC000001:無法啓動服務jboss.deployment.unit。「cppro.war」.PARSE:org服務jboss.deployment.unit中的.jboss.msc.service.StartException。「cppro.war」.PARSE:WFLYSRV0153:未能在org.jboss.as.server.deployment中處理部署「cppro.war」 的階段PARSE。 DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154) at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl。 java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolEx ecutor $ Worker.run(未知源) at java.lang.Thread.run(Unknown Source) 引起:org.jboss.as.server.deployment.DeploymentUnitProcessingException:WFLYEJB0450:不再支持實體Bean,bean ModelEEJB不能在org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147) 在org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.deploy(EjbJarParsingDeploymentUnitProcessor.java:179) 部署 。 .. 5更多
我該如何解決?
這可以幫助你:http://www.oracle.com/technetwork/articles/vohra-ejb-086603.html – Manuel
非常感謝您 –
請給我另一種答案 –