0 Replies Latest reply on May 9, 2006 2:58 PM by David Robison

    Problem deploying Hiberhate.HAR

    David Robison Novice

      I am having trouble deploying my first Hibernate HAR in JBoss. Here is my hibernate.cfg.xml:

      <hibernate-configuration>
       <session-factory>
       <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
       <property name="show_sql">false</property>
       <property name="hibernate.current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</property>
       <mapping resource="com/orci/OpenComm/db/hibernate/DatalinkProtocol.hbm.xml" />
       <mapping resource="com/orci/OpenComm/db/hibernate/EndPointGeneric.hbm.xml" />
       </session-factory>
      </hibernate-configuration>
      


      Here is my hibernate-service.xml

      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate" name="orci:name=OpenCommSessionFactory">
      
       <!-- Required services -->
       <depends>jboss.jca:service=HARDeployer</depends>
       <depends>jboss.jca:service=DataSourceBinding,name=OpenCommDS</depends>
      
       <!-- Datasource -->
       <attribute name="DatasourceName">java:/OpenCommDS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
      
       <!-- Transaction integration -->
       <attribute name="TransactionStrategy">org.hibernate.transaction.JTATransactionFactory</attribute>
       <attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
       <attribute name="FlushBeforeCompletionEnabled">true</attribute>
       <attribute name="AutoCloseSessionEnabled">true</attribute>
      
       <!-- Second-level caching -->
       <attribute name="SecondLevelCacheEnabled">true</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
       <attribute name="QueryCacheEnabled">true</attribute>
      
       <!-- Logging -->
       <attribute name="ShowSqlEnabled">true</attribute>
      
       </mbean>
      </server>
      


      here is my datasource-ds.xml
      <datasources>
       <local-tx-datasource>
       <jndi-name>OpenCommDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost/opencomm</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>postgres</user-name>
       <password>postgres</password>
       </local-tx-datasource>
      
      </datasources>
      


      when I put it all together, I get the error:


      14:57:16,906 INFO [ServiceConfigurator] Problem configuring service orci:name=OpenCommSessionFactory
      org.jboss.deployment.DeploymentException: No Attribute found with name: TransactionStrategy
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:318)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:460)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
      at org.jboss.system.ServiceController.install(ServiceController.java:226)


      I confess I'm a new-be at this, but can anyone see what I'm doing wrong?
      Thanks in advance,
      David Robison