File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No connection properties specified" Watch "No connection properties specified" New topic
Author

No connection properties specified

Daniel Winz
Greenhorn

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



Stacktrace:

2010-08-24 11:54:21,586 DEBUG [org.hibernate.ejb.Ejb3Configuration] (http-127.0.0.1-8080-1) Look up for persistence unit: Employee-Details
2010-08-24 11:54:21,661 DEBUG [org.hibernate.ejb.util.NamingHelper] (http-127.0.0.1-8080-1) Not Ejb3Configuration to JNDI, no JNDI name configured
2010-08-24 11:54:21,662 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) Preparing to build session factory with filters : {}
2010-08-24 11:54:21,662 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http-127.0.0.1-8080-1) Execute first pass mapping processing
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http-127.0.0.1-8080-1) Process hbm files
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http-127.0.0.1-8080-1) Process annotated classes
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.AnnotationConfiguration] (http-127.0.0.1-8080-1) processing fk mappings (*ToOne and JoinedSubclass)
2010-08-24 11:54:21,663 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) processing extends queue
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) processing collection mappings
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) processing native query and ResultSetMapping mappings
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) processing association property references
2010-08-24 11:54:21,664 DEBUG [org.hibernate.cfg.Configuration] (http-127.0.0.1-8080-1) processing foreign key constraints
2010-08-24 11:54:21,668 WARN [org.hibernate.connection.UserSuppliedConnectionProvider] (http-127.0.0.1-8080-1) 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
Author
Rancher

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
Greenhorn

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.

persistence.xml:



But is this a proper solution? I don't realy believe.
 
 
subject: No connection properties specified
 
Similar Threads
Web service invocation gives nullpointer exception?
[] How can i integrate JPA with EJB and persistence.xml?
adding more than one entry
Not able to update or save a object to database. please help.
Exception got in deployment of EJB3 .ear