MyException - 我的异常网
当前位置:我的异常网» J2SE » thread "AWT-EventQueue-0" javax.persis

thread "AWT-EventQueue-0" javax.persistence.PersistenceException:

www.MyException.Cn  网友分享于:2013-11-15  浏览:1899次
java桌面应用程序无法运行
刚接触java,用netbeans做了个小程序,数据库是mssql2k 
做好后在netbeans中打成jar包就出现了问题 
没打包之前在运行没有问题 
打包后jar包不运行 
程序运行也报错: 
Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: No Persistence provider for EntityManager named localhost:1433;DatabaseName=teacherloadPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: 
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException 
Local Exception Stack: 
Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException 
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@19821f 

MANIFEST文件里的Class-Path,格式路径都完整
请帮忙各位解决

------解决方案--------------------
连接数据库的问题。
 oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException 
这行有oracle不知是干什么的,你用的是微软的sql server吧?
------解决方案--------------------
外部的jar没有在classpath里面吧

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有