Hi guys,
i've a problem when running java application connected with sqlite database the connection is done with netbeans IDE, but when i trying to run the application i get the following error

init:
deps-jar:
compile:
run:
06/12/2008 04:42:49 ص org.jdesktop.application.Application$1 run
SEVERE: Application class desktopapplication3.DesktopApplication3 failed to launch
javax.persistence.PersistenceException: No Persistence provider for EntityManager named C:\Users\7amada\Documents\temp.dbPU: 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 desktopapplication3.DesktopApplication3View.initComponents(DesktopApplication3View.java:261)
at desktopapplication3.DesktopApplication3View.<init>(DesktopApplication3View.java:35)
at desktopapplication3.DesktopApplication3.startup(DesktopApplication3.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 desktopapplication3.DesktopApplication3 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 C:\Users\7amada\Documents\temp.dbPU: 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 desktopapplication3.DesktopApplication3View.initComponents(DesktopApplication3View.java:261)
at desktopapplication3.DesktopApplication3View.<init>(DesktopApplication3View.java:35)
at desktopapplication3.DesktopApplication3.startup(DesktopApplication3.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
... 8 more
BUILD SUCCESSFUL (total time: 2 seconds)
so, how to solve this problem???

by making sure that method does not return null.
or, by catching the exception using a try-catch statement

Looking at the exception it seems that Netbeans can't find the Persistence provider for your EntityManager.
In simple language *I think* it means that there is no JDBC driver for SQLite on your system or in the classpath. I cant guess any more possibilities since you have not provided any more information.

You can check this out if you are looking for a jdbc driver for SQLite.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.