0 Replies Latest reply on Feb 3, 2006 3:19 PM by Tom

    Deployment Dependency Not Working

    Tom Newbie

      Hi all,

      I am trying to deploy a hibernate service that uses a datasource. But, when JBoss starts the service attempts to deploy before the datasource even though I have a tag that specifies the datasource.

      Can anybody explain to me why it is not working?

      Cheers
      Tom

      Hibernate MBean Service XML
      -----------------------------------

      <server>
       <mbean code="org.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
       name=HibernateFactory">
       <depends>jboss.jca:service=RARDeployer</depends>
       <depends>jboss.jca:service=LocalTxCM,name=PostgresDS</depends>
       <attribute name="MapResources">com/camp/common/accounting/ApplicationAccounting.hbm.xml,
       com/camp/common/action/Action.hbm.xml,
       com/camp/common/cabin/Cabin.hbm.xml,
       com/camp/common/cabin/CabinAssignment.hbm.xml,
       com/camp/common/cabin/CabinAssignmentCamper.hbm.xml,
       com/camp/common/cabin/CabinAssignmentStaff.hbm.xml,
       com/camp/common/camper/Camper.hbm.xml,
       com/camp/common/creditcard/CreditCard.hbm.xml,
       com/camp/common/config/global/GlobalConfigSetting.hbm.xml,
       com/camp/common/config/user/Principal.hbm.xml,
       com/camp/common/config/user/PrincipalRole.hbm.xml,
       com/camp/common/config/user/Role.hbm.xml,
       com/camp/common/config/user/UserConfigSetting.hbm.xml,
       com/camp/common/country/Country.hbm.xml,
       com/camp/common/family/Family.hbm.xml,
       com/camp/common/family/FamilyStatus.hbm.xml,
       com/camp/common/inquiry/InquiryStatus.hbm.xml,
       com/camp/common/inquiry/Inquiry.hbm.xml,
       com/camp/common/medical/CamperMedicalIncident.hbm.xml,
       com/camp/common/medical/MedicalCategory.hbm.xml,
       com/camp/common/medical/MedicalIncidentLocation.hbm.xml,
       com/camp/common/medical/StaffMedicalIncident.hbm.xml,
       com/camp/common/menu/Menu.hbm.xml,
       com/camp/common/menu/MenuItem.hbm.xml,
       com/camp/common/menu/MenuItemParam.hbm.xml,
       com/camp/common/registration/Registration.hbm.xml,
       com/camp/common/registration/RegistrationMedical.hbm.xml,
       com/camp/common/registration/RegistrationSession.hbm.xml,
       com/camp/common/payment/RegistrationPayment.hbm.xml,
       com/camp/common/charge/RegistrationCharge.hbm.xml,
       com/camp/common/report/Report.hbm.xml,
       com/camp/common/report/ReportGroup.hbm.xml,
       com/camp/common/report/ReportOrder.hbm.xml,
       com/camp/common/report/ReportParameter.hbm.xml,
       com/camp/common/school/School.hbm.xml,
       com/camp/common/search/Search.hbm.xml,
       com/camp/common/search/SearchItem.hbm.xml,
       com/camp/common/session/Session.hbm.xml,
       com/camp/common/staff/Staff.hbm.xml,
       com/camp/common/staff/StaffPosition.hbm.xml,
       com/camp/common/staff/StaffYearly.hbm.xml,
       com/camp/common/staff/StaffAdvance.hbm.xml,
       com/camp/common/state/State.hbm.xml,
       com/camp/common/transport/TransportDestination.hbm.xml,
       com/camp/common/transport/TransportLeg.hbm.xml,
       com/camp/common/transport/TransportType.hbm.xml</attribute>
       <attribute name="JndiName">java:/CAMP/HibernateFactory</attribute>
       <attribute name="Datasource">java:/PostgresDS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
       <attribute name="ShowSqlEnabled">true</attribute>
       <attribute name="SecondLevelCacheEnabled">false</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
       <attribute name="QueryCacheEnabled">false</attribute>
       </mbean>
      </server>
      

      Datasource XML
      -------------------
      <datasources>
       <local-tx-datasource>
       <jndi-name>PostgresDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost/camp</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>username</user-name>
       <password>password</password>
       </local-tx-datasource>
      </datasources>
      

      Output Log
      -------------

      ....
      ....
      12:48:21,860 INFO [MailService] Mail Service bound to java:/Mail
      12:48:22,551 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/jboss-ha-local-jdbc.rar
      12:48:22,671 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/jboss-ha-xa-jdbc.rar
      12:48:22,761 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/jboss-local-jdbc.rar
      12:48:22,842 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/jboss-xa-jdbc.rar
      12:48:22,942 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/jms/jms-ra.rar
      12:48:23,012 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/local/jboss-4.0.3RC1/
      server/default/deploy/mail-ra.rar
      12:48:23,733 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss
      .jca:name=DefaultDS,service=DataSourceBinding to JNDI name 'java:DefaultDS'
      12:48:24,013 INFO [A] Bound to JNDI name: queue/A
      12:48:24,013 INFO [B] Bound to JNDI name: queue/B
      12:48:24,013 INFO [C] Bound to JNDI name: queue/C
      12:48:24,013 INFO [D] Bound to JNDI name: queue/D
      12:48:24,013 INFO [ex] Bound to JNDI name: queue/ex
      12:48:24,053 INFO [testTopic] Bound to JNDI name: topic/testTopic
      12:48:24,053 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      12:48:24,053 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      12:48:24,063 INFO [testQueue] Bound to JNDI name: queue/testQueue
      12:48:24,113 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
      12:48:24,153 INFO [DLQ] Bound to JNDI name: queue/DLQ
      12:48:24,334 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager
      'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding to JNDI name 'java:JmsXA'
      12:48:24,394 INFO [HibernateServiceMBean] starting service at JNDI name: java:/CAMP/HibernateFactory
      12:48:24,394 INFO [HibernateServiceMBean] service properties: {hibernate.session_factory_name=java:/CAMP/HibernateFacto
      ry, hibernate.connection.datasource=java:/PostgresDS}
      12:48:24,424 INFO [Environment] Hibernate 3.1alpha1
      12:48:24,434 INFO [Environment] hibernate.properties not found
      12:48:24,434 INFO [Environment] using CGLIB reflection optimizer
      12:48:24,434 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      12:48:24,564 INFO [Configuration] Reading mappings from resource: com/camp/common/accounting/ApplicationAccounting.hbm.
      xml
      12:48:24,664 INFO [HbmBinder] Mapping class: com.camp.common.accounting.ApplicationAccounting -> tblApplicationAccounti
      ng
      12:48:24,804 INFO [Configuration] Reading mappings from resource: com/camp/common/action/Action.hbm.xml
      12:48:24,824 INFO [HbmBinder] Mapping class: com.camp.common.action.Action -> tblAction
      12:48:24,824 INFO [Configuration] Reading mappings from resource: com/camp/common/cabin/Cabin.hbm.xml
      12:48:24,844 INFO [HbmBinder] Mapping class: com.camp.common.cabin.Cabin -> tblCabin
      12:48:24,844 INFO [Configuration] Reading mappings from resource: com/camp/common/cabin/CabinAssignment.hbm.xml
      12:48:24,864 INFO [HbmBinder] Mapping class: com.camp.common.cabin.CabinAssignment -> tblCabinAssignment
      12:48:24,874 INFO [Configuration] Reading mappings from resource: com/camp/common/cabin/CabinAssignmentCamper.hbm.xml
      12:48:24,884 INFO [HbmBinder] Mapping class: com.camp.common.cabin.CabinAssignmentCamper -> tblCabinAssignmentCamper
      12:48:24,884 INFO [Configuration] Reading mappings from resource: com/camp/common/cabin/CabinAssignmentStaff.hbm.xml
      12:48:24,894 INFO [HbmBinder] Mapping class: com.camp.common.cabin.CabinAssignmentStaff -> tblCabinAssignmentStaff
      12:48:24,894 INFO [Configuration] Reading mappings from resource: com/camp/common/camper/Camper.hbm.xml
      12:48:24,915 INFO [HbmBinder] Mapping class: com.camp.common.camper.Camper -> tblCamper
      12:48:24,925 INFO [Configuration] Reading mappings from resource: com/camp/common/creditcard/CreditCard.hbm.xml
      12:48:24,945 INFO [HbmBinder] Mapping class: com.camp.common.creditcard.CreditCard -> tblCreditCard
      12:48:24,945 INFO [Configuration] Reading mappings from resource: com/camp/common/config/global/GlobalConfigSetting.hbm
      .xml
      12:48:24,955 INFO [HbmBinder] Mapping class: com.camp.common.config.global.GlobalConfigSetting -> tblGlobalConfig
      12:48:24,955 INFO [Configuration] Reading mappings from resource: com/camp/common/config/user/Principal.hbm.xml
      12:48:24,975 INFO [HbmBinder] Mapping class: com.camp.common.config.user.Principal -> tblPrincipal
      12:48:24,975 INFO [Configuration] Reading mappings from resource: com/camp/common/config/user/PrincipalRole.hbm.xml
      12:48:24,985 INFO [HbmBinder] Mapping class: com.camp.common.config.user.PrincipalRole -> tblPrincipalRole
      12:48:24,985 INFO [Configuration] Reading mappings from resource: com/camp/common/config/user/Role.hbm.xml
      12:48:24,995 INFO [HbmBinder] Mapping class: com.camp.common.config.user.Role -> tblRole
      12:48:25,485 INFO [Configuration] Reading mappings from resource: com/camp/common/config/user/UserConfigSetting.hbm.xml

      12:48:25,495 INFO [HbmBinder] Mapping class: com.camp.common.config.user.UserConfigSetting -> tblUserConfig
      12:48:25,505 INFO [Configuration] Reading mappings from resource: com/camp/common/country/Country.hbm.xml
      12:48:25,505 INFO [HbmBinder] Mapping class: com.camp.common.country.Country -> tblCountry
      12:48:25,505 INFO [Configuration] Reading mappings from resource: com/camp/common/family/Family.hbm.xml
      12:48:25,525 INFO [HbmBinder] Mapping class: com.camp.common.family.Family -> tblFamily
      12:48:25,545 INFO [Configuration] Reading mappings from resource: com/camp/common/family/FamilyStatus.hbm.xml
      12:48:25,545 INFO [HbmBinder] Mapping class: com.camp.common.family.FamilyStatus -> tblFamilyStatus
      12:48:25,545 INFO [Configuration] Reading mappings from resource: com/camp/common/inquiry/InquiryStatus.hbm.xml
      12:48:25,555 INFO [HbmBinder] Mapping class: com.camp.common.inquiry.InquiryStatus -> tblInquiryStatus
      12:48:25,555 INFO [Configuration] Reading mappings from resource: com/camp/common/inquiry/Inquiry.hbm.xml
      12:48:25,565 INFO [HbmBinder] Mapping class: com.camp.common.inquiry.Inquiry -> tblInquiry
      12:48:25,575 INFO [Configuration] Reading mappings from resource: com/camp/common/medical/CamperMedicalIncident.hbm.xml

      12:48:25,585 INFO [HbmBinder] Mapping class: com.camp.common.medical.CamperMedicalIncident -> tblCamperMedicalIncident
      12:48:25,595 INFO [Configuration] Reading mappings from resource: com/camp/common/medical/MedicalCategory.hbm.xml
      12:48:25,595 INFO [HbmBinder] Mapping class: com.camp.common.medical.MedicalCategory -> tblMedicalCategory
      12:48:25,605 INFO [Configuration] Reading mappings from resource: com/camp/common/medical/MedicalIncidentLocation.hbm.x
      ml
      12:48:25,605 INFO [HbmBinder] Mapping class: com.camp.common.medical.MedicalIncidentLocation -> tblMedicalIncidentLocat
      ion
      12:48:25,616 INFO [Configuration] Reading mappings from resource: com/camp/common/medical/StaffMedicalIncident.hbm.xml
      12:48:25,626 INFO [HbmBinder] Mapping class: com.camp.common.medical.StaffMedicalIncident -> tblStaffMedicalIncident
      12:48:25,626 INFO [Configuration] Reading mappings from resource: com/camp/common/menu/Menu.hbm.xml
      12:48:25,636 INFO [HbmBinder] Mapping class: com.camp.common.menu.Menu -> tblMenu
      12:48:25,636 INFO [Configuration] Reading mappings from resource: com/camp/common/menu/MenuItem.hbm.xml
      12:48:25,646 INFO [HbmBinder] Mapping class: com.camp.common.menu.MenuItem -> tblMenuItem
      12:48:25,646 INFO [Configuration] Reading mappings from resource: com/camp/common/menu/MenuItemParam.hbm.xml
      12:48:25,656 INFO [HbmBinder] Mapping class: com.camp.common.menu.MenuItemParam -> tblMenuItemParam
      12:48:25,666 INFO [Configuration] Reading mappings from resource: com/camp/common/registration/Registration.hbm.xml
      12:48:25,676 INFO [HbmBinder] Mapping class: com.camp.common.registration.Registration -> tblRegistration
      12:48:25,686 INFO [Configuration] Reading mappings from resource: com/camp/common/registration/RegistrationMedical.hbm.
      xml
      12:48:25,696 INFO [HbmBinder] Mapping class: com.camp.common.registration.RegistrationMedical -> tblRegistrationMedical

      12:48:25,696 INFO [Configuration] Reading mappings from resource: com/camp/common/registration/RegistrationSession.hbm.
      xml
      12:48:25,706 INFO [HbmBinder] Mapping class: com.camp.common.registration.RegistrationSession -> tblRegSession
      12:48:25,706 INFO [Configuration] Reading mappings from resource: com/camp/common/payment/RegistrationPayment.hbm.xml
      12:48:25,716 INFO [HbmBinder] Mapping class: com.camp.common.payment.RegistrationPayment -> tblRegistrationPayment
      12:48:25,716 INFO [Configuration] Reading mappings from resource: com/camp/common/charge/RegistrationCharge.hbm.xml
      12:48:25,736 INFO [HbmBinder] Mapping class: com.camp.common.charge.RegistrationCharge -> tblRegistrationCharge
      12:48:25,736 INFO [Configuration] Reading mappings from resource: com/camp/common/report/Report.hbm.xml
      12:48:25,746 INFO [HbmBinder] Mapping class: com.camp.common.report.Report -> tblReport
      12:48:25,746 INFO [Configuration] Reading mappings from resource: com/camp/common/report/ReportGroup.hbm.xml
      12:48:25,756 INFO [HbmBinder] Mapping class: com.camp.common.report.ReportGroup -> tblReportGroup
      12:48:25,756 INFO [Configuration] Reading mappings from resource: com/camp/common/report/ReportOrder.hbm.xml
      12:48:25,766 INFO [HbmBinder] Mapping class: com.camp.common.report.ReportOrder -> tblReportOrderBy
      12:48:25,766 INFO [Configuration] Reading mappings from resource: com/camp/common/report/ReportParameter.hbm.xml
      12:48:25,776 INFO [HbmBinder] Mapping class: com.camp.common.report.ReportParameter -> tblReportParameter
      12:48:25,776 INFO [Configuration] Reading mappings from resource: com/camp/common/school/School.hbm.xml
      12:48:25,786 INFO [HbmBinder] Mapping class: com.camp.common.school.School -> tblSchool
      12:48:25,786 INFO [Configuration] Reading mappings from resource: com/camp/common/search/Search.hbm.xml
      12:48:25,796 INFO [HbmBinder] Mapping class: com.camp.common.search.Search -> tblSearch
      12:48:25,796 INFO [Configuration] Reading mappings from resource: com/camp/common/search/SearchItem.hbm.xml
      12:48:25,806 INFO [HbmBinder] Mapping class: com.camp.common.search.SearchItem -> tblSearchItem
      12:48:25,806 INFO [Configuration] Reading mappings from resource: com/camp/common/session/Session.hbm.xml
      12:48:25,816 INFO [HbmBinder] Mapping class: com.camp.common.session.Session -> tblSession
      12:48:25,816 INFO [Configuration] Reading mappings from resource: com/camp/common/staff/Staff.hbm.xml
      12:48:25,826 INFO [HbmBinder] Mapping class: com.camp.common.staff.Staff -> tblStaff
      12:48:25,836 INFO [Configuration] Reading mappings from resource: com/camp/common/staff/StaffPosition.hbm.xml
      12:48:25,846 INFO [HbmBinder] Mapping class: com.camp.common.staff.StaffPosition -> tblStaffPosition
      12:48:25,856 INFO [Configuration] Reading mappings from resource: com/camp/common/staff/StaffYearly.hbm.xml
      12:48:25,866 INFO [HbmBinder] Mapping class: com.camp.common.staff.StaffYearly -> tblStaffYearly
      12:48:25,866 INFO [Configuration] Reading mappings from resource: com/camp/common/staff/StaffAdvance.hbm.xml
      12:48:25,876 INFO [HbmBinder] Mapping class: com.camp.common.staff.StaffAdvance -> tblStaffAdvance
      12:48:25,876 INFO [Configuration] Reading mappings from resource: com/camp/common/state/State.hbm.xml
      12:48:25,886 INFO [HbmBinder] Mapping class: com.camp.common.state.State -> tblState
      12:48:25,886 INFO [Configuration] Reading mappings from resource: com/camp/common/transport/TransportDestination.hbm.xm
      l
      12:48:25,896 INFO [HbmBinder] Mapping class: com.camp.common.transport.TransportDestination -> tblTransportDestination
      12:48:25,906 INFO [Configuration] Reading mappings from resource: com/camp/common/transport/TransportLeg.hbm.xml
      12:48:25,906 INFO [HbmBinder] Mapping class: com.camp.common.transport.TransportLeg -> tblTransportLeg
      12:48:25,916 INFO [Configuration] Reading mappings from resource: com/camp/common/transport/TransportType.hbm.xml
      12:48:25,916 INFO [HbmBinder] Mapping class: com.camp.common.transport.TransportType -> tblTransportType
      12:48:25,926 INFO [Configuration] processing extends queue
      12:48:25,926 INFO [Configuration] processing collection mappings
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.cabin.CabinAssignment.camperAssignments -> tblCabinAs
      signmentCamper
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.cabin.CabinAssignment.staffAssignments -> tblCabinAss
      ignmentStaff
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.camper.Camper.registrations -> tblRegistration
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.camper.Camper.cabinAssignments -> tblCabinAssignmentC
      amper
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.config.user.Principal.roles -> tblPrincipalRole
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.config.user.Principal.settings -> tblUserConfig
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.family.Family.campers -> tblCamper
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.family.Family.creditCards -> tblCreditCard
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.menu.Menu.menuItems -> tblMenuItem
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.menu.MenuItem.menuItemParams -> tblMenuItemParam
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.registration.Registration.regSessions -> tblRegSessio
      n
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.registration.Registration.transportation -> tblTransp
      ortLeg
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.registration.Registration.medicalIncidents -> tblCamp
      erMedicalIncident
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.registration.Registration.payments -> tblRegistration
      Payment
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.registration.Registration.charges -> tblRegistrationC
      harge
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.report.Report.parameters -> tblReportParameter
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.report.Report.orders -> tblReportOrderBy
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.report.ReportGroup.reports -> tblReport
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.search.Search.searchItems -> tblSearchItem
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.staff.Staff.staffYearly -> tblStaffYearly
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.staff.Staff.cabinAssignments -> tblCabinAssignmentSta
      ff
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.staff.StaffYearly.medicalIncidents -> tblStaffMedical
      Incident
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.staff.StaffYearly.advances -> tblStaffAdvance
      12:48:25,926 INFO [HbmBinder] Mapping collection: com.camp.common.transport.TransportType.destinations -> tblTransportD
      estination
      12:48:25,926 INFO [Configuration] processing association property references
      12:48:25,926 INFO [Configuration] processing foreign key constraints
      12:48:25,946 INFO [NamingHelper] JNDI InitialContext properties:{}
      12:48:25,946 FATAL [DatasourceConnectionProvider] Could not find datasource: java:/PostgresDS
      javax.naming.NameNotFoundException: PostgresDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
      ....
      ....