File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes No connection properties specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No connection properties specified" Watch "No connection properties specified" New topic

No connection properties specified

Daniel Winz

Joined: Aug 19, 2010
Posts: 8
I get a "No connection properties specified .." warning when I execute the following line of code:


2010-08-24 11:54:21,586 DEBUG [org.hibernate.ejb.Ejb3Configuration] (http- Look up for persistence unit: Employee-Details
2010-08-24 11:54:21,661 DEBUG [org.hibernate.ejb.util.NamingHelper] (http- Not Ejb3Configuration to JNDI, no JNDI name configured
2010-08-24 11:54:21,662 DEBUG [org.hibernate.cfg.Configuration] (http- Preparing to build session factory with filters : {}
2010-08-24 11:54:21,662 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http- Execute first pass mapping processing
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http- Process hbm files
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http- Process annotated classes
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http- processing fk mappings (*ToOne and JoinedSubclass)
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.Configuration] (http- processing extends queue
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http- processing collection mappings
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http- processing native query and ResultSetMapping mappings
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http- processing association property references
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http- processing foreign key constraints
2010-08-24 11:54:21,668 WARN [org.hibernate.connection.UserSuppliedConnectionProvider] (http- No connection properties specified - the user must supply JDBC connections

The persistence unit "Employee-Details" I have set in my persistence.xml file. The unit was started without error before (Log: Starting persistence unit persistence.unit:unitName=#Employee-Details).

content of my persistence.xml:

Content of my data source file "mysql-ds.xml" at jboss folder "server/default/deploy":

According to some articles that I have found at the web, because I use JPA, I use a persistence.xml file instead of a hibernate.cnf.xml file to configure the connection.

Why is hibernate not satisfied with the JDBC connection that I have provided? Is something wrong with my configuration?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
Daniel Winz

Joined: Aug 19, 2010
Posts: 8
After adding javax.persistence properties to my persistence.xml the warning ("No connection properties specified ..") doesn't appear anymore.


But is this a proper solution? I don't realy believe.
I agree. Here's the link:
subject: No connection properties specified
jQuery in Action, 3rd edition