• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Unable to find Data source

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody,
I am trying to use middlegen to generate .hbm and value objects. When i am deploying my application it can find hibernate.cfg.xml but it cannot detect the datasource. i am posting my hibernate.cfg.xml and mapping file
Can someone suggest me a solution.Thanks in advance....

hibernate.cfg.xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
<session-factory >

<!-- datasource connection properties -->
<property name="connection.datasource">HibernateDS</property>
<property name="hibernate.jndi.url">HibernateDS</property>

<!-- dialect for Oracle (any version) -->
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>

<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<mapping resource="com/ats/axsis/hib/Login.hbm" />
</session-factory>
</hibernate-configuration>

login.hbm:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="com.ats.axsis.hib.LoginValue"
table="LOGIN"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="LOGIN"
</meta>


<meta attribute="field-description" inherit="false">
@hibernate.id
generator-class="assigned"
</meta>
<composite-id>
<key-property
name="username"
column="USERNAME"
type="java.lang.String"
length="20"
>
<meta attribute="field-description">
@hibernate.property
column="USERNAME"
length="20"
</meta>
</key-property>
</composite-id>
<property
name="password"
column="PASSWORD"
type="java.lang.String"
length="20"
>
<meta attribute="field-description">
@hibernate.property
column="PASSWORD"
length="20"
</meta>
</property>
<property
name="role"
column="ROLE"
type="java.lang.String"
length="30"
>
<meta attribute="field-description">
@hibernate.property
column="ROLE"
length="30"
</meta>
</property>



<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->


</class>
</hibernate-mapping>


With regards,
venkat Dasari
SCJP 1.4
 
Venkat dasari
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot to mention,my datasource is also configured and it can be seen

Thanks,
Venkat Dasari
SCJP 1.4
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic