0 Replies Latest reply on May 21, 2010 7:32 AM by maamir

    Persistence Units not Found

    maamir

      My persistence.xml file is located here.

      earfile.ear/jarFile.jar/META_INF/persistence.xml

       

      I have defined persistence units in persistence.xml file see below:

      <persistence-unit name="LoanAccounting" transaction-type="JTA">

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

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

              <jar-file>../customFields.jar</jar-file>

              <jar-file>../entities-core.jar</jar-file>

       

              <properties>

                  <property name="hibernate.ejb.cfgfile"

                            value="META-INF/hibernate-server.cfg.xml"/>

                  <property name="jboss.entity.manager.jndi.name"

                            value="java:/LoanAccountingEntityManager"/>

                  <property name="jboss.entity.manager.factory.jndi.name"

                            value="java:/LoanAccountingEntityManagerFactory"/>

                  <property name="hibernate.cache.jndi"

                            value="java:/LoanAccounting-cache"/>

       

                  <!-- These properties must be in this file, putting them in the

                       hibernate.cfg.xml file will result in them being ignored. -->

                  <property name="hibernate.cache.use_query_cache"

                            value="true"/>

                  <property name="hibernate.cache.use_second_level_cache"

                            value="true"/>

                  <property name="hibernate.cache.provider_class"

                            value="com.illuminatics.util.RequiredEhCacheProvider"/>

                  <property name="net.sf.ehcache.configurationResourceName"

                            value="/ehcache.xml"/>

       

                  <property name="hibernate.connection.release_mode"

                            value="after_transaction"/>

              </properties>

          </persistence-unit>

       

      and in the same ear i have a quartz.sar file (earFile/quartz.sar)

      and  have file jboss-service.xml file in earFile/quartz.sar/META-INF/jboss-service.xml

       

      see contents below:

       

      <mbean code="org.quartz.ee.jmx.jboss.QuartzService"
                 name="user:service=QuartzService,name=QuartzService">
              <!--
              Wait until the DataSources deployed.  This option
              ensures correct deployment order at JBoss startup.
              -->
              <depends>
                  jboss.jca:name=LoanAccountingDS,service=LocalTxCM
              </depends>
              <depends>
                  jboss.jca:name=LoanAccountingDS,service=DataSourceBinding
              </depends>
              <depends>
                  jboss.jca:name=LoanAccountingDS,service=ManagedConnectionFactory
              </depends>
              <depends>
                  jboss.jca:name=LoanAccountingDS,service=ManagedConnectionPool
              </depends>
              <depends>
                  persistence.units:ear=evolv-server.ear,unitName=LoanAccounting
              </depends>

       

              <depends>
                  jboss.jca:name=ReportingLoanAccountingReportingDS,service=LocalTxCM
              </depends>
              <depends>
                  jboss.jca:name=ReportingLoanAccountingReportingDS,service=DataSourceBinding
              </depends>
              <depends>
                  jboss.jca:name=ReportingLoanAccountingReportingDS,service=ManagedConnectionFactory
              </depends>
              <depends>
                  jboss.jca:name=ReportingLoanAccountingReportingDS,service=ManagedConnectionPool
              </depends>
              <depends>
                  persistence.units:ear=evolv-server.ear,unitName=Rpt
              </depends>

       

              <!--
                JNDI name for locating Scheduler, "Quartz" is default.
              -->
              <attribute name="JndiName">Quartz</attribute>

       

              <!--
                Initialized the SchedulerFactory with the contents
                of the given Properties object.
              -->
              <attribute name="Properties">
                  org.quartz.scheduler.instanceId = AUTO
                  org.quartz.scheduler.instanceName = LoanAccountingQuartzScheduler
                  org.quartz.scheduler.rmi.export = false
                  org.quartz.scheduler.rmi.proxy = false
                  org.quartz.scheduler.xaTransacted = true
                  org.quartz.scheduler.wrapJobExecutionInUserTransaction = true
                  org.quartz.scheduler.userTransactionURL=UserTransaction
                 
                  org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
                  org.quartz.threadPool.threadCount = 5
                  org.quartz.threadPool.threadPriority = 5

       

                  org.quartz.jobStore.class = com.illuminatics.util.quartz.ClusteredJobStore
                  org.quartz.jobStore.dataSource = LoanAccountingDS
                  org.quartz.jobStore.nonManagedTXDataSource = LoanAccountingDS
                  org.quartz.jobStore.tablePrefix = QRTZ_
                  org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
                  org.quartz.jobStore.misfireThreshold = 60000

       

                  org.quartz.dataSource.LoanAccountingDS.jndiURL = java:/LoanAccountingDS
              </attribute>
          </mbean>

       

      I am aceessing persistence.unitname in this file and getting error listed below:

      DEPLOYMENTS  MISSING DEPENDENCIES:
         Deployment  "illuminatics.com:service=JobScheduling" is missing the  following  dependencies:
           Dependency  "user:name=QuartzService,service=QuartzService" (should  be in state  "Create", but is actually in state "Configured")
         Deployment  "user:name=QuartzService,service=QuartzService" is missing  the  following dependencies:
           Dependency  "persistence.units:ear=evolv-server.ear,unitName=Rpt"  (should be in  state "Create", but is actually in state "** NOT FOUND  Depends on '
      persistence.units:ear=evolv-server.ear,unitName=Rpt' **")
            Dependency   "persistence.units:ear=evolv-server.ear,unitName=LoanAccounting"  (should  be in state "Create", but is actually in state "** NOT FOUND D
      epends on   'persistence.units:ear=evolv-server.ear,unitName=LoanAccounting' **")

       

      DEPLOYMENTS IN ERROR: 
         Deployment  "persistence.units:ear=evolv-server.ear,unitName=Rpt" is in  error due  to the following reason(s): ** NOT FOUND Depends on  'persistence.un
      its:ear=evolv-server.ear,unitName=Rpt' **
         Deployment   "persistence.units:ear=evolv-server.ear,unitName=LoanAccounting" is in   error due to the following reason(s): ** NOT FOUND Depends on 'per
      sistence.units:ear=evolv-server.ear,unitName=LoanAccounting' **

       

       

      Any body have this error in deployment of in JBoss 5.0.1. If any please reply and suggest a solution.