users@glassfish.java.net

Persistence provider jar file is in your classpath

From: <glassfish_at_javadesktop.org>
Date: Thu, 02 Oct 2008 18:16:02 PDT

Hi comrades,

I currently have difficulties regarding Glassfish application server (in my case Gassfish v2 bundled with NetBeans). I desperately need your assistance. I am working on Windows Vista platform with J2EE, J2SE and J2RE updates 6, MySQL 5.0.

I am working on a real-time project for which I need to persist data directly into a database to make it available for web access as soon as this data is provided to me by socket connection. The data should be continuously persisted into the database at a rate of about 60 updates a minute (lab conditions).

The problems I have are Glassfish related.

I was able to solve the first which required having to delete the Glassfish server within NetBeans and re-enstate it in order to have access the web administration interface.

However, the second [b]problem is[/b] related to Glassfish being unable to identify certain persistence libraries. The error displayed within NetBeans output screen is as follows:

java.lang.ExceptionInInitializerError
Caused by: javax.persistence.PersistenceException: No resource files named META-INF/services/javax.persistence.spi.PersistenceProvider were found. Please make sure that the persistence provider jar file is in your classpath.
        at javax.persistence.Persistence.findAllProviders(Persistence.java:167)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:103)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
        at serverside.BizLogicMiddleWare4.<clinit>(BizLogicMiddleWare4.java:34)
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 4 seconds)

Has anyone come accross this type of problem? I would be so greatful if you could be of assistance.

Kind Regards,

Tut
[Message sent by forum member 'tutankhamun' (tutankhamun)]

http://forums.java.net/jive/thread.jspa?messageID=303062