EJB3在Jboss部署报错(MBeans waiting for other MBeans,网上有和我报错一样的,但是按照他们给的方法不能解决)谢谢!
网上有和我报错一样的,但是按照他们给的方法不能解决,报错如下
21:31:26,734 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jar=jpa_01.jar,name=PersonManagerBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:unitName=test
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:unitName=test
State: NOTYETINSTALLED
Depends On Me:
jboss.j2ee:jar=jpa_01.jar,name=PersonManagerBean,service=EJB3
网上给的解决办法是
1,Copy "mysql-connector-java-5.0.8-bin.jar"到"#\jboss-4.2.2.GA\server\default\lib"下
2,Copy "mysql-ds.xml"到"#\jboss-4.2.2.GA\server\default\deploy"下
我走做过了,但是没有效果。
我值部署了一个实体Bean,JPA。
注入了一下EntityManager
@PersistenceContext(unitName ="test")
protected EntityManager em ;
就报这个错误!
那位知道帮忙解决一下,急!!!谢谢
------解决方案--------------------不知道啊,帮忙顶
------解决方案--------------------哎,你给的信息好像不多,看不出来什么呢
------解决方案--------------------比如说,你的 ds 文件是怎么写的,你的 Session Bean 代码是什么
------解决方案--------------------继续关注!
------解决方案--------------------把这个
<jta-data-source>java:MySqlDS</jta-data-source>
改成这个再试试看,也就是在冒号后面加个“/”
<jta-data-source>java:/MySqlDS</jta-data-source>
------解决方案--------------------XML code
<?xml version="1.0" encoding="UTF-8"?>
<!-- Persistence deployment descriptor for dev profile -->
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="test">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/MySqlDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="none"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="false"/>
</properties>
</persistence-unit>
</persistence>