Hi folks,
I'm a bit of newbie to the jboss world and have been playing with seam.
I'm having some problems with the datasource aspect of it.

I've created a turn-around-ds.xml that looks like:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <datasources>
  |     <local-tx-datasource>
  |         <jndi-name>propertyDatasource</jndi-name>
  |         <connection-url>jdbc:hsqldb:.</connection-url>
  |         <driver-class>org.hsqldb.jdbcDriver</driver-class>
  |         <user-name>sa</user-name>
  |         <password></password>
  |     </local-tx-datasource>
  | </datasources>
  | 

and then referenced this in the hibernate config:

  | <!DOCTYPE hibernate-configuration PUBLIC
  |     "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  |     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
  | 
  | <hibernate-configuration>
  |     <session-factory name="propertyDatabase">
  |         <property name="show_sql">true</property>
  |         <property 
name="connection.datasource">java:propertyDatasource</property>
  |         <property 
name="dialect">org.hibernate.dialect.HSQLDialect</property>
  |         <property name="hbm2ddl.auto">create-drop</property>
  |         <property 
name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
  |         <property name="transaction.flush_before_completion">true</property>
  |         <property name="connection.release_mode">after_statement</property>
  |         <property 
name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
  |         <property 
name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
  |         <mapping class="org.mhenderson.turnaround.domain.Property"/>
  |     </session-factory>
  | </hibernate-configuration>
  | 

so.. I dropped the datasource config into the /default/deploy directory and got 
this:

  | 09:04:36,176 INFO  [ConnectionFactoryBindingService] Bound 
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=propertyDatasource' 
to JNDI name 'java:propertyDatasource'
  | 

but then on dropping the war file into the /default/deploy directory I got this:

  | 09:05:44,788 INFO  [Configuration] Configuration resource: 
/hibernate.cfg.xml
  | 09:05:44,838 INFO  [Configuration] Configured SessionFactory: 
propertyDatabase
  | 09:05:45,209 INFO  [Configuration] processing extends queue
  | 09:05:45,209 INFO  [Configuration] processing collection mappings
  | 09:05:45,209 INFO  [Configuration] processing association property 
references
  | 09:05:45,209 INFO  [Configuration] processing foreign key constraints
  | 09:05:45,419 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 09:05:45,429 ERROR [[/turn-around]] Exception sending context initialized 
event to listener instance of class org.jboss.seam.servlet.SeamListener 
org.hibernate.HibernateException: Could not find datasource: 
java:propertyDatasource
  |         at 
org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:59)
  | 

any help would be really appreciated... thanks.

Marty

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3901093#3901093

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3901093


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to