Hi,
I am running JBoss 3.2.6 and have Hibernate connected to postgreSQL 2.1.5.1 via jndi. 
The problem I am having is that wen I issue a command for hibernate to go away and 
return some data nothing is being returned, and I am not getting any errors. Please be 
aware that the tags placed in here are being incorrectly formatted.My config files are 
as follows:

1. hibenate-service.xml:

    mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"
         jboss.jca:service=LocalTxCM,name=PostgreSQL 
        name="SessionFactoryName" java:/HibernateFactory 
        name="DatasourceName"java:/PostgreSQL" attribute
        name="Dialect" net.sf.hibernate.dialect.PostgreSQLDialect
        name="CacheProviderClass" net.sf.ehcache.hibernate.Provider attribute
    mbean

2. postgres-ds.xml:

  <local-tx-datasource>
    <jndi-name>PostgreSQL</jndi-name>
    <connection-url>jdbc:postgresql://localhost:5432/beyarecords</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
postgres
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
  </local-tx-datasource>


3. Hibernate - java code:

import net.sf.hibernate.HibernateException; 
import net.sf.hibernate.Session; 
import net.sf.hibernate.Transaction; 
import net.sf.hibernate.Query; 

............... More code here.......

Session session = 
org.jboss.hibernate.session.HibernateContext.getSession("java:/HibernateFactory");
                         transaction = session.beginTransaction();
                         //Get User details 
                         Query query = session.createQuery("from test.User as user 
where user.UserName=:username and user.UserPassword=:password") 
                         .setString("username",username) 
                         .setString("password",password); 
                         user = (User) query.uniqueResult(); 
                        
                         transaction.commit(); 
                         session.close(); 

4. log file message:

2004-10-23 14:16:08,906 DEBUG [net.sf.hibernate.impl.SessionFactoryObjectFactory] JNDI 
lookup: HibernateFactory
2004-10-23 14:16:08,906 DEBUG [net.sf.hibernate.impl.SessionFactoryObjectFactory] 
lookup: uid=d1e22501ffc5eb9a00ffc5eb9de50000
2004-10-23 14:16:09,008 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2004-10-23 14:16:30,031 DEBUG [net.sf.hibernate.impl.SessionImpl] running 
Session.finalize()
2004-10-23 14:20:59,727 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: 
IdleRemover notifying pools, interval: 450000
2004-10-23 14:28:29,784 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: 
IdleRemover notifying pools, interval: 450000
2004-10-23 14:35:59,841 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: 
IdleRemover notifying pools, interval: 450000
2004-10-23 14:35:59,845 DEBUG 
[org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using 
properties: {user=postgres, password=--hidden--}
2004-10-23 14:35:59,868 DEBUG 
[org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using 
properties: {user=postgres, password=--hidden--}
2004-10-23 14:35:59,888 DEBUG 
[org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using 
properties: {user=postgres, password=--hidden--}
2004-10-23 14:35:59,907 DEBUG 
[org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using 
properties: {user=postgres, password=--hidden--}

Could anybody shine some light on what it is I am not doing correctly? I have a 
standalone tomcat system which access the ver same database/hibernate maps the only 
differnece being that is it not doing it via jdni, and it all works fine. So i'm sure 
it is something to do with my hibernate java document/the jdni connection but i am not 
sure what.


many thanks


Uzo

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

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


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to