仪器社区

Java GUI链接sqlserver的问题

5ax3jvn 2010-09-21
run: Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: No Persistence provider for EntityManager named localhost:1433;DatabaseName=OSPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpe... run: Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: No Persistence provider for EntityManager named localhost:1433;DatabaseName=OSPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Local Exception Stack: ) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [localhost:1433;DatabaseName=OSPU] failed. Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while loading class: Base.Car to check whether it implements @Entity, @Embeddable, or @MappedSuperclass. Internal Exception: java.lang.ClassNotFoundException: Base.Car 我的sqlserver已经在Netbean成功连接了,可以在NetBeans查看到了数据库的信息。。 可是还是显示Exception Description: predeploy for PersistenceUnit [localhost:1433;DatabaseName=OSPU] failed. Z主要的是Caused by: java.lang.ClassNotFoundException: Base.Car ,这个Base.car文件已经被我删除了,怎么还显示不能生成类啊。。跪求高手解答
评论
全部评论
oopkooks5
代码要学会找错,主要是这句
localhost:1433;DatabaseName=teacherloadPU] failed.
说明你的数据库有问题,或者是数据库创建正确但写的时候出现了错误
是不是你没有下载数据库的驱动程序啊,jsp连数据库是要下SQL Server 2000的升级包的,还有驱动程序
18 0 2010-09-22 0条评论 回复
艾梵11
简单
10 0 2010-09-23 0条评论 回复
吃货受不了555
如果把这个类删掉了,应该是把所有对这个类的引用去掉,然后把所有之前用到它的java都重新编译,不然原先编译好的class还是会去找这个类。
14 0 2010-09-22 0条评论 回复
您可能感兴趣的社区主题
加载中...
发布 评论