ok,
I am now at the stage whereby I am getting the following messagein the logs:

02:03:33,611 INFO  [EARDeployer] Init J2EE application: 
file:/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/
02:03:33,820 INFO  [Environment] Hibernate 2.1.5
02:03:33,830 INFO  [Environment] hibernate.properties not found
02:03:33,835 INFO  [Environment] using CGLIB reflection optimizer
02:03:33,859 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/Artist.hbm.xml
02:03:34,037 INFO  [Binder] Mapping class: test.Artist -> artisttbl
02:03:34,249 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/ArtistImages.hbm.xml
02:03:34,265 INFO  [Binder] Mapping class: test.ArtistImages -> artistimagestbl
02:03:34,272 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/Order.hbm.xml
02:03:34,297 INFO  [Binder] Mapping class: test.Order -> orderstbl
02:03:34,345 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/OrderItem.hbm.xml
02:03:34,376 INFO  [Binder] Mapping class: test.OrderItem -> orderitemstbl
02:03:34,378 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/Stock.hbm.xml
02:03:34,399 INFO  [Binder] Mapping class: test.Stock -> stocktbl
02:03:34,408 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/StockImages.hbm.xml
02:03:34,422 INFO  [Binder] Mapping class: test.StockImages -> stockimagestbl
02:03:34,423 INFO  [Configuration] Mapping file: 
/Library/jboss-4.0.0/server/default/deploy/myHibernateEar.ear/hibernate.har/test/User.hbm.xml
02:03:34,461 INFO  [Binder] Mapping class: test.User -> usertbl
02:03:34,467 INFO  [Binder] Mapping collection: test.User.ArtistChoice -> choicetbl
02:03:34,468 INFO  [Configuration] processing one-to-many association mappings
02:03:34,469 INFO  [Binder] Mapping collection: test.Order.OrderItems -> orderitemstbl
02:03:34,470 INFO  [Binder] Mapping collection: test.Stock.StockImages -> 
stockimagestbl
02:03:34,472 INFO  [Configuration] processing one-to-one association property 
references
02:03:34,472 INFO  [Configuration] processing foreign key constraints
02:03:34,567 INFO  [Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
02:03:34,572 INFO  [SettingsFactory] Use outer join fetching: true
02:03:34,587 INFO  [NamingHelper] JNDI InitialContext properties:{}
02:03:34,596 INFO  [DatasourceConnectionProvider] Using datasource: java:/PostgresDS
02:03:34,600 INFO  [TransactionFactoryFactory] Transaction strategy: 
net.sf.hibernate.transaction.JTATransactionFactory
02:03:34,602 INFO  [NamingHelper] JNDI InitialContext properties:{}
02:03:34,606 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
02:03:34,607 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
02:03:34,608 INFO  [NamingHelper] JNDI InitialContext properties:{}
02:03:34,610 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
02:03:34,611 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
02:03:34,774 INFO  [SettingsFactory] Use scrollable result sets: true
02:03:34,774 INFO  [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
02:03:34,775 INFO  [SettingsFactory] Optimize cache for minimal puts: false
02:03:34,775 INFO  [SettingsFactory] echoing all SQL to stdout
02:03:34,776 INFO  [SettingsFactory] Query language substitutions: {}
02:03:34,776 INFO  [SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
02:03:34,786 INFO  [Configuration] instantiating and configuring caches
02:03:34,824 WARN  [Configurator] No configuration found. Configuring ehcache from 
ehcache-failsafe.xml found in the classpath: 
jar:file:/Library/jboss-4.0.0/server/default/lib/ehcache-1.0.jar!/ehcache-failsafe.xml

But when I runs the following code:

                         InitialContext ctx = new InitialContext();
                         transaction = 
(UserTransaction)ctx.lookup("java:/UserTransaction"); 
                         transaction.begin(); 

                         session = 
HibernateContext.getSession("java:/hibernate/SessionFactory"); 
                      //Get User details 
                         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(); 

I now get the following error message in the logs:

02:05:17,430 WARN  [QueryTranslator] no persistent classes found for query class: from 
test.User as user where user.UserName=:username and user.UserPassword=:password

As I already have a test/*.class, test/*.hbm.xml defined in the ear document, as can 
be seen in the log read out, what am I missing here?

regards


Andrew

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

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


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to