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文件已经被我删除了,怎么还显示不能生成类啊。。跪求高手解答
代码要学会找错,主要是这句
localhost:1433;DatabaseName=teacherloadPU] failed.
说明你的数据库有问题,或者是数据库创建正确但写的时候出现了错误
是不是你没有下载数据库的驱动程序啊,jsp连数据库是要下SQL Server 2000的升级包的,还有驱动程序