1 Reply Latest reply on May 27, 2010 10:46 AM by Kobi Ianko

    error in deploying EJB3

    paresh bhavsar Newbie

      Hi,

       

      I am having below mentioned persistence.xml.

       

      <

      persistence-unit name="eksOracle">

       

      <jta-data-source>java:OracleDS</jta-data-source>

       

      <properties>

       

      <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />

       

      </properties>

       

      </persistence-unit>

       

      =============================================

       

      i am using

      @PersistenceContext

       

      (unitName="eksOracle")

       

      private EntityManager entityManager;

       

      in my DAO and getting following error.

       


      2010-05-24 19:10:51,729 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (HDScanner) Stopping jboss.j2ee:jar=TestEJB.jar,name=MstConceptFacade,service=EJB3
      2010-05-24 19:10:51,729 INFO  [org.jboss.ejb3.EJBContainer] (HDScanner) STOPPED EJB: com.eks.ias.service.core.entity.MstConceptFacade ejbName: MstConceptFacade
      2010-05-24 19:10:51,729 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=jboss.j2ee:jar=TestEJB.jar,name=MstConceptFacade,service=EJB3 state=Create
      java.lang.ClassCastException: $Proxy947 cannot be cast to javax.naming.Context
      at org.jboss.util.naming.Util.createSubcontext(Util.java:70)

       

      please let me know where i am mistaking in injecting EntityManager...