*** CONTEXTS MISSING DEPENDENCIES ** -- error -JPA(Hibernate
shivaji.byrapaneni Apr 7, 2009 8:29 AM
Hi Floks,
im quite new to Jboss and JPA
am just tryying out for a sample JPA program using Hibernates implementation and am facing issue
Here is my persistence.xml
<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="jpaTest" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/__default</jta-data-source> <mapping-file>orm.xml</mapping-file> <class>jpa.entity.PlanType</class> <properties> <property name="hibernate.connection.driver_class" value=" oracle.jdbc.driver.OracleDriver" /> <property name="hibernate.connection.username" value="scott" /> <property name="hibernate.connection.password " value="tiger" /> <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:xe" /> <property name=" hibernate.connection.dialect" value="org.hibernate.dialect.Oracle9Dialect" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> </properties> </persistence-unit> </persistence>
but when i tried to deploy the jar file or the application containing this example im getting this error
17:43:31,829 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=EJB3-J.jar,name=SLSBTest,service=EJB3) to KernelDeployment of: EJB3-J.jar 17:43:32,047 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State} jboss.j2ee:jar=EJB3-J.jar,name=SLSBTest,service=EJB3 -> <UNKNOWN jboss.j2ee:jar=EJB3-J.jar,name=SLSBTest,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=#jpaTest' **} persistence.unit:unitName=#jpaTest -> jboss.jca:name=jdbc/__default,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=jdbc/__default,service=DataSourceBinding' **} *** CONTEXTS IN ERROR: Name -> Error jboss.jca:name=jdbc/__default,service=DataSourceBinding -> ** NOT FOUND Depends on 'jboss.jca:name=jdbc/__default,service=DataSourceBinding' ** <UNKNOWN jboss.j2ee:jar=EJB3-J.jar,name=SLSBTest,service=EJB3> -> ** UNRESOLVED Demands 'persistence.unit:unitName=#jpaTest' ** 17:43:32,063 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
please help me in resolving the issue
if possible pls let me know how can i use the data source instead of the user name and pwd provided in this way..?