Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing datasource from within a JPA Application

2 views
Skip to first unread message

super_delegate

unread,
Oct 22, 2009, 2:21:45 PM10/22/09
to
I am always getting the following exception whenever my application wants to access the DefaultDatasource
{code}
org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
{code}
Even though the DefaultDatasource does exist. My persistence.xml is defined as
{code}

org.hibernate.ejb.HibernatePersistence
DefaultDatasource





{code}

HenkW

unread,
Oct 26, 2009, 4:24:24 AM10/26/09
to
... and when you do a "test connection" for that datasource from the WAS
admin console?

Henk


0 new messages