NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

error at the start Java Desktop Database Application

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
zizitop



Joined: 30 Oct 2008
Posts: 2

PostPosted: Thu Oct 30, 2008 6:15 pm    Post subject: error at the start Java Desktop Database Application Reply with quote

Hi! I had a problem: I created a Java Desktop Database Application step-by-step from tutorial (http://www.netbeans.org/kb/60/java/gui-db.html) in the netbeans 6.1, after compile and run the programm, an environment showed a next error:

    compile:
    run:
    30.10.2008 16:32:31 org.jdesktop.application.Application$1 run
    SEVERE: Application class carsdb.CarsDBApp failed to launch
    javax.persistence.PersistenceException: No Persistence provider for EntityManager named carPU: The following providers:
    oracle.toplink.essentials.PersistenceProvider
    oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    Returned null to createEntityManagerFactory.

    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at carsdb.CarsDBView.initComponents(CarsDBView.java:288)
    at carsdb.CarsDBView.<init>(CarsDBView.java:36)
    at carsdb.CarsDBApp.startup(CarsDBApp.java:19)
    at org.jdesktop.application.Application$1.run(Application.java:171)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Exception in thread "AWT-EventQueue-0"
    java.lang.Error: Application class carsdb.CarsDBApp failed to launch
    at org.jdesktop.application.Application$1.run(Application.java:177)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named carPU: The following providers:
    oracle.toplink.essentials.PersistenceProvider
    oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    Returned null to createEntityManagerFactory.

    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at carsdb.CarsDBView.initComponents(CarsDBView.java:288)
    at carsdb.CarsDBView.<init>(CarsDBView.java:36)
    at carsdb.CarsDBApp.startup(CarsDBApp.java:19)
    at org.jdesktop.application.Application$1.run(Application.java:171)
    ... 8 more
    BUILD SUCCESSFUL (total time: 8 minutes 54 seconds)


Say please, that it is needed to do to correct mistake?
NetBeans Packs Download all (219 MB) + downloaded and installing java DB.
Thank you[/url]
Back to top
Patrick Keegan
Posted via mailing list.





PostPosted: Thu Oct 30, 2008 6:27 pm    Post subject: error at the start Java Desktop Database Application Reply with quote

zizitop wrote:
Quote:
Hi! I had a problem: I created a Java Desktop Database Application step-by-step from tutorial (http://www.netbeans.org/kb/60/java/gui-db.html) in the netbeans 6.1, after compile and run the programm, an environment showed a next error:

It looks like the TopLink library did not get added to your app (it
should have happened automatically). In your project, right-click the
Libraries node and choose Add Library. Form the list, select the TopLink
library.

-Patrick
Quote:


compile:

run:

30.10.2008 16:32:31 org.jdesktop.application.Application$1 run

SEVERE: Application class carsdb.CarsDBApp failed to launch

javax.persistence.PersistenceException: No Persistence provider for EntityManager named carPU: The following providers:

oracle.toplink.essentials.PersistenceProvider

oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider

Returned null to createEntityManagerFactory.



at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)

at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)

at carsdb.CarsDBView.initComponents(CarsDBView.java:288)

at carsdb.CarsDBView.<init>(CarsDBView.java:36)

at carsdb.CarsDBApp.startup(CarsDBApp.java:19)

at org.jdesktop.application.Application$1.run(Application.java:171)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Exception in thread "AWT-EventQueue-0"

java.lang.Error: Application class carsdb.CarsDBApp failed to launch

at org.jdesktop.application.Application$1.run(Application.java:177)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named carPU: The following providers:

oracle.toplink.essentials.PersistenceProvider

oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider

Returned null to createEntityManagerFactory.



at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)

at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)

at carsdb.CarsDBView.initComponents(CarsDBView.java:288)

at carsdb.CarsDBView.<init>(CarsDBView.java:36)

at carsdb.CarsDBApp.startup(CarsDBApp.java:19)

at org.jdesktop.application.Application$1.run(Application.java:171)

... 8 more

BUILD SUCCESSFUL (total time: 8 minutes 54 seconds)





Say please, that it is needed to do to correct mistake?

NetBeans Packs Download all (219 MB) + downloaded and installing java DB.

Thank you[/url]




Back to top
zizitop



Joined: 30 Oct 2008
Posts: 2

PostPosted: Fri Oct 31, 2008 1:41 pm    Post subject: Reply with quote

Hi!.I checked is or this library connected to project, and she appeared connected. Possibly,except for IDE NetBeans is something needed yet to set?Patrick, I went to your blog and on the resulted example created project: "A Personal Data Storage Application With Embedded Java DB" which as well as in previous case not running (also started the prepared project rolls from a site). Maybe I'm wrong, or not in the order set of Java?(IDE, jdk-6u10-windows-i586-p,javadb_10_4_1_3)?
Back to top
babicka_baba



Joined: 22 Feb 2010
Posts: 1

PostPosted: Mon Feb 22, 2010 7:02 pm    Post subject: Reply with quote

I had the very same problem with freshly installed NetBeans 6.8 - the full package. The toplink library is correctly referenced. Tried changing persistence library to Hibernate in the persistence.xml desginer, but that did not help. Problem occurs both for accesing a MySQL database and for the sample derby database provided with the IDE.

NetBeans use JDK 1.6.0_17 as provided with the full package.
Back to top
Mvek



Joined: 31 Oct 2011
Posts: 43
Location: Prague, Czech Republic

PostPosted: Thu Jan 26, 2012 10:08 pm    Post subject: Reply with quote

Have someone get to some solution? I am not using Toplink, I am trying some tutorial about CRUD with Derby embbed. It worked, but after some time, I get also the "No Persistence provider for EntityManager ..." error.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo