PersistenceException with Umlaut in path
I experienced an odd behavior with a java desktop application that uses Toplink essentials as persistence provider.
I have a single directory containing all I need for my application: a jar, a lib folder and a JavaDB database. The whole directory is self-contained (I copied it several times without problems, even between different computers).
Today I wanted to copy once more, but my target folder contained a german Umlaut ü (html: ü
).
Starting my application failed, with an exception that made it hard to find the reason why (see below).
Of course I know the old naming conventions, but I thought we already left that behind. So my question is, if there is a way to make it run independent of directory naming. It's important since I want to give the application to clients and have only little influence on install dirs.
System: Windows 7, JavaDB 10.5.3
Thanks in advance for your help!
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
Odd. What JVM are you using?
Ensure you have the latest TopLink Essentials patch, I remember an issue with spaces, but not Umlats.
You could also try upgrading to EclipseLink and see if the same issue occurs, if it does please log a bug.
精彩评论