2
我遇到了一個奇怪的行爲,使用Toplink essentials作爲持久性提供程序的java桌面應用程序。PersistenceException和路徑中的變音符號
我有一個包含我的應用程序所需的全部目錄:jar,lib文件夾和JavaDB數據庫。整個目錄是獨立的(我幾次複製它沒有問題,甚至在不同的計算機之間)。
今天我想複製一次,但我的目標文件夾中包含一個德國元音ü(HTML:ü
)。
啓動我的應用程序失敗,但有一個例外,這使得很難找到原因(見下文)。
當然我知道舊的命名約定,但我認爲我們已經把它留下了。所以我的問題是,如果有一種獨立於目錄命名的方式運行。這很重要,因爲我想將應用程序交給客戶,並且對安裝目錄影響很小。
系統:Windows 7,JavaDB 10.5.3
在此先感謝您的幫助!
SCHWERWIEGEND: Application class jlabps.JLabPSApp failed to launch
javax.persistence.PersistenceException: No Persistence provider for EntityManage
r named JLAPS_EMB: 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 jlabps.JLabPSView.initComponents(JLabPSView.java:401)
at jlabps.JLabPSView.<init>(JLabPSView.java:47)
at jlabps.JLabPSApp.startup(JLabPSApp.java:71)
at org.jdesktop.application.Application$1.run(Application.java:171)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class jlabps
.JLabPSApp failed to launch
at org.jdesktop.application.Application$1.run(Application.java:177)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: javax.persistence.PersistenceException: No Persistence provider for E
ntityManager named JLAPS_EMB: 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 jlabps.JLabPSView.initComponents(JLabPSView.java:401)
at jlabps.JLabPSView.<init>(JLabPSView.java:47)
at jlabps.JLabPSApp.startup(JLabPSApp.java:71)
at org.jdesktop.application.Application$1.run(Application.java:171)
... 14 more
謝謝詹姆斯。將嘗試獲取最新的補丁。我的JVM:「1.6.0_24」 Java™SE運行時環境(內部版本1.6.0_24-b07) Java HotSpot™客戶端虛擬機(構建19.1-b02,混合模式,共享) – 2011-03-29 13:44:16
我想我有最新的toplink版本。不知道升級到EclipseLink有多棘手,還是隻是替換一些罐子? – 2011-04-08 11:55:38