创建java桌面数据库应用程序出错

按照官网的讲解一步步做的,数据库可以连接,但是程序运行的时候会报错,官网地址是http://netbeans.org/kb/docs/java/gui-db_zh_CN.... 按照官网的讲解一步步做的,数据库可以连接,但是程序运行的时候会报错,官网地址是http://netbeans.org/kb/docs/java/gui-db_zh_CN.html,报错的内容如下:
2011-4-17 13:33:22 org.jdesktop.application.Application$1 run
严重: Application class carsapp.CarsApp failed to launch
javax.persistence.PersistenceException: No Persistence provider for EntityManager named WebExtractPU: 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 carsapp.CarsView.initComponents(CarsView.java:289)
at carsapp.CarsView.<init>(CarsView.java:36)
at carsapp.CarsApp.startup(CarsApp.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:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class carsapp.CarsApp 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:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: javax.persistence.PersistenceException: No Persistence provider for
展开
 我来答
tong110214
2011-04-17
知道答主
回答量:1
采纳率:0%
帮助的人:0
展开全部
缺少这个WebExtractPU对象 ,也有可能这个类没有实现Serializable接口
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式